S32K312 Enabling Flexio DMA Drive Module Causes RAM Address Runaway

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

S32K312 Enabling Flexio DMA Drive Module Causes RAM Address Runaway

Jump to solution
1,707 Views
victory
Contributor V

Hi,NXP!

1.S32DS version: 3.5    RTD version: 4.0.0

2. Configuration of linker_flash_s32k312.ld, as shown in Figure 1.

victory_2-1726228276841.png

                           Figure 1

3. When using the flexio DMA example, enable the statement __attribute__ ((section(".bootApp"))) unsigned short g_u2CurrBootOrAppMode in the program. During execution, it was found that the program ran incorrectly, as shown in Figure 2. It was also noted that the bootApp address changed to 0x20408000 (with the map shown in Figure 3), instead of the 0x20417FF0 set by the linker.

victory_0-1726227806996.png

                                   Figure 2

 

victory_3-1726228376529.png

                                      Figure 3

4. Specific code, see attachment

5. Please help confirm what issue caused the section address of bootApp to change.

Noe:The crystal oscillator used in the code is 24MHz.

Regards

Victory

 

 

 

 
0 Kudos
Reply
1 Solution
1,615 Views
victory
Contributor V

Hi,

1.it will be due to SRAM ECC is not initialized for this memory area.
Try to keep ram_rsvd2 at the end of SRAM in linker file
ram_rsvd2 : ORIGIN = 0x20418000, LENGTH = 0 /* End of SRAM */

The problem has been solved

2.But when I enabled the AppCodeIntegrity and FingerPrintTestSN in the code, I found that the address of AppCodeIntegrity changed to 0x5d2016 instead of 0x5d0000, as shown in the link and code below.

victory_0-1726793942683.png

 

victory_1-1726793985806.png

 

3.The code is attached.

 

 

View solution in original post

0 Kudos
Reply
5 Replies
1,647 Views
victory
Contributor V

Hi NXP,

1.The previous issue has been resolved, but after adding the following statement to my main function, it still produces a HardFault.

victory_0-1726662167258.png

2. The code is attached.

0 Kudos
Reply
1,639 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it will be due to SRAM ECC is not initialized for this memory area.
Try to keep ram_rsvd2 at the end of SRAM in linker file
ram_rsvd2 : ORIGIN = 0x20418000, LENGTH = 0 /* End of SRAM */

BR, Petr

0 Kudos
Reply
1,588 Views
victory
Contributor V

could you explain how the "ram_rsvd2 " works?  when after mcu reset, which stage/step ,  the hardware/ software will check this address and do the init operation, thanks

Tags (1)
0 Kudos
Reply
1,528 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

linker defines several symbols used in startup code. Here

PetrS_0-1727082164987.png

Those are used in RamInit code section of startup_cm7.s file

PetrS_2-1727082340935.png

BR, Petr

0 Kudos
Reply
1,616 Views
victory
Contributor V

Hi,

1.it will be due to SRAM ECC is not initialized for this memory area.
Try to keep ram_rsvd2 at the end of SRAM in linker file
ram_rsvd2 : ORIGIN = 0x20418000, LENGTH = 0 /* End of SRAM */

The problem has been solved

2.But when I enabled the AppCodeIntegrity and FingerPrintTestSN in the code, I found that the address of AppCodeIntegrity changed to 0x5d2016 instead of 0x5d0000, as shown in the link and code below.

victory_0-1726793942683.png

 

victory_1-1726793985806.png

 

3.The code is attached.

 

 

0 Kudos
Reply