K64 Reflash - HardFault - but why

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K64 Reflash - HardFault - but why

461件の閲覧回数
JHinkle
Senior Contributor I

K64 has my Bootloader installed.

It has an Application that loads at 0x1000.

Two boards - same issue.

Both boards were working fine for a week.  My tester (in Canada) was helping debug the application and cycled power to the micro.  Power had NOT go all the way to zero before it came back on.  Same situation - both boards - different days. After this power cycle event -- the App fails to run -- I think a Hardfault is occurring.

The Bootloader performs a checksum which passes but when it jumps to the App -- it just dies. I have an LED that is suppose to light when a HardFault occurs and it's lit. 

I wrote a remote loader that would talk to the Bootloader and update the Application.  Process tested on my bench works perfectly.

On the two subject boards - the new Application is made available to the Bootloader.  It flashes the new App into the K64 - and verifies each block that is flashed -- also verifies overall checksum.  All pass - but fails when it jumps to the App.

I can not think of a failure mode associated with power cycling that would do something to the micro.

Do You have any ideas or comments?

I suspect the failure is NOT flash related since It just performed a reflash and verified itself.

Can anyone think of a component within the micro that can be suspect?

Any ideas or comments are welcomed -- this one has me puzzled!!.

Thanks.

Joe

By the way ... I've the the flash protected so I can't connect a jtag debugger to see what's going on -- got to think this one thru.

0 件の賞賛
2 返答(返信)

307件の閲覧回数
JHinkle
Senior Contributor I

Just thinking out loud ....

Does Kinetis/K64 have any of it's registers that are sensitive to VCC abrupt changes that would remain in a non-default state after power is removed or reset applied?

I use the following K64 modules ... SIM, UART, SPI, ENET, DMA, PORT, I2C, I2S

Currently, I am counting on the default values being is their associated registers.  If a Power event (as described above) affected one of these associated registers in a way that prevents the default value upon power on or reset, (and I don't set the value myself but depend on the default value) they could throw a HardFault - Right?

Any comments on this line of thinking?

Thanks.

Joe

0 件の賞賛

307件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

In general, most hard fault issue was generated with " trying to write some module register and its(related module's) clock gate is disable at SIM_SCGCn register".

And another issue also could trigger "hard fault/ bus fault": overprogramming the flash (Flash sector did not be erased before it was programed).

Please check if there with above situations happened with the application code.


Wish it helps.

Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛