S32G2/G3 DDR Initialization on Cortex - M7

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

S32G2/G3 DDR Initialization on Cortex - M7

709 Views
arun_belamge
Contributor III

Hello All.

I want to place a part of my code in the external DDR RAM i.e., ORIGIN = 0x80000000, LENGTH = 0x40000000 (1GB). 

I am running a Baremetal application on the Cortex - M7 core. 

I am unable to figure out how to ddr_init() and how to use the DDR Config Tool provided in the S32DS 3.6.

There is no in detail documentation / training on the same.

Please guide me on how to enable the DDR memory for Cortex - M7 and the initialization for the same.

Thanks in advance.

 

BR

Arun 

0 Kudos
Reply
13 Replies

681 Views
Joey_z
NXP Employee
NXP Employee

hi,arun_belamge

Thank you for contacting us.

Could you share more information with us?

Do you use the S32G2 or S32G3? Which version of RTD are you using?

BR

Joey

 

0 Kudos
Reply

673 Views
arun_belamge
Contributor III

Hi Joey.

Thank you for the response.

Following are the details,

1. Board: S32G-VNP-RDB3 (S32G399A-RDB) (Primarily working on this)

2. Board: S32G-PROCEVB3-S (S32G274A-EVB) (Will try on this as well)

3. S32DS v3.6.0

4. RTD: S32_RTD_5_0_0_QLP03_D2505_ASR_REL_4_4_REV_0000_20250530

 

BR

Arun

0 Kudos
Reply

645 Views
Joey_z
NXP Employee
NXP Employee

Hi, arun_belamge

Thank you for your reply.

We have supported the similar question before; you can try to refer to this link:  

Solved: Initialization LPDDR on M7_0 core of S32G2 - NXP Community

You can tell me if it has help with you. If you still need to help for this question, you can contact me any time. 

BR

Joey

0 Kudos
Reply

592 Views
arun_belamge
Contributor III

Hello Joey.

Is there anything similar for the S32G399A-RDB3 board?

Currently, I have to work on the G3 board and using the above Diagnostic package, I am only able to build S32G2 tests and not G3 tests.

If i try to copy the DDR APIs to my existing project, I am having issues with conflicting header files such as StandardTypes.h and StdTypes.h.

Is there any simple straight forward way to initialize DDR memory controller and place my code on it?

Thank you.

 

BR

Arun

0 Kudos
Reply

563 Views
Joey_z
NXP Employee
NXP Employee

hi,arun_belamge

Sorry for that we do not have the direct guide for S32G3.

You also can try to refer to s32g2 reference to create DDR code for using S32G3.

Also, you can refer to the AN12848 to find more DDR information. About how to use the DDR Tool.

Joey_z_0-1761793736240.png

AN12848: DDR Initialization and calibration on the S32G2 Vehicle Network Processor Application Note

Hope this can help you.

BR

Joey

 

0 Kudos
Reply

439 Views
arun_belamge
Contributor III

Hello Joey.

Sorry for the late response.

I compiled and built the Diagnostics CM7 test for S32G2 with the Linflexd_UART and LPDDR4 Tests enabled, disabling other tests.

After successfully building and creating the blob.bin for the SD card and flashing it, I am not able to see any logs/print on the console.

Can you please help?

Thanks.

BR

Arun

0 Kudos
Reply

422 Views
Joey_z
NXP Employee
NXP Employee

hi,arun_belamge

Thank you for your reply.

Could you share more information with me about apply the blob.bin? 

How do you create the blob.bin and set the load adderss?

Also, do you have any debugger for this application? you can try to use the debugger to debug it and observe the UART output informaiton.

Hope this can help you.

BR

Joey

0 Kudos
Reply

413 Views
arun_belamge
Contributor III

Hi Joey.

I followed the document, S32G-VNP-EVBx Diagnostics (Document identifier: S32GVNPEVBXDGUG).

Using this, I created the blob.bin as follows:

arun_belamge_0-1762314941982.png

Set both RAM start pointer and RAM entry pointer to 0x34000000. This value comes from the value set in the linker file.
Set the Code length to 0x300000 and the Start address to 0x2000.

And, No I do not have any debugger currently at my disposal.

Thanks.

 

BR

Arun

0 Kudos
Reply

399 Views
Joey_z
NXP Employee
NXP Employee

hi,arun_belamge

Could you try to use only the UART demo for the SD boot? It is the better way to check the issue if cause by boot step.

BR

Joey

0 Kudos
Reply

388 Views
arun_belamge
Contributor III

Hi Joey.

The UART demo also seems to not work on the G2 board.

I suspect, its the default Linflexd_UART_1 channel which is not present on the S32G-PROCEVB-S processor board ONLY. I do not have the evaluation board.

Please clarify, the UART present on the board is J58 and not J1 which is given in the example project.

If thats the case, how do I initialize the UART0, J58 and print on the console?

Thanks.

BR

0 Kudos
Reply

368 Views
Joey_z
NXP Employee
NXP Employee

hi,arun_belamge

Thank you for your reply.

The demo of Linflexd_Uart_Ip_Example_S32G274A_M7 uses the RDB2 board.

Joey_z_0-1762396404671.png

And it uses the J1 for UART1 as the following picture.

Joey_z_1-1762396422450.png

Joey_z_2-1762396434316.png

Hope this can help you.

BR

Joey

 

0 Kudos
Reply

356 Views
arun_belamge
Contributor III

Hi Joey.

Thanks for pointing it out.

But, in the diagnostic test project, LinflexD_UART_0 i.e., J58 is being used to print on the console.

arun_belamge_0-1762400898045.png

So, it should have worked...

Is the Baud rate:9600 or 27210884bps as given in the diagram?

Can i flash the app to QSPI flash instead of SD card?

Thank you.

BR

Arun

 

0 Kudos
Reply

190 Views
Joey_z
NXP Employee
NXP Employee

hi,arun_belamge

Thank you for your reply.

The diagnostic of your showing if for EVB board, and the RTD demo is for RBD board, so it has the different hardware setting.

Yes, you can try to flash the app to QSPI flash instead of SD card. You can try to refer to this link:

Getting Started with the S32G Reference Design Board 2 for Vehicle Network Processing | NXP Semicond...

Getting Started with the S32G Evaluation Board for Vehicle Network Processing | NXP Semiconductors

Joey_z_0-1762481696975.png

Hope this can help you.

BR

Joey

0 Kudos
Reply