S32K312 Enabling Flexio DMA Drive Module Causes RAM Address Runaway

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K312 Enabling Flexio DMA Drive Module Causes RAM Address Runaway

跳至解决方案
1,659 次查看
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 项奖励
回复
1 解答
1,567 次查看
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 项奖励
回复
5 回复数
1,599 次查看
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 项奖励
回复
1,591 次查看
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 项奖励
回复
1,540 次查看
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

标记 (1)
0 项奖励
回复
1,480 次查看
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 项奖励
回复
1,568 次查看
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 项奖励
回复