Code downloaded to LPC4370flash is copied to run on SRAM

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

Code downloaded to LPC4370flash is copied to run on SRAM

510 Views
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!

Labels (1)
0 Kudos
Reply
2 Replies

491 Views
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 Kudos
Reply

452 Views
ALOONG
Contributor I

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

0 Kudos
Reply