Code downloaded to LPC4370flash is copied to run on SRAM

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

Code downloaded to LPC4370flash is copied to run on SRAM

506 次查看
ALOONG
Contributor I

I now find a problem, I use LPC4370 MCU HSADC+DMA, in the simulation code, the code is running on SRAM(0x10000000), at this time my HSADC speed can really reach 80MHZ, But if I download the program to flash(0x14000000) without emulation, HSADC speed is only about 60MHZ, I look for the relevant information, the code running on ROM and RAM running code rate is indeed there is a difference, RAM running code faster. Now want to copy the code on the ROM to run on RAM, tried a lot of methods are not successful, have friends do similar things, hope to get your help, thank you first here!

标签 (1)
0 项奖励
回复
2 回复数

487 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @ALOONG 

The issue you're encountering is quite common when dealing with high-speed peripherals like the HSADC on microcontrollers. The difference in performance between running code from SRAM and Flash is due to the access times and the memory architecture. Flash memory typically has higher latency compared to SRAM, which can result in slower execution speeds.

In MCUXpresso IDE, to copy and execute code from SRAM, try the following configuration

ram.jpg

 

BR

Alice 

 

0 项奖励
回复

448 次查看
ALOONG
Contributor I

Thank you brother Alice_Yang, I am trying to use MCUXpresso IDE, previously I used IAR.

0 项奖励
回复