S32K312 Enabling Flexio DMA Drive Module Causes RAM Address Runaway

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K312 Enabling Flexio DMA Drive Module Causes RAM Address Runaway

ソリューションへジャンプ
1,951件の閲覧回数
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,859件の閲覧回数
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,891件の閲覧回数
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,883件の閲覧回数
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,832件の閲覧回数
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,772件の閲覧回数
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,860件の閲覧回数
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 件の賞賛
返信