MC9S08JM60 - internal workings of the automated FLASH page erase mechanism

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

MC9S08JM60 - internal workings of the automated FLASH page erase mechanism

ソリューションへジャンプ
1,054件の閲覧回数
RSteger
Contributor II

Hello,

 

I'm currently working on driver for EEPROM emulation using the flash array in a MC9S08JM60 chip. The data is critical in our application, and must be correctly recoverable given that we may have a power loss at any time. So we work with multiple flash pages used in a circular manner, and use a make-before-break algorithm. We activate the LVD reset, to avoid brown out problems.

 

My questions:

 

1. The datasheet talks about flash access errors and flash operation aborts when entering stop mode during execution of a flash command. What happens with the internal flash state machine when the MCU is reset, for example, by the LVD system? Is the operation aborted, as one would assume?

 

2. Does the internal flash state machine erase data within a page in a particular order? Are flash pages erased one byte at a time starting at the lowest address? Or one 64-byte row at a time? Or is erase voltage applied to the whole 512-byte page at once?

 

Once the erase mechanism is understood, we can know what to expect if we suffer a power loss while a page is being erased. We can know what part of the data is gone first. This is important for the correct placing of metadata within a page, as well as for the correct interpretation of the results of a partial page erase aborted by a power failure.

 

I've gone over the datasheet and the reference manual but was unable to find this information. I probably need information from a Freescale product engineer.

 

Thanks in advance,

 

Ron

ラベル(1)
0 件の賞賛
返信
1 解決策
364件の閲覧回数
kef
Specialist I

1. Flash erase/program requires clock for 2 purposes, generating high voltage and high voltage exposure timing. Stop mode usually means no clocks, so proper flash program/erase is not possible. Resets during flash program/erase also will lead to not complete program/erase, some bits may even float between erased (1) and programmed (0) states.

Using large enough Vcc capacitor and Low Voltage Warning interrupt, you should ensure all flash operations complete before voltage drops below Low-voltage detection threshold. Low voltage warning and detection (reset) thresholds are known. Flash page erase is also known, about 20ms. Byte program ~45us. 

 

2. On erase voltage is applied to whole flash page (page erase) or whole flash (mass erase) simultaneously.

 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
365件の閲覧回数
kef
Specialist I

1. Flash erase/program requires clock for 2 purposes, generating high voltage and high voltage exposure timing. Stop mode usually means no clocks, so proper flash program/erase is not possible. Resets during flash program/erase also will lead to not complete program/erase, some bits may even float between erased (1) and programmed (0) states.

Using large enough Vcc capacitor and Low Voltage Warning interrupt, you should ensure all flash operations complete before voltage drops below Low-voltage detection threshold. Low voltage warning and detection (reset) thresholds are known. Flash page erase is also known, about 20ms. Byte program ~45us. 

 

2. On erase voltage is applied to whole flash page (page erase) or whole flash (mass erase) simultaneously.

 

0 件の賞賛
返信