Programming FSEC field using Flash Driver

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

Programming FSEC field using Flash Driver

Jump to solution
1,107 Views
saurabhsaxena
Contributor III

Hi,

I have Kinetis K82 board, I am trying to change the FCA my  fields within application.

As far as I know once  these Fields are updated from application by the Bootloader, hence once I am in the application changing these fields will have no impact, but in my application when I try to program this section using the flash drivers, I cannot program this fields.

 

According to AN4507, As it is compulsory to erase the flash sector before programming it again, When I try erase the FCA region suddenly the Security is enabled, which according to me should take effect from the next reset.

Why is this happening.?

I mean I must be able to change this fields till the next reset, hence able to disable and enable security?.

Tags (2)
0 Kudos
Reply
1 Solution
950 Views
saurabhsaxena
Contributor III

The issue was resolved when you use the Flash_Erase() and Flash_Program() APIs rather than flash_mem_write(),

As the flash is FTFA, the operations are performed on Block Sizes.

View solution in original post

0 Kudos
Reply
3 Replies
951 Views
saurabhsaxena
Contributor III

The issue was resolved when you use the Flash_Erase() and Flash_Program() APIs rather than flash_mem_write(),

As the flash is FTFA, the operations are performed on Block Sizes.

0 Kudos
Reply
950 Views
miduo
NXP Employee
NXP Employee

Hello,

Sorry, I am not totally understood your questions. In your statement, "but in my application when I try to program this section using the flash drivers". How you program, I mean what IDE tool are you using? And what is your debugger to erase the flash?

0 Kudos
Reply
950 Views
saurabhsaxena
Contributor III

Hi Fang,

In my application I am using the Flash memory Driver (flash_mem_write() in flash_memory.c) for programming the FCA Fields, the behavior is such that as soon as I write the FSEC Fields (FCA Fields), at that instant device security is enabled, which I expect to be enabled when I perform a next reset of the device.

In simple terms I am programming FCA fields when application is running, so that the device Security settings can be changed without flashing a new image by just performing a reset.

Thanks I hope this helps clear my question.

0 Kudos
Reply