System PLL PFD hardfault error while booting to SDRAM

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

System PLL PFD hardfault error while booting to SDRAM

2,605 Views
KyleHsieh
Contributor I

Hi,

I defined the following symbols to booting to SDRAM in iperf project,

symbol.JPGmemory details.JPGheap and stack.JPG

After the above configs, my project could have more code space to porting other functions.

console.JPG

But we encounter the hardfault error while debugging the project.

hardfault.JPG

This error only can be passed when this config was commented out in CLOCK_InitSysPfd(kCLOCK_Pfd2, 0x12U); //configure system pll PFD2 fractional divider to 18

May I ask why this issue only happend on SDRAM instead internal RAM?

Looking forward your reply.

Thank you.

 

Best Regards.

Kyle

Labels (1)
0 Kudos
Reply
11 Replies

2,470 Views
KyleHsieh
Contributor I

Hi @kerryzhou ,

For now, we could boot to SDRAM by config "Extra linker script input section" as "NCACHE_REGION" intead of "BOARD_SDRAM_NONCACHEABLE" on SDK2.9.3.

Extra linker script input section.JPG
What's the difference between using Region "NCACHE_REGION" and "BOARD_SDRAM_NONCACHEABLE"?

Why did this project(Attachment.zip) config as BOARD_SDRAM_NONCACHEABLE in this case(https://community.nxp.com/t5/i-MX-RT/Load-instructions-into-RAM-from-external-flash-while-executing/...)?


Thank you.

Best Regards.

Kyle

0 Kudos
Reply

2,466 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh ,  

  Please check the MCUXPresso MCU settings, you can find the detail define for the region:

kerryzhou_0-1641980537249.png

Normally, NCACHE_REGION is the memory section in the SDRAM.

When you use the SDRAM, you need to enable the DCD:XIP_BOOT_HEADER_DCD_ENABLE=1 and SKIP_SYSCLK_INIT symbols.

 

 

Wish it helps you!

Best Regards,

kerry

 

0 Kudos
Reply

2,558 Views
KyleHsieh
Contributor I

Hi @kerryzhou ,

Thank you for your support.

I used SDK2.9.1 for test and found "BOARD_USDHCClockConfiguration();" has been removed from main function in SDK2.9.1.

But if I add BOARD_USDHCClockConfiguration() back to set USDHC clock and boot to SDRAM.

This issue still reduplicated.

May I ask how could we config SEMC clock if we would like to boot in SDRAM?

And why did "BOARD_USDHCClockConfiguration();" removed from SDK2.9.1? 

Thank you.

 

Best Regards.

Kyle

0 Kudos
Reply

2,550 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh ,

   The code removed in the new SDK, it should be the SDK team find with that code meet some bugs, so remove it.

  So, I think you don't need to add it, just based on the new SDK project, and work on it, whether you still have the hardfault issues?

Best Regards,

Kerry

   

0 Kudos
Reply

2,546 Views
KyleHsieh
Contributor I

Hi @kerryzhou ,

The CCM clock tree is as below,

clock tree.png

Both USDHC device and SEMC device are connected to PLL2-PFD2.

After the main function boot in SDRAM, the "CLOCK_InitSysPfd(kCLOCK_Pfd2, 0x12U);" set the PLL2-PFD2 clock.

Is this action affect boot in SDRAM?

How could we set the semc clock as PLL3-PFD1 in SDK?

Thank you.

Best Regards.

Kyle

0 Kudos
Reply

2,539 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh ,

   Thanks for your updated information.

   If your SEMC already connected to the PLL2-PFD2, then you change the clock, the SDRAM must be influenced.

  About how to configure the SEMC to use the PLL3-PFD1, do you use the MCUXPresso IDE project, it has the clock CFG, you can use the CFG tool to configure it.

  ConfigTools->clock

 

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos
Reply

2,576 Views
KyleHsieh
Contributor I

Hi @kerryzhou ,

Thanks for your support.

I referenced wiced_iperf_4343W exmaples from SDK2.7.0 and commented "BOARD_USDHCClockConfiguration()" and "CLOCK_InitSysPfd(kCLOCK_Pfd2, 0x12U);" in main.c.

Please referenced the attched file which I added symbol and memory configs for more details.

If you need more informations, please tell me. Thank you.

 

Best Regards.

Kyle

0 Kudos
Reply

2,572 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh ,

  Your SDK is very old, please check the newest SDK2.10.1:

https://mcuxpresso.nxp.com/en/builder?hw=EVK-MIMXRT1060

Whether you still have the issues or not?

  If you use the newest SDK also have the issues, then you can upload your modified project based on the SDK2.10.1, then I will help to check it on my side.

Best Regards,

Kerry

0 Kudos
Reply

2,566 Views
KyleHsieh
Contributor I

Hi @kerryzhou ,

Thanks. I will try the SDK2.10.1 for test.

May I ask is there any project which can replaced "wiced_iperf_4343W" example on SDK2.10.1 ?

We would like to build a project which can cypress WiFi connected over USDHC/SDIO

Thank you.

 

Best Regards.

Kyle

0 Kudos
Reply

2,564 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh ,

  Please test SDK2.9.3, this is the last version that contains your mentioned cypress wifi:

https://mcuxpresso.nxp.com/en/builder?hw=EVK-MIMXRT1060&rel=465

  Please download it, and test this version, whether you can reproduce the issues or not.

  From SDK2.10.0, the cypress wifi is removed, the SDK only add the NXP own wifi chip.

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply

2,581 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh ,

  Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

  Please tell me which detail SDK code you are refering? as we have two iperf project:lwip_iperf and wifi_iperf.

  Please also tell me which detail symbols you have added?

   As you already modified the project name, so I don't know your related SDK code, I just can get the information that you are using RT1060.

  Your hardfault should related to the SDRAM and the cache match issues. 

  You also mentioned, when comment CLOCK_InitSysPfd(kCLOCK_Pfd2, 0x12U); 

  Please also tell me which detail files?  This is related to the SEMC clock, which is the SDRAM clock.

Waiting for your detail information.

 

Best Regards,

Kerry

 

0 Kudos
Reply