Erasing Flash with BDM Script Files

Started by eric_cina in 68HC1217 years ago 2 replies

I am using CodeWarrior and a USB BDM to flash my code. I have a preload command script which wipes out the entire flash before the BDM...

I am using CodeWarrior and a USB BDM to flash my code. I have a preload command script which wipes out the entire flash before the BDM performs the loading. The command script has the following: // reset the device to get default settings RESET // initialize flash programming process FLASH // select the flash modules FLASH SELECT


Problem in using D-Flash for XS128, Need help

Started by yadunandan kasu in 68HC1214 years ago 2 replies

Good day everyone, =20 I am working on MC9S12XS128 MCU. =20 I know that this MCU has the new feature of D-Flash. I am facing a problem in...

Good day everyone, =20 I am working on MC9S12XS128 MCU. =20 I know that this MCU has the new feature of D-Flash. I am facing a problem in using this and executing its commands on it. I am not very clear about this D-Flash and have the following questions =20 I do not want to use the Global address in my project, so after reviewing the datasheets, i am thinking that a 1Kbyte D-flash is av...


Flash writing problem.

Started by lenux22 in 68HC1218 years ago 7 replies

There is 2 flash blocks on Motorla DG128: Flash Block 0 and Flash. Block 1. For Flash Block 1 i had set the security byte(0xFF0F)...

There is 2 flash blocks on Motorla DG128: Flash Block 0 and Flash. Block 1. For Flash Block 1 i had set the security byte(0xFF0F) to 0xFE (security disabled) and set protection byte of block 0 (0xFF0D) to protect range 0xF000-0xFFFF (contains my bootrom and fla


HCS12 flash programmer

Started by Nam SungHyun in 68HC1219 years ago 2 replies

Hello, I use 9S12E64 and internal flash for Booter and external flash for application. Because there's no data EEPROM,...

Hello, I use 9S12E64 and internal flash for Booter and external flash for application. Because there's no data EEPROM, Application uses internal flash area (1sector) for NVM data. Currently I use softec InDART BlazeProgrammer, and it seems it only support mass era


HCS12 SCI Flash Programming Help

Started by jssimbe in 68HC1213 years ago 1 reply

I'm using and HCS12 with icc12 compiler. I'm using SCI1 to communicate to a touch screen LCD. This program loads the LCD GUI. When I try...

I'm using and HCS12 with icc12 compiler. I'm using SCI1 to communicate to a touch screen LCD. This program loads the LCD GUI. When I try loading the program into flash, it doesn't work. When I'm not using flash, the program works fine and GUI is loaded on the screen. When I flash the board, I include the vectors_dp256 file and set the abs_address to 0xef80. Any help would be greatly apprecia...


flash erase

Started by kristies1 in 68HC1220 years ago 2 replies

Hi all, Is there any way to erase the flash thru the BDM once the flash protection bits in FPROT have been changed? I am...

Hi all, Is there any way to erase the flash thru the BDM once the flash protection bits in FPROT have been changed? I am using the bootloader from the mot web site, and it has a 4096 byte protected boot block at $F000, like this: org $ff0d dc.b $cf ; setup a


Flash Secure/protect help needed

Started by adlai15 in 68HC1217 years ago 5 replies

Hi, I'm using an NE64 derivative. I would like to secure/protect my firmware in flash during or after the download of the firmware. I've...

Hi, I'm using an NE64 derivative. I would like to secure/protect my firmware in flash during or after the download of the firmware. I've seen a command FLASH PROTECT for the linker command file(.prm), but the mcu03ea.fpp file, for the NE64, that came with CodeWarrior has just a few lines in it. So I have a couple of questions: 1) What's the best way to secure the flash? 2) Does anyone


MC9S12KG256 FLASH bank 1 erased, but not programming

Started by serg...@mail.ru in 68HC1213 years ago 2 replies

Hi, I am working the MC9S12KG256 and writing flash driver to program CPU. Code executed from RAM. FLASH memory is fully unsecured, FPROT for...

Hi, I am working the MC9S12KG256 and writing flash driver to program CPU. Code executed from RAM. FLASH memory is fully unsecured, FPROT for bank 0 is $84, for bank 1 is $FF. Call to EraseFL (B=$00,A=$00) succesfully erases all FLASH sectors except protected. Call to WriteFL succesfully program only bank 0. For bank 1 it doesn't return any error on programming stage, but there is no da...


Flash programming from a bootloader

Started by dwild.geo in 68HC1218 years ago 12 replies

Hi folks Has anyone here ever successfully programmed flash in a 9s12 device from a bootloader when the chip is secured?...

Hi folks Has anyone here ever successfully programmed flash in a 9s12 device from a bootloader when the chip is secured? The chip I am using is the 9S12DG128 3l40K mask set which has the common EEPROM/FLASH programming error fixed. I am still having some troubles and


Problem regarding Flash in MC68HC912B32

Started by Rivan Rivaldy in 68HC1214 years ago 2 replies

Hi all, I got a problem with my Flash on my MC68HC912B32 (again.. sigh). I realized that when the S-Record being sent to the MCU, the MCU will...

Hi all, I got a problem with my Flash on my MC68HC912B32 (again.. sigh). I realized that when the S-Record being sent to the MCU, the MCU will only read the odd order of S1. For example, I have the S-Records listed below: S011000046696C653A20696E742E7478740A31 S105FFF20DE01C S105FFF40DB04A S105FFFE0D00F0 S9030000FC After this S-Records being loaded into the Flash, I noticed that the...


Need help reg PPAGE in MC9S12A256

Started by satya in 68HC1216 years ago 7 replies

Hi, In my current project we are going to use Freescale MC9S12A256 16bit controller. It is using paging concept to access 256KByte inbuilt...

Hi, In my current project we are going to use Freescale MC9S12A256 16bit controller. It is using paging concept to access 256KByte inbuilt Flash with 16K address space and PPAGE register. Let us assume that my application code is more than 64KByte, stored in block 2 & 3 of inbuilt Flash and it is executing from FLASH(using page window). Becauseit is > 64K, it is not only crossed the


Difference between D-Flash and Emulated EEPROM

Started by yadunandan kasu in 68HC1214 years ago

Dear Everyone, I am working with the MC9S12XS128 MCU. This MCU doesnt have the EEPROM but it has D-Flash. And I studied the data sheet...

Dear Everyone, I am working with the MC9S12XS128 MCU. This MCU doesnt have the EEPROM but it has D-Flash. And I studied the data sheet for MC9S12XEP100 refference manual and the application note AN3490.pdf. Which says MC9S12XEP100 has the optional Emulated EERPOM which can be done by carefully partioning the availabe D-Flash. And the document says it has many advantages like .. ...


Problems programing flash on M68KIT912DP256 with BDM Multilink/Metrowerks

Started by djsimpson100 in 68HC1220 years ago 3 replies

Hi all, I am having problems programming the flash on the MC9S912DP256. I am using Codewarrior HC12 V1.2 and the P&E BDM...

Hi all, I am having problems programming the flash on the MC9S912DP256. I am using Codewarrior HC12 V1.2 and the P&E BDM Multilink which came with the Motorola M68KIT912DP256. If I load the Fibo Flash example, the debugger stalls at at the 60% mark in execu


Help on Codewarrior debugger cmd files

Started by apedroso11 in 68HC1217 years ago 5 replies

Hi all, I want the codewarrior (CW) debugger to erase only a part of the flash when it starts. I can see in the...

Hi all, I want the codewarrior (CW) debugger to erase only a part of the flash when it starts. I can see in the "P&E_ICD_Erase_unsecure_hcs12.cmd" file that the debugger will make a MASS ERASE before programming the flash. I want to keep my bootloader programmed into the flash although any of my colleges use the debugger on our targets. I can't find documentation regardi


9S12DP256 codewarrior uCOS-II banked flash

Started by donpichol in 68HC1219 years ago 1 reply

Hi, At the moment, i got a uCOS-II-based-application running in "Flash Application" target (Codewarrior). I want to run it in...

Hi, At the moment, i got a uCOS-II-based-application running in "Flash Application" target (Codewarrior). I want to run it in "Banked Flash" mode. As you can think, some problems occur with assembly routines. After a while reading datasheets i reso


Programming flash

Started by "isaac.caldas" in 68HC1212 years ago 5 replies

Hello everyone! I'm a begginer in MCU programming. I was trying to make my MCU get access the flash and write n-bytes on it, for when I...

Hello everyone! I'm a begginer in MCU programming. I was trying to make my MCU get access the flash and write n-bytes on it, for when I reboot my MCU keep this bytes on the flash, for future use. I program in Assembly and my MCU is HCS12X. Can you make a tutorial or a example for me? (explaining how write and read) Thank you very much! ------------------------------------


Bootloader for reprogramming Flash EEPROM

Started by yann_37 in 68HC1217 years ago 9 replies

Hello, I'm new with HC12. I'm trying to adapt the code found in application note AN1718 (Serial Bootloader for Reprogramming the...

Hello, I'm new with HC12. I'm trying to adapt the code found in application note AN1718 (Serial Bootloader for Reprogramming the MC68HC912B32 Flash EEPROM) for a 912DT128A. The beggining of the program copies a part of the code from Flash to RAM and run it then. This code contains a "pcr" mnemonic (Program Counter Relative) but I


Reading FLASH after programming

Started by Jeff McKnight in 68HC1215 years ago 36 replies

Hello All, I am using the 9s12DG256. After I have successfully programmed Flash using a bootloader I try to read some of the memory...

Hello All, I am using the 9s12DG256. After I have successfully programmed Flash using a bootloader I try to read some of the memory locations. They do not show the correct value until I do a hard reset with the reset pin. Is this to be expected ? Jeff


Booting from Flash m9s12dg256

Started by sburgin13 in 68HC1215 years ago 13 replies

I'm having major dificulties understanding how to get my c program to run upon boot up. I know the address of where the program starts needs...

I'm having major dificulties understanding how to get my c program to run upon boot up. I know the address of where the program starts needs to be at the reset vector interrupt, but how do I program this? What are the steps I would need to take to change my program and load it into flash? ------------------------------------


USB BDM Multilink - Command Files Syntax Help

Started by eric_cina in 68HC1215 years ago 7 replies

I'm using the P&E Micro USB BDM Multilink with CodeWarrior 3.1. I use several command files to help initialize the micro before the BDM...

I'm using the P&E Micro USB BDM Multilink with CodeWarrior 3.1. I use several command files to help initialize the micro before the BDM performs the flash load. One command file in particular is the p&e_preload.cmd file which I have modified to do a sector erase of the entire flash except for my bootloader which is in the upper portion of flash. Recently I have expanded my Bootloader...