‌MC9S12XEP100MAL program cannot write parameters after burning

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

‌MC9S12XEP100MAL program cannot write parameters after burning

Jump to solution
1,061 Views
ltx
Contributor II

To adapt to the mass production process, we use the exported bin file for programming. After programming, the program runs normally, but the parameters cannot be modified. The modified parameters are present during power supply but revert to the original default values after power-off.

For example, the default circuit board serial number stored in the chip is 2220352. After modification via the host computer software, it changes to 2220451. When the circuit board is powered on, the host computer software reads the serial number as 2220451. However, after power-off and restart, the data reverts to 2220352.

At this point, we have confirmed that the issue lies in the programming of the chip, but the exact cause is unclear. I would like to ask: Is this because the D flash partition was not initially configured for the chip? If this is the problem, how should we resolve it during mass production? Should we configure the partition for the chip before programming, and then burn the bin program? Can the chip be erased before burning the bin program?

Tags (1)
0 Kudos
Reply
1 Solution
536 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @ltx,

1. A mass erase also clears the partition configuration, so the programmer must not perform a mass erase after the partition has been set. However, if the Flash area is not blank, it must still be erased — in this case, a sector erase should be used instead of a mass erase.

2. Please refer to the following examples:

  • XEP100 – Initial data in Emulated EEPROM – CW47.zip
  • XEP100 – EEPROM Direct Access – CW45.zip

3. I would not compare Flash/EEPROM partitioning to computer hard‑drive partitioning — the concepts are different and unrelated. For a proper understanding, I recommend the two application notes I shared earlier.

 

Regards,
Daniel

View solution in original post

0 Kudos
Reply
3 Replies
674 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @ltx,

It appears that the data is being written only to the RAM buffer, not to the actual EEPROM (EEE) area. This usually happens when the D‑Flash has not been partitioned, so the EEPROM emulation is not active.

Also remember that performing a mass erase on the device will remove the D‑Flash partitioning, returning the chip to an unpartitioned state.

Refer to this application notes:

https://www.nxp.com/docs/en/application-note/AN3743.pdf

https://www.nxp.com/docs/en/application-note/AN3490.pdf

Here are some examples:

https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LAMA-s-S12XE-unofficial-examples/ta-p/11007...

 

Regards,

Daniel

0 Kudos
Reply
656 Views
ltx
Contributor II

Hello Daniel,

Thank you very much for your reply. Your response has solved a big problem for us. However, I still have some questions that need your help. The points are as follows:

1. After I complete the chip configuration partitioning, do I not need to erase the chip anymore and can I directly burn the bin file on my commercial programmer?
2. Among the sample files you provided, which one is the sample program I need? I don't know much about this chip. It was developed by our partner, but our cooperation has recently been interrupted.
3. Is the partition configuration of this chip similar to the partitioning of a computer hard drive? Are there any restrictions on partition size?

I'm looking forward to your reply very much. Wish you good health and all the best in your work.

0 Kudos
Reply
537 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @ltx,

1. A mass erase also clears the partition configuration, so the programmer must not perform a mass erase after the partition has been set. However, if the Flash area is not blank, it must still be erased — in this case, a sector erase should be used instead of a mass erase.

2. Please refer to the following examples:

  • XEP100 – Initial data in Emulated EEPROM – CW47.zip
  • XEP100 – EEPROM Direct Access – CW45.zip

3. I would not compare Flash/EEPROM partitioning to computer hard‑drive partitioning — the concepts are different and unrelated. For a proper understanding, I recommend the two application notes I shared earlier.

 

Regards,
Daniel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2269078%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E2%80%8CMC9S12XEP100MAL%20program%20cannot%20write%20parameters%20after%20burning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2269078%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ETo%20adapt%20to%20the%20mass%20production%20process%2C%20we%20use%20the%20exported%20bin%20file%20for%20programming.%20After%20programming%2C%20the%20program%20runs%20normally%2C%20but%20the%20parameters%20cannot%20be%20modified.%20The%20modified%20parameters%20are%20present%20during%20power%20supply%20but%20revert%20to%20the%20original%20default%20values%20after%20power-off.%3C%2FP%3E%3CP%3EFor%20example%2C%20the%20default%20circuit%20board%20serial%20number%20stored%20in%20the%20chip%20is%202220352.%20After%20modification%20via%20the%20host%20computer%20software%2C%20it%20changes%20to%202220451.%20When%20the%20circuit%20board%20is%20powered%20on%2C%20the%20host%20computer%20software%20reads%20the%20serial%20number%20as%202220451.%20However%2C%20after%20power-off%20and%20restart%2C%20the%20data%20reverts%20to%202220352.%3C%2FP%3E%3CP%3EAt%20this%20point%2C%20we%20have%20confirmed%20that%20the%20issue%20lies%20in%20the%20programming%20of%20the%20chip%2C%20but%20the%20exact%20cause%20is%20unclear.%20I%20would%20like%20to%20ask%3A%20Is%20this%20because%20the%20D%20flash%20partition%20was%20not%20initially%20configured%20for%20the%20chip%3F%20If%20this%20is%20the%20problem%2C%20how%20should%20we%20resolve%20it%20during%20mass%20production%3F%20Should%20we%20configure%20the%20partition%20for%20the%20chip%20before%20programming%2C%20and%20then%20burn%20the%20bin%20program%3F%20Can%20the%20chip%20be%20erased%20before%20burning%20the%20bin%20program%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2270071%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%E2%80%8CMC9S12XEP100MAL%20program%20cannot%20write%20parameters%20after%20burning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2270071%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F258345%22%20target%3D%22_blank%22%3E%40ltx%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EIt%20appears%20that%20the%20data%20is%20being%20written%20only%20to%20the%20RAM%20buffer%2C%20not%20to%20the%20actual%20EEPROM%20(EEE)%20area.%20This%20usually%20happens%20when%20the%20D%E2%80%91Flash%20has%20not%20been%20partitioned%2C%20so%20the%20EEPROM%20emulation%20is%20not%20active.%3C%2FP%3E%0A%3CP%3EAlso%20remember%20that%20performing%20a%20mass%20erase%20on%20the%20device%20will%20remove%20the%20D%E2%80%91Flash%20partitioning%2C%20returning%20the%20chip%20to%20an%20unpartitioned%20state.%3C%2FP%3E%0A%3CP%3ERefer%20to%20this%20application%20notes%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN3743.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN3743.pdf%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN3490.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN3490.pdf%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EHere%20are%20some%20examples%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS12-MagniV-Microcontrollers%2FLAMA-s-S12XE-unofficial-examples%2Fta-p%2F1100774%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS12-MagniV-Microcontrollers%2FLAMA-s-S12XE-unofficial-examples%2Fta-p%2F1100774%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2270297%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%E2%80%8CMC9S12XEP100MAL%20program%20cannot%20write%20parameters%20after%20burning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2270297%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Daniel%2C%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20your%20reply.%20Your%20response%20has%20solved%20a%20big%20problem%20for%20us.%20However%2C%20I%20still%20have%20some%20questions%20that%20need%20your%20help.%20The%20points%20are%20as%20follows%3A%3C%2FP%3E%3CP%3E1.%20After%20I%20complete%20the%20chip%20configuration%20partitioning%2C%20do%20I%20not%20need%20to%20erase%20the%20chip%20anymore%20and%20can%20I%20directly%20burn%20the%20bin%20file%20on%20my%20commercial%20programmer%3F%3CBR%20%2F%3E2.%20Among%20the%20sample%20files%20you%20provided%2C%20which%20one%20is%20the%20sample%20program%20I%20need%3F%20I%20don't%20know%20much%20about%20this%20chip.%20It%20was%20developed%20by%20our%20partner%2C%20but%20our%20cooperation%20has%20recently%20been%20interrupted.%3CBR%20%2F%3E3.%20Is%20the%20partition%20configuration%20of%20this%20chip%20similar%20to%20the%20partitioning%20of%20a%20computer%20hard%20drive%3F%20Are%20there%20any%20restrictions%20on%20partition%20size%3F%3C%2FP%3E%3CP%3EI'm%20looking%20forward%20to%20your%20reply%20very%20much.%20Wish%20you%20good%20health%20and%20all%20the%20best%20in%20your%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2270798%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%E2%80%8CMC9S12XEP100MAL%20program%20cannot%20write%20parameters%20after%20burning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2270798%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F258345%22%20target%3D%22_blank%22%3E%40ltx%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E1.%20A%20mass%20erase%20also%20clears%20the%20partition%20configuration%2C%20so%20the%20programmer%20must%20not%20perform%20a%20mass%20erase%20after%20the%20partition%20has%20been%20set.%26nbsp%3BHowever%2C%20if%20the%20Flash%20area%20is%20not%20blank%2C%20it%20must%20still%20be%20erased%20%E2%80%94%20in%20this%20case%2C%20a%20sector%20erase%20should%20be%20used%20instead%20of%20a%20mass%20erase.%3C%2FP%3E%0A%3CP%3E2.%20Please%20refer%20to%20the%20following%20examples%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EXEP100%20%E2%80%93%20Initial%20data%20in%20Emulated%20EEPROM%20%E2%80%93%20CW47.zip%3C%2FLI%3E%0A%3CLI%3EXEP100%20%E2%80%93%20EEPROM%20Direct%20Access%20%E2%80%93%20CW45.zip%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E3.%20I%20would%20not%20compare%20Flash%2FEEPROM%20partitioning%20to%20computer%20hard%E2%80%91drive%20partitioning%20%E2%80%94%20the%20concepts%20are%20different%20and%20unrelated.%26nbsp%3BFor%20a%20proper%20understanding%2C%20I%20recommend%20the%20two%20application%20notes%20I%20shared%20earlier.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E