After QSPI boot from External Flash, QSPI not used for write/read operation while runtime

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

After QSPI boot from External Flash, QSPI not used for write/read operation while runtime

Jump to solution
1,392 Views
ShadowShooTR
Contributor III

Hi all,

When I run on the SRAM, I can use the QSPI NOR Flash for calibration data write/read operation.

However when I flash the code and setting up the BMODE1 is 1 and BMODE2 is 0 which is boot from external memory using RCON configuration, It boots up properly but once calling a QSPI read function it goes timeout and crashes. 

What are the possible solutions? 

 

 

 

0 Kudos
Reply
1 Solution
944 Views
ShadowShooTR
Contributor III

Hello Daniel,
I couldn't chance to write to you. My project was changed so I jumped into different problems, I apologize for that.

Code address and calibration address were separate in the project (linker). When I want to write or erase the calibration value, I don't erase code address area. I have checked it.

For this solution: "When I use SDR configuration, it didn't work. However, DDR configuration works properly. "
-> FLS initialization phase, I have used command messages for initializing the ex-flash. And this is arranged for DDR configuration.
I don't remember whether I have checked the example code's linker section or not, when I find opportunity to check, I will go back and try this example code as you said.

Thank you so much for your interest and help.
Best Regards,
Halil

View solution in original post

0 Kudos
Reply
6 Replies
1,300 Views
ShadowShooTR
Contributor III

Hi Mr Daniel,

I use S32G-VNP-RDB2 eval board which has S32G274A chip and MX25UW51245G External Nor Flash.
I also use Mcal_S32x , SW32G_RTD_4.4_3.0.2_HF01 library. In this MCAL, I use FLS, FEE libraries " Fls_TS_T40D11M30I2R0 and Fee_TS_T40D11M30I2R0".
I use S32DS 3.5 IDE version.

When the platform is set to boot from RCON, I
I implement UART module for debugging to see which init phase goes timeout and then I found the call stack like :
Fls_Init()-> Fls_IPW_Init() -> Fls_IPW_InitMemories() -> Qspi_Ip_Init 

ShadowShooTR_3-1692347944179.png

In the Qspi_Ip_InitProtection function, 

ShadowShooTR_4-1692348021424.png

this status is returned as timeout "STATUS_QSPI_IP_TIMEOUT"

 

--> Before the proceeding get and set protection phase on flash , it ensures that the previous command is completed.

Previous command is came from Qspi_Ip_InitDevice function.

ShadowShooTR_5-1692348219360.png

 

I mean before the Qspi_Ip_InitProtection function, Qspi_Ip_ControllerInit function is called. There are lots of QSPI operation handled in this function. After that Qspı_Ip_InitProtection function is called and in this function it waits until the previous command is completed. But it is not. It goes timeout.

 

When I run the platform on SRAM, it is initialized properly. However when I try to run on FLASH, it is not.

 

Could you please help me ? 

@Daniel-Aguirre 

 

 

 

 

 

0 Kudos
Reply
1,260 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We may have missed if you said it or not, but have you used any of the available examples?

We are using the "Qspi_Ip_Example_S32G274A_M7" example which provides the following result (under SRAM):

DanielAguirre_0-1692644655625.png

It writes 128 bytes to the address 4096 decimal (0x1000) under the NOR Flash. We modified the example prior to flashing it to the S32G2-RDB2 platform, where the first value to be written is 2 instead of 0, then continue counting up (in other words, all values will have an offset of 2 decimal). Once we flash the example with this modification (using an IVT) we see the following outcome:

DanielAguirre_1-1692644782285.png

Which we correctly see the offset we provided to the example.

As a note, we obtain the Flash dump from S32 Flash Tool, we set the following range:

DanielAguirre_2-1692644904070.png

That is why the first address is 0x0 under our images.

In summary, we are not seeing the behavior you are seeing. As said in the beginning, are you using a provided example?

Please, let us know.

0 Kudos
Reply
1,231 Views
ShadowShooTR
Contributor III

Hi 

Thank you for your generosity in sharing such valuable insights and information.

Yes I used Qspi_Ip_Example_S32G274A_M7.

An update ! 

I noticed that, when I produce the blob image from binary, I select  S32G274_QuadSPI_133MHz_SDR_configuration.  

a.PNG

And once I flash the board, this problem occurs. 

However when I select S32G274_QuadSPI_133MHz_DDR_configuration, the initialization phase is passed properly. Now I'm testing and trying to understand why.

Also the FLS configuration is the exactly the same as the example which you've mentioned Qspi_Ip_Example_S32G274A_M7.

Could you please help me to understand this ? 

Best Regards,

Halil 

@Daniel-Aguirre 

 

0 Kudos
Reply
1,220 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Could be a problem of the address where code is writing to. We have tried to use the SDR QSPI configuration and see no problem but moved the JOB_ADDRESS to 0x250000:

DanielAguirre_0-1692822265262.png

Since this address is not occupied by our application, it is not being erased, for which we need to erase this sector manually prior to executing the code.

Also, we modified the linker file as follows, for us to not use QSPI configuration to confirm the functionality without reconfiguration under the BootROM stage:

DanielAguirre_1-1692822331169.png

This same linker is used once we add the SDR configuration, we don't see any difference.

As for the configuration, should be, since we understand both provide the same functionality. Seems to us that the write address has changed, so it should be take into account.

Please, let us know.

 

945 Views
ShadowShooTR
Contributor III

Hello Daniel,
I couldn't chance to write to you. My project was changed so I jumped into different problems, I apologize for that.

Code address and calibration address were separate in the project (linker). When I want to write or erase the calibration value, I don't erase code address area. I have checked it.

For this solution: "When I use SDR configuration, it didn't work. However, DDR configuration works properly. "
-> FLS initialization phase, I have used command messages for initializing the ex-flash. And this is arranged for DDR configuration.
I don't remember whether I have checked the example code's linker section or not, when I find opportunity to check, I will go back and try this example code as you said.

Thank you so much for your interest and help.
Best Regards,
Halil

0 Kudos
Reply
1,349 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Could you please provide the following information?

  • Are you using an NXP platform? If so, which one?
  • Which RTD version are you using?
  • Which IDE version are you using?

Also, how are you verifying that the QSPI goes timeout when your platform is set to boot from RCON?

Please, let us know.

0 Kudos
Reply