Running S32E288 code from QSPI

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

Running S32E288 code from QSPI

Jump to solution
1,465 Views
HiddenSquid
Contributor III

Hello,

My setup:
S32DS 3.6.4
S32 Flash Tool
S32 Debug Probe
S32E288-975EVB

I have a problem running a simple LED blinking code from QuadSPI Serial Flash with the S32E288-975EVB. 

The code runs and builds with no issues when I use the S32 Debug Probe "S32E288_FreeRTOS_M33_Debug_RAM_S32Debug".

The problem:

I use the IVT tool to generate a BLOB. The BLOB contains:
1. the IVT image - I set the boot target as System Manager M33
2. a DCD file - for initialising RAM
3. The Application Bootloader binary - The .elf file format is too large to use as the application bootloader, which is why I use the raw binary. As I understand, the .elf adds some additional debug information, but shouldn't modify the code itself.

I then use the S32 Flash Tool to flash my BLOB on the board at location 0x0000_0000 (The start of QuadSPI_flash).

When I power on the board and attach to it using the S32 Debug Probe, I can see, that the Program Counter has gotten stuck at 0xefff_fffe, which seems to be outside the address range in general..? Also, when I attach to the board and set the program counter to the RAM_START, then everything seems to run fine at first, but at some point, the program counter ends up again at 0xefff_fffe. The Disassembly fails to read the command at that location.  

Where or how can I find what leads to this erratic program counter value or does the value itself already somehow give an indication of the error?

I am also using freeRTOS, should that change anything in the bring up sequence?

What does the DEBUG_RAM version do extra, that my application bootloader or BLOB doesn't?

When writing my own application bootloader, what steps should I write in to my initialization script and what does the compiler take care of? For Example, do I need to initialize stack pointer, do I need to initialize any other peripheral besides RAM?

 

0 Kudos
Reply
1 Solution
1,131 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Please try to set the RAM entry pointer as the following picture, it is in the .map file.

BR

Joey

View solution in original post

0 Kudos
Reply
7 Replies
1,440 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Sorry for the reply late.

1.Could you please check your boot mode from QSPI is normal?

2.Do you boot another demo to generate Blob? Such as the Uart/LED demo in RTD.

3.Also, could you share your configuration of IVT?

BR

Joey

0 Kudos
Reply
1,432 Views
HiddenSquid
Contributor III

Hey @Joey_z ,

I will share most of my project with you. I have tried to make it as simple as possible for the time being, but the issue remains.

I believe my board works fine, as I previously had the greenVIP demo running and booting successfully from flash. For BOOT_CFG pins, dip switches at index [2] and [3] are set 1 for booting from flash.

I managed to step through the code at some point, when I manually overwrite the XPSR register. Could that be part of the issue?

0 Kudos
Reply
1,427 Views
HiddenSquid
Contributor III

I have concluded, that the issue is in fact from the XPSR register. I don't have the T flag set and the ISR_NUMBER indicates a hard_fault, but for some reason I never really get to the hard fault. Also I don't understand, why or when does the T flag get unset?

0 Kudos
Reply
1,398 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Thank you for your reply.

How do you set the start/entry pointer? it also would seem that the pointer is not configured correctly.

BR

Joey

0 Kudos
Reply
1,389 Views
HiddenSquid
Contributor III

I set the entry and start pointer both to 0x2500_0000, which is the start of RAM, which I have initalised with the DCD.
I have also confirmed that the entry pointer gets correctly set by checking the MC_ME.PRTN0_CORE0_ADDR register, which has a value of 0x2500_0000.

But it still doesn't explain how the Program Counter ever reaches 0xefff_fffe or when or how does the T flag get cleared?

0 Kudos
Reply
1,132 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Please try to set the RAM entry pointer as the following picture, it is in the .map file.

BR

Joey

0 Kudos
Reply
1,376 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Thank you for your reply and information.

I will help you to check this issue and will reply to you as soon as if I get result.

BR

Joey

0 Kudos
Reply