FLASH programming of MC9S08AC128 controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FLASH programming of MC9S08AC128 controller

1,579 Views
sbharsha
Contributor I
Hi,
 
I have Gone through the Manual of MC9S08AC128 series controller.
 
I have seen the Flash programinng topic.
 
They have given the tre steps to flash the code of extended memory.
 

1. Write to a valid address in the Flash array memory. Whats this Flash array memory, Is it register ? if so which is the registr where i have write the address ?

2. Write a valid command to the FCMD register. Ok

3. Clear the FCBEF flag in the FSTAT register by writing a 1 to FCBEF to launch the command. OK

 

Please ca any body clarify my Highlighhted Red colour doubts\..

 

Harsha S

Labels (1)
0 Kudos
3 Replies

418 Views
kef
Specialist I
No, flash array is not a register. Write to valid flash address means you should write directly to flash memory. If you want to program byte at 1234, then you write byte directly to memory byte at 1234.
 
   *(char*)1234 = 5;  // write 5 to memo byte at 1234
 
 
   LDA   #5
   STA   1234
0 Kudos

418 Views
sbharsha
Contributor I
Hi,
 
Thaks for the That.
 
I have one more doubt, When i want to Erase/program flash which is in Extended Address memory, How can i do as the CPU addressing can be done till 0xFFFF.
 
Where as the extended addressing of Flash uses the 0x001_FFFF addresses, Do you have any idea/suggestions.
 
please let me know.
 
Harsha S
 
0 Kudos

418 Views
kef
Specialist I
PPAGE register allows to map any selected 16k piece of flash to 8000-bfff.
Also LAP registers allow to read and write access all the flash. Codewarrior might use LAP registers to access all the flash using far pointers, I'm not sure. Check if demoqe128_lap_dictionary example is what you want.
 
0 Kudos