FlexRAM reallocate code error

Showing results for 
Search instead for 
Did you mean: 

FlexRAM reallocate code error

Contributor III


I'm having problem to configure the FlexRAM in MIMXRT1021DAG4A, based on AN12077 Rev 2


I have modified memory as per requirement but facing compilation error in reallocate code. Earlier i tried to as mention in AN12077 Rev 2 doc but in that some instruction error comes like MOV32 and so on.

Please see below error


Workspace is attached.

Labels (1)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport


Reallocating the flexram has to be done before the flexram is initialized, it's recommended that you do this on the ResetISR that you will find on the startup file of the SDK examples. Where are you reallocating the flexram? 

Keep in mind that you need to reserve at least 64KB of OCRAM for the ROM bootloader. 

A proper way to achieve this on MCUXpresso IDE would be with the following code at the beginning of the ResetISR. 

    __asm (".syntax unified\n"

            "LDR     R0, =0x400ac044\n"

            "LDR     R1, = PUT YOUR BANK CONFIGURATION HERE\n"//FlexRAM configuration

            "STR     R1,[R0]\n"

            "LDR     R0,=0x400ac040\n"

            "LDR     R1,=0x04\n"

            "LDR     R3,[R0]\n"

            "ORR     R2,R1,R3\n"

            "STR     R2,[R0]\n"

    ".syntax divided\n");

Have a great day,

- 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 Kudos