Programming FSEC field using Flash Driver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Programming FSEC field using Flash Driver

跳至解决方案
1,740 次查看
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?.

标记 (2)
0 项奖励
回复
1 解答
1,583 次查看
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 项奖励
回复
3 回复数
1,584 次查看
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 项奖励
回复
1,583 次查看
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 项奖励
回复
1,583 次查看
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 项奖励
回复