MPC5647 Flash Inaccessibility

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

MPC5647 Flash Inaccessibility

70 Views
kwru
Contributor III

We are using the MPC5647 device.

Using Trace32, we programmed an application into the internal Flash memory area. Immediately after the programming process started (or just after it completed), the power to the target hardware was turned off.

After this event, the Flash memory in the application area could no longer be accessed. When accessing the Flash through Trace32, the memory contents appear as either "????????" or "FFFFFFFF". We suspect that the power was removed before the Flash programming operation had completely finished.

In this condition, the application Flash area becomes unusable, and the Flash can only be recovered by performing the factory recovery procedure described in AN4521_MPC56xx C90FL Flash Recovery.pdf. After executing the recovery procedure, the Flash becomes usable again.

We would like to understand the following:

  1. What could cause this behavior?

    • Why does an unexpected power-off during Flash programming result in the Flash block becoming inaccessible?

  2. Why is it not possible to simply reprogram the Flash?

    • Why is the recovery/factory initialization procedure required before the Flash can be programmed again?

    • Is this related to an invalid ECC state, an incomplete erase operation, or another internal Flash controller condition?

Any detailed explanation regarding the internal Flash mechanism would be greatly appreciated.

Tags (1)
0 Kudos
Reply
1 Reply

46 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

After this event, the Flash memory in the application area could no longer be accessed. When accessing the Flash through Trace32, the memory contents appear as either "????????" or "FFFFFFFF". We suspect that the power was removed before the Flash programming operation had completely finished.

That points to corrupted flash scenario.

In this condition, the application Flash area becomes unusable, and the Flash can only be recovered by performing the factory recovery procedure described in AN4521_MPC56xx C90FL Flash Recovery.pdf. After executing the recovery procedure, the Flash becomes usable again.

Definitely a flash corruption cause by power loss during programming. Flash is full of ECC faults that is why you see ????? in Trace.

Why does an unexpected power-off during Flash programming result in the Flash block becoming inaccessible?

Simply if you do not finish programming or erase you will have miss match in flash data with ECC syndrome.

 

  • Why is the recovery/factory initialization procedure required before the Flash can be programmed again?

Standard program command expects a clean erased block
After interruption:

controller sees invalid state → rejects commands

So:

erase/program sequence never starts correctly
access may be blocked or return dummy data

  • Is this related to an invalid ECC state, an incomplete erase operation, or another internal Flash controller condition?

to ECC due to power loss.

Best regards,

Peter

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2381575%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMPC5647%20Flash%20Inaccessibility%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2381575%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWe%20are%20using%20the%20MPC5647%20device.%3C%2FP%3E%3CP%3EUsing%20Trace32%2C%20we%20programmed%20an%20application%20into%20the%20internal%20Flash%20memory%20area.%20Immediately%20after%20the%20programming%20process%20started%20(or%20just%20after%20it%20completed)%2C%20the%20power%20to%20the%20target%20hardware%20was%20turned%20off.%3C%2FP%3E%3CP%3EAfter%20this%20event%2C%20the%20Flash%20memory%20in%20the%20application%20area%20could%20no%20longer%20be%20accessed.%20When%20accessing%20the%20Flash%20through%20Trace32%2C%20the%20memory%20contents%20appear%20as%20either%20%22%3F%3F%3F%3F%3F%3F%3F%3F%22%20or%20%22FFFFFFFF%22.%20We%20suspect%20that%20the%20power%20was%20removed%20before%20the%20Flash%20programming%20operation%20had%20completely%20finished.%3C%2FP%3E%3CP%3EIn%20this%20condition%2C%20the%20application%20Flash%20area%20becomes%20unusable%2C%20and%20the%20Flash%20can%20only%20be%20recovered%20by%20performing%20the%20factory%20recovery%20procedure%20described%20in%20AN4521_MPC56xx%20C90FL%20Flash%20Recovery.pdf.%20After%20executing%20the%20recovery%20procedure%2C%20the%20Flash%20becomes%20usable%20again.%3C%2FP%3E%3CP%3EWe%20would%20like%20to%20understand%20the%20following%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3EWhat%20could%20cause%20this%20behavior%3F%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EWhy%20does%20an%20unexpected%20power-off%20during%20Flash%20programming%20result%20in%20the%20Flash%20block%20becoming%20inaccessible%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3E%3CP%3EWhy%20is%20it%20not%20possible%20to%20simply%20reprogram%20the%20Flash%3F%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EWhy%20is%20the%20recovery%2Ffactory%20initialization%20procedure%20required%20before%20the%20Flash%20can%20be%20programmed%20again%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIs%20this%20related%20to%20an%20invalid%20ECC%20state%2C%20an%20incomplete%20erase%20operation%2C%20or%20another%20internal%20Flash%20controller%20condition%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAny%20detailed%20explanation%20regarding%20the%20internal%20Flash%20mechanism%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2381658%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MPC5647%20Flash%20Inaccessibility%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2381658%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EAfter%20this%20event%2C%20the%20Flash%20memory%20in%20the%20application%20area%20could%20no%20longer%20be%20accessed.%20When%20accessing%20the%20Flash%20through%20Trace32%2C%20the%20memory%20contents%20appear%20as%20either%20%22%3F%3F%3F%3F%3F%3F%3F%3F%22%20or%20%22FFFFFFFF%22.%20We%20suspect%20that%20the%20power%20was%20removed%20before%20the%20Flash%20programming%20operation%20had%20completely%20finished.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EThat%20points%20to%20corrupted%20flash%20scenario.%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EIn%20this%20condition%2C%20the%20application%20Flash%20area%20becomes%20unusable%2C%20and%20the%20Flash%20can%20only%20be%20recovered%20by%20performing%20the%20factory%20recovery%20procedure%20described%20in%20AN4521_MPC56xx%20C90FL%20Flash%20Recovery.pdf.%20After%20executing%20the%20recovery%20procedure%2C%20the%20Flash%20becomes%20usable%20again.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EDefinitely%20a%20flash%20corruption%20cause%20by%20power%20loss%20during%20programming.%20Flash%20is%20full%20of%20ECC%20faults%20that%20is%20why%20you%20see%20%3F%3F%3F%3F%3F%20in%20Trace.%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EWhy%20does%20an%20unexpected%20power-off%20during%20Flash%20programming%20result%20in%20the%20Flash%20block%20becoming%20inaccessible%3F%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3ESimply%20if%20you%20do%20not%20finish%20programming%20or%20erase%20you%20will%20have%20miss%20match%20in%20flash%20data%20with%20ECC%20syndrome.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBLOCKQUOTE%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3EWhy%20is%20the%20recovery%2Ffactory%20initialization%20procedure%20required%20before%20the%20Flash%20can%20be%20programmed%20again%3F%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EStandard%20program%20command%20expects%20a%20clean%20erased%20block%3CBR%20%2F%3EAfter%20interruption%3A%3C%2FP%3E%0A%3CP%3Econtroller%20sees%20invalid%20state%20%E2%86%92%20rejects%20commands%3C%2FP%3E%0A%3CP%3ESo%3A%3C%2FP%3E%0A%3CP%3Eerase%2Fprogram%20sequence%20never%20starts%20correctly%3CBR%20%2F%3Eaccess%20may%20be%20blocked%20or%20return%20dummy%20data%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3EIs%20this%20related%20to%20an%20invalid%20ECC%20state%2C%20an%20incomplete%20erase%20operation%2C%20or%20another%20internal%20Flash%20controller%20condition%3F%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3Eto%20ECC%20due%20to%20power%20loss.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPeter%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E