inconsistent 'LOCKUP' reset when programming Flash Memory

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

inconsistent 'LOCKUP' reset when programming Flash Memory

908件の閲覧回数
donweier
Contributor II

Hi everyone,

 

I'm using a MKL02Z32VFK4 in IAR embedded workbench.

 

I'm having some trouble with non-volatile memory. My project requires that I remember calibration values after a power cycle or a reset, so I am programming them into flash. The problem is, in programming the values to flash, I frequently, but without much pattern, cause a reset to occur to the ARM core. When this happens, the 'LOCKUP' bit in the RCM_SRS1 register is set.

 

There are some things that make this more likely to occur, but do not guarantee the error by any means. It is more likely that this will happen if I write in rapid succession, or if I have already written successfully a number of times since power was applied.

 

I used the provided code in the kinetis sample projects, and am erasing a block before programming it. I have attached the source code in case it helps.

 

Based on the values in memory when this reset is triggered, it does not seem to always occur specifically on the write or on the erase. I can tell this is the case because previously written values are sometimes intact after the reset, and at other times are erased. This indicates to me that the reset issue is not related to writing or erasing specifically, but simply issuing a flash command.

 

Is this a known bug? Or am I missing something else?

 

Thanks for any insight that can be offered.

 

Best,

 

Don

Original Attachment has been moved to: nonVolatileVars.c.zip

Original Attachment has been moved to: flash_FTFL.h.zip

Original Attachment has been moved to: flash_FTFL.c.zip

ラベル(1)
0 件の賞賛
返信
1 返信

663件の閲覧回数
mjbcswitzerland
Specialist V

Hi

The usual problem is that interrupts are not blocked when erasing and programming and the processor tries to take an interrupt vector from flash when it is being operated on (this can cause random failure since it depends on when the interrupt takes place).

In case you prefer a complete solution including internal file system and fail-safe parameter system you can get one at the link below.

Regards

Mark

Kinetis for professionals: http://www.utasker.com/kinetis.html
KL02: http://www.utasker.com/kinetis/FRDM-KL02Z.html
Internal file and parameter system: http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF

0 件の賞賛
返信