MK21FX512 Ezport programming

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

MK21FX512 Ezport programming

532 Views
jason_nguyen
Contributor I

Hi, I am programming the MK21FX512 device using the Ezport pins. I noticed that the F_OPT byte at location 40Dh had an option to prevent entry into EzPort mode during reset. My question is, if I was programming a data pattern into the device but disable the EzPort through the F_OPT in the middle, is the device still programming the data pattern all the way through or does it immediately disables it as soon as I program that byte? Also, am I completely locked out of the device since I am only accessing it through the EzPort or is there a way to still access the device?

Thanks.

0 Kudos
2 Replies

383 Views
jason_nguyen
Contributor I

I'm programming the device using the EzPort module's serial flash programming interface. I programmed the FOPT byte as I programmed the rest of the flash memory. Since this particular byte is in the middle of the flash memory, am I still programming the contents of the device afterwards or does it immediately prevents me from accessing the device through the EzPort?

0 Kudos

383 Views
miduo
NXP Employee
NXP Employee

Hi,

I am not sure how you program the FOPT field? Are you using a debugger or a software driver to program the flash?

If you are using a debugger, then I know that IAR does not allow writes to the flash configuration field by default. They did this in order to reduce the risk of customers accidentally securing devices.

If you are using a software driver, then you should make sure that you erase the sector before attempting to program the flash configuration field. Because the security field has an erased bit in it, the whole sector has to be erased and then the flash configuraton field including the FOPT and security settings can be programmed.

0 Kudos