Example MPC5604B Shadow Flash Reprogramming

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

Example MPC5604B Shadow Flash Reprogramming

Example MPC5604B Shadow Flash Reprogramming

********************************************************************************

* Detailed Description:

* This example shows how to reprogram the shadow flash.

*

* It is highly recommended to read application note "Preventing Device Lockout

* via Censorship on MPC55xx and MPC563x Families"

* http://www.freescale.com/files/32bit/doc/app_note/AN3787.pdf

*

* This examples erases the shadow flash, then it restores censorship information

* and then NVUSRO nonvolatile register is reprogrammed to disable the watchdog.

* The watchdog is disabled by clearing of bit WATCHDOG_EN in NVUSRO. It ensures

* that watchdog is disabled automatically during startup of MCU.

* Watchdog can be also disabled by software (shown in the code).

*

* It is important to execute the code from RAM memory because Read-While-Write

* is not supported here.

*

* ------------------------------------------------------------------------------

* Test HW:  XPC56xxMB2 + XPC560B 144LQFP, SPC5604B, silicon mask set 2M27V

* Target :  internal_FLASH, RAM

*

********************************************************************************

Labels (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1119903%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5604B%20Shadow%20Flash%20Reprogramming%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119903%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3C%2FP%3E%3CP%3E*%20Detailed%20Description%3A%20%3C%2FP%3E%3CP%3E*%20This%20example%20shows%20how%20to%20reprogram%20the%20shadow%20flash.%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20It%20is%20highly%20recommended%20to%20read%20application%20note%20%22Preventing%20Device%20Lockout%20%3C%2FP%3E%3CP%3E*%20via%20Censorship%20on%20MPC55xx%20and%20MPC563x%20Families%22%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20%3C%2FSPAN%3E%3CA%20class%3D%22jive-link-external-small%22%20href%3D%22http%3A%2F%2Fwww.freescale.com%2Ffiles%2F32bit%2Fdoc%2Fapp_note%2FAN3787.pdf%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Fwww.freescale.com%2Ffiles%2F32bit%2Fdoc%2Fapp_note%2FAN3787.pdf%3C%2FA%3E%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20This%20examples%20erases%20the%20shadow%20flash%2C%20then%20it%20restores%20censorship%20information%3C%2FP%3E%3CP%3E*%20and%20then%20NVUSRO%20nonvolatile%20register%20is%20reprogrammed%20to%20disable%20the%20watchdog.%3C%2FP%3E%3CP%3E*%20The%20watchdog%20is%20disabled%20by%20clearing%20of%20bit%20WATCHDOG_EN%20in%20NVUSRO.%20It%20ensures%3C%2FP%3E%3CP%3E*%20that%20watchdog%20is%20disabled%20automatically%20during%20startup%20of%20MCU.%20%3C%2FP%3E%3CP%3E*%20Watchdog%20can%20be%20also%20disabled%20by%20software%20(shown%20in%20the%20code).%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20It%20is%20important%20to%20execute%20the%20code%20from%20RAM%20memory%20because%20Read-While-Write%3C%2FP%3E%3CP%3E*%20is%20not%20supported%20here.%20%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E*%20------------------------------------------------------------------------------%3C%2FP%3E%3CP%3E*%20Test%20HW%3A%26nbsp%3B%20XPC56xxMB2%20%2B%20XPC560B%20144LQFP%2C%20SPC5604B%2C%20silicon%20mask%20set%202M27V%3C%2FP%3E%3CP%3E*%20Target%20%3A%26nbsp%3B%20internal_FLASH%2C%20RAM%3C%2FP%3E%3CP%3E*%3C%2FP%3E%3CP%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1119903%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGeneral%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎10-17-2014 12:24 AM
Updated by: