AN2720 erase and flash problem in mc9s12dp256b

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

AN2720 erase and flash problem in mc9s12dp256b

688 Views
big6
Contributor I

Hi,

 

I tried to create a bootloader for mc9s12dp512 or mc9s12dp256b.

 

I downloaded AN2720 package and did a test.

 

I used the all code from AN2720 and I did not change anything!

 

AN2720 could erase and flash Page 3F, 3E, 3D, 3C (block 0), when the flash routines are located in page 3D. It is very good!

 

However, it is strange that AN2720 functions COULD NOT erase and flash the pages such as 3B, 3A, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30.

 

Can anyone help me to solve this problem?

 

Thanks

Labels (1)
0 Kudos
Reply
2 Replies

533 Views
kef
Specialist I

If code in AN2720SW.zip is the same like it is in AN2720.pdf, then it is made for single bank chips like S12D64. S12DP256 has 4 * 64k banks and you need to set up flash bank select bits before each erase or program operation. By default bank 0 is selected and so this code is fine programming pages 3C-3F.

0 Kudos
Reply

533 Views
big6
Contributor I

Got it.

 

Thank you very much

0 Kudos
Reply