Writing to NOR Flash

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

Writing to NOR Flash

跳至解决方案
2,079 次查看
rnicolls
Contributor III

Hi,

I'm using the i.MXRT1176 and am planning to use the FlexSPI module to write a firmware update to the external NOR Flash. The Application will be running from this same external memory, however, the update will be written to a different section. I haven't used an MCU with external program memory before, so it's unclear to me if I can write to it while executing the application. 

Can I simply write to the Flash or would I have to execute the program from RAM while writing?

Thanks.

标记 (1)
0 项奖励
回复
1 解答
2,040 次查看
rnicolls
Contributor III

Hi,

I made a mistake and didn't actually place the linkscripts folder in the same location as the project files. I was able to place the functions into RAM.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
2,074 次查看
jay_heng
NXP Employee
NXP Employee

If your selected flash doesn't support Read-While-Write feature, then you have to execute the program from RAM while writing. otherwise you can simply write to the Flash (code in one block, to write another block).

You can refer to below example, for XIP build, it relocates flexspi operation code in RAM (MIMXRT1176xxxxx_cm7_flexspi_nor.icf), as the default flash in RT1170-EVK doesn't support Read-While-Write

\SDK_2.12.0_MIMXRT1170-EVK\boards\evkmimxrt1170\driver_examples\flexspi\nor\polling_transfer

 

initialize by copy {
  readwrite,
  /* Place in RAM flash and performance dependent functions */
  object flexspi_nor_flash_ops.o,
  object fsl_flexspi.o,
  section .textrw
};

 

i

0 项奖励
回复
2,054 次查看
rnicolls
Contributor III

Thank you for the helpful reply.

I've taken the linker script templates from the example you mentioned and modified with files I wish to place into RAM. They're located within a linkscripts folder within the project directory, as mentioned in Section 17.14.2 of the MCUXpresso User Guide. It looks like the functions are still being placed in Flash. Is there another step I've missed?

0 项奖励
回复
2,050 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi @rnicolls ,
Thanks for your reply.
To provide the fastest possible support, I'd highly recommend you refer to the polling_transfer demo for MCUXpresso IDE.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 项奖励
回复
2,045 次查看
rnicolls
Contributor III

Hi,

Where do I go for this demo? Do you mean the flexspi_polling_transfer example provided by the SDK?

Thanks,

Rory

0 项奖励
回复
2,041 次查看
rnicolls
Contributor III

Hi,

I made a mistake and didn't actually place the linkscripts folder in the same location as the project files. I was able to place the functions into RAM.

0 项奖励
回复