How to relocate code into SRAM in LPC1830/4330

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

How to relocate code into SRAM in LPC1830/4330

1,187 Views
li-chinwang
Contributor II

1.          Since HW I2C Interface is limited in LPC1830, Qisda need SW I2C to simulate I2C Master.

2.          I can use LPC1857 to simulate 100KHz I2C. But it becomes 7Khz I2C Master and cause I2C device has no ACK response.

3.          LPC1830 need to fetch code from QSPI. That’s reason why it causes more time for GPIO Transaction for simulating I2C.

4.          I look forum and try to solve this by relocate SW I2C Source into SRAM for faster speed.

              I have seem the related Q&A for this link

      https://community.nxp.com/thread/426325

      But it relocate all ISR into SRAM. I think my SRAM will full since my code is quiet huge.

      Do you give me suggestion how to relocate partial code into SRAM right all ISR and functions. 

Labels (4)
0 Kudos
Reply
3 Replies

831 Views
li-chinwang
Contributor II

If I like to relocate this function to SDRAM rather than Internal SRAM  (200K) after EMC has been initialized. 

Is that possible? I yes,  how to do it?

0 Kudos
Reply

831 Views
lpcxpresso_supp
NXP Employee
NXP Employee

In the same way, though you will need to ensure that the code that sets up the SDRAM is executed before the code that copies the code from flash into the RAM.

Regards,

MCUXpresso IDE Support

0 Kudos
Reply

831 Views
lpcxpresso_supp
NXP Employee
NXP Employee

If you are using the old LPCXpresso IDE, then see : Relocating code from FLASH to RAM .

If you are using the newer MCUXpresso IDE, then there is an updated version of this information in the supplied MCUXpresso IDE v10.0.2 User Guide, chapter 12 - in particular section 12.11.1,"Relocating code from FLASH to RAM".

If you are not using either of these toolchains, then I suggest that you confirm which toolchain you are using, so that someone can give you appropriate advice.

Regards,

MCUXpresso IDE Support

0 Kudos
Reply