Swap function

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

Swap function

1,111 Views
j_cfernandez
Contributor II

Dear,

  I have some problem with the Swap function.

I can init Swap the function, erase Block 1, copy new firmware in Block 1 and change the Swap flag to
complete and Reset the Kinetis MCU. The MCU start in the Block 1 normal. Now I set the Swap Flag to “UPDATE” and want to erase Block 0. I receive a “Protection violation detected Error”. FPROT0..3 have 0xFF status.

Tags (2)
5 Replies

607 Views
carlos_chavez
NXP Employee
NXP Employee

Hello,

I just wanted to follow up to ensure that this was resolved.  Just for your information, I just wanted to make you aware of an errata that exists on that particular mask set with respect to the SWAP feature.  I have added the link below:

http://cache.freescale.com/files/microcontrollers/doc/errata/KINETIS_4N30D.pdf?fpsp=1&WT_TYPE=Errata...

It states the following:

5706        FTFx: MCU security is inadvertently enabled (secured) if a mass erase is executed when the flash blocks/

halves are swapped. This issue only affects applications that use the flash swap feature.

Please let us know if you have any further questions.

-Carlos

0 Kudos

607 Views
antonioconcio
NXP Employee
NXP Employee

Hi,

Which is the device?

Regards,

Antonio

0 Kudos

607 Views
j_cfernandez
Contributor II

MK60DN512ZVL Mask 4N30D rev 1.4

I have new knowledge:

I can init Swap the function, erase Block 1, copy new firmware in Block 1 and change the Swap flag to
complete and Reset the Kinetis MCU. The MCU Flag/Register signals me, the app start now from Block 1. In reality it starts from Block 0.

Regards

0 Kudos

607 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I assume you have checked AN4533 and related software about Kinetis Flash SWAP function:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4533.pdf

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4533SW.zip

It need to check application code related 0x408 ~ 0x40B value related FPROT0~3 registers.

If there with some Flash memory protected.

B.R.

Ma Hui 

607 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I am checking with that Flash SWAP issue, It will take some time to check this issue.

Thank you for the patience.

0 Kudos