How to use Flashx in MQX4.1

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

How to use Flashx in MQX4.1

跳至解决方案
1,678 次查看
小勇邹
Contributor II

How to use Flashx in MQX4.1?

I do not know how to use the API in the Flashx. Is there any source code example?

0 项奖励
回复
1 解答
1,431 次查看
daweiyou
NXP Employee
NXP Employee

Hi:

The sample code is located in:

Freescale_MQX_4_1\mqx\examples\flashx

Dawei You(尤大为)

Field Application Engineer

Freescale Semiconductor (China) Ltd - Nanjing Branch.

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,432 次查看
daweiyou
NXP Employee
NXP Employee

Hi:

The sample code is located in:

Freescale_MQX_4_1\mqx\examples\flashx

Dawei You(尤大为)

Field Application Engineer

Freescale Semiconductor (China) Ltd - Nanjing Branch.

0 项奖励
回复
1,431 次查看
小勇邹
Contributor II

Hello,

Is it necessary to erase the flash before writing data to the flash?

I do not find the erasing command before writing data to the flash in the examples(Freescale_MQX_4_1\mqx\examples\flashx).

0 项奖励
回复
1,431 次查看
daweiyou
NXP Employee
NXP Employee

Hello Robin:

Yes, it need erase before write;

But BSP driver have done these works.

Dawei You(尤大为)

0 项奖励
回复
1,431 次查看
小勇邹
Contributor II

Hello Dawei,

The <K64 Sub-Family Reference Manual> describes that "the smallest portion of the program flash memory that can be erased is 4KB".If I only

write 32 Bytes data,it will affects the data in the 4KB memory.Is it right?

0 项奖励
回复
1,431 次查看
daweiyou
NXP Employee
NXP Employee

Yes, The flashhx driver copy old data and merge new data, erase whole sector and re-write the sector;

Dawei You(尤大为)

0 项奖励
回复
1,431 次查看
小勇邹
Contributor II

I get it.Thank you.

0 项奖励
回复