Using On-chip SRAM

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

Using On-chip SRAM

637 Views
Devaharsha
Contributor III

Hi,

We are using iMXRT1176. Our requirement is to use on-chip SRAM and QSPI flash. 

 

We are using sd_jpeg example in the SDK and its running perfectly.

There's two icf files given:

1) sdram.icf

2) flexspi_nor_sdram.icf

Using sdram.icf, code is working but its executing from RAM memory and hence it cannot retain code after reset is pressed. Whereas flexspi_nor_sdram.icf can be used to get stored in flash memory.

Correct me if I am wrong, My observation is - 

1) The addresses used are in space of FlexSPI, DTCM, OCRAM2, SEMC0, ITCM

2) My understanding is SEMC0 is directly connected to external SDRAM memory and the space is almost equal to 67 MB

3) On-chip SRAM is only 2MB, then how SEMC0 address space an be replaced? 

0 Kudos
3 Replies

617 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
I hope you are well.

When using external SDRAM to execute the code the image is first copied from flash to SDRAM during boot time.
You can refer to the memory map chapter from the Reference Manual to check the space assigned to each memory. Nor flash is connected to the FlexSPI interface while the external SDRAM is connected to the SEMC interface.

Best regards,
Omar

0 Kudos

609 Views
Devaharsha
Contributor III
Hi Omar,

I have gone through the reference manual memory map chapter. Correct me if I am wrong, but our requirement is to use SRAM instead of SDRAM. The SDRAM address i.e SEM0 address in .icf file is almost equal to 67MB. But SRAM is only 2MB. So, how exactly the .icf file has to be modified?

Best regards,
Devaharsha
0 Kudos

589 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

To prepare your image to run on internal SRAM please follow these steps:

1. Select Project < Edit Configurations … > Debug.
2. Open file MIMXRT10##xxxxx_ram.icf from project root folder and make the following changes:

define symbol m_interrupts_start = 0x00003000;
define symbol m_interrupts_end = 0x000033FF;

define symbol m_text_start = 0x00003400;
define symbol m_text_end = 0x0003FFFF;

3. On multicore processors set the Processor variant in Project > Options... >General Options > Target, for example, Cortex-M7 for iled_blinky_cm7 on RT1176.
4. Save the changes and build the image.

Best regards,
Omar

0 Kudos