MPC5674 FLASH interlock

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

MPC5674 FLASH interlock

Jump to solution
1,346 Views
kitae_kim
Contributor II

Hello?

I have a question.
Chapter 11 in the MPC5674F REF document. What is interlock during Flash?
1. What is interlock?
2. In the case of Flash Program, is it not to write interlock?
3. In case of Flash Erase, is there a fixed value or rule when writing interlock?
3.1 When erasing the L1 area of Flash A, is it possible to write interlock as below?
(UINT *) (0x0000_0000) = 0x1234_4321; (any address, any value ??)
Please answer....
Thank you.

1 Solution
1,265 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi,

1) It is the write before programming or erasing pointing to the flash array space. “Program data interlock write” writes data to some address, so it from this point of view it doesn’t differ to normal write. “Erase interlock write” uses address (specifies particular block in flash array) meanwhile whatever data may be used. But in both cases in must be followed by programming or erasing, that’s probably the cause why it is noted as „interlock“.

2) In this case first programmed data are taken as interlock write as well.

3) Any value, but address must point into block that is supposed to be erased.

Hi, I would recommend to see one of following example code

Example MPC5675K Data_flash_program_simple CW210 

https://community.nxp.com/docs/DOC-101849 

View solution in original post

4 Replies
1,266 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi,

1) It is the write before programming or erasing pointing to the flash array space. “Program data interlock write” writes data to some address, so it from this point of view it doesn’t differ to normal write. “Erase interlock write” uses address (specifies particular block in flash array) meanwhile whatever data may be used. But in both cases in must be followed by programming or erasing, that’s probably the cause why it is noted as „interlock“.

2) In this case first programmed data are taken as interlock write as well.

3) Any value, but address must point into block that is supposed to be erased.

Hi, I would recommend to see one of following example code

Example MPC5675K Data_flash_program_simple CW210 

https://community.nxp.com/docs/DOC-101849 

1,265 Views
kitae_kim
Contributor II

Thank you very much for your response. It was very helpful.


I looked at the example code you recommended.
In the case of a flash program, I understood that the first write to the Flash address to be written is interlock write.


For flash erase, there are a few questions to help you understand.
(It is assumed that the flash lock is unlocked.)

1) When erasing, I understood that the value of write interlock does not have to be 0xFFFF_FFFF. Is that correct?

2) When erasing, the address of interlock write should be the address of the area to be erased. Should the address of the area you always want to erase be the first area?
Example ----> For L1 area (0x0000_4000 ~ 0x0000_8000)
1. *((unsigned int *)0x00000000) = any_value; // interlock write
2. *((unsigned int *)0x00004000) = any_value; // interlock write
In the case of L1, which is 1 or 2?
Or, if it is flash area (0x0000_0000 ~ 0x0038_FFF0), is it okay?

3) If there are multiple areas to be erased (when MSEL and LSEL are all selected in FLASH_x_LMSR), where should the area of the interlock write address be selected?

Your answers are very helpful for beginners.
Thank you.

0 Kudos
1,265 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

1) It can be any value, important is an address of the access

2) In case erase interlock, it only needs to point to flash array A or B, blocks to be erased are selected by registers as marked on the screenshot below.

pastedImage_3.png

pastedImage_4.png

0 Kudos
1,265 Views
kitae_kim
Contributor II

Thanks for the reply.
All interlock questions have been resolved.

0 Kudos