MIMXRT1166 and W9812G6KB SDRAM errors

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

MIMXRT1166 and W9812G6KB SDRAM errors

Jump to solution
3,709 Views
tbonkers
Contributor III

I have a custom board which uses MIMXRT1166 and W9812G6KB SDRAM at 166 MHz. I've configured the DCD to align the SDRAMCRx settings with the specific values requested by the SDRAM datasheet. DQS pin is not routed on the board.

My application is using Zephyr and SDRAM is utilized for data and application heap/stacks. After a few minutes of running, the application crashes with different error messages:

[00:08:10.517,000] <err> os: ***** USAGE FAULT *****
[00:08:10.525,000] <err> os:   Illegal use of the EPSR

[00:18:33.709,000] <err> os: ***** USAGE FAULT *****
[00:18:33.717,000] <err> os:   Attempt to execute undefined instruction

[00:01:58.470,000] <err> os: ***** USAGE FAULT *****
[00:01:58.478,000] <err> os:   Unaligned memory access

 

I've tested the SDRAM by running a bare-metal application that writes a pattern, then checks it - runs for hours with no issues. 

I've spent a lot of time tweaking SEMC parameters with no success. From what I can tell, wrong values are popped out of the stack, however the crash happens at a different place every time and I can't find a pattern to it. 

I've spent a lot of time chasing the issue and will really appreciate any pointers. 

0 Kudos
Reply
1 Solution
3,374 Views
tbonkers
Contributor III

Hi @Kan_Li ,

I have a lead which points to firmware as the culprit. I've been using Zephyr v3.7.1 LTS up to now, yesterday I switched to Zephyr v4.2.99, and left two boards running overnight, and they run with no problems.

Thanks for you help.

 

View solution in original post

13 Replies
3,675 Views
tbonkers
Contributor III

Hi @Kan_Li ,

The code does not attempt to read or write the EPSR, and the application runs in XIP mode. I don't have access to EVK but I have a previous board revision which uses another SDRAM chip, and the application runs with no problems. This points to SDRAM misconfiguration or hardware problems. 

The exceptions are different most of the time and they occur in different places. Here's an example:

 

[00:26:09.898,000] <err> os: ***** MPU FAULT *****
[00:26:09.906,000] <err> os:   Instruction Access Violation
[00:26:09.914,000] <err> os: r0/a1:  0x00000001  r1/a2:  0x80101c60  r2/a3:  0x80101c60
[00:26:09.925,000] <err> os: r3/a4:  0x80101c60 r12/ip:  0x8012b4bc r14/lr:  0x300335ad
[00:26:09.936,000] <err> os:  xpsr:  0x20000246
[00:26:09.943,000] <err> os: s[ 0]:  0x80101c60  s[ 1]:  0x800026c4  s[ 2]:  0x00000000  s[ 3]:  0x3005c74c
[00:26:09.955,000] <err> os: s[ 4]:  0x3005c730  s[ 5]:  0x30031fef  s[ 6]:  0x80082460  s[ 7]:  0x00072300
[00:26:09.968,000] <err> os: s[ 8]:  0x00000038  s[ 9]:  0x3000debb  s[10]:  0x8012b4c8  s[11]:  0x3000a52f
[00:26:09.981,000] <err> os: s[12]:  0x00000000  s[13]:  0xfffffffd  s[14]:  0xaaaaaaab  s[15]:  0xaaaaaaab
[00:26:09.993,000] <err> os: fpscr:  0xaabaaaaa
[00:26:10.000,000] <err> os: Faulting instruction address (r15/pc): 0x80101c60
[00:26:10.010,000] <err> os: >>> ZEPHYR FATAL ERROR 20: Unknown error on CPU 0
[00:26:10.020,000] <err> os: Fault during interrupt handling

[00:26:10.029,000] <err> os: Current thread: 0x80101c60 (lvgl_handler_tid)
[00:26:10.039,000] <err> os: Halting system

 

The PC points to SDRAM, which is odd because the application is not supposed to execute any functions from SDRAM. Some of the registers contain a suspicious value of 0xaaaaaaab, which may mean stack poisoning as Zephyr fills stacks with 0xaaaaaaaa pattern. 

When I vary the SDRAM timing parameters in my DCD file, the errors tend to increase in frequency - again, that makes me think the SDRAM is the issue, however I can't pinpoint the exact reason.

I've tried lowering the SDRAM speed but crashes still appear. Another thing I've noticed is that AXIBUSERR in SEMC_INTR is set - that's not happening when running the bare metal application.

0 Kudos
Reply
3,671 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tbonkers ,

 

Thanks for the clarification! Is it possible to share part of your schematics for a review? especially regarding the connection between RT and SDRAM.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,670 Views
tbonkers
Contributor III

Hi @Kan_Li ,

Below is the SDRAM schematic:

tbonkers_0-1758273258227.png

tbonkers_1-1758273315525.png

 

0 Kudos
Reply
3,618 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tbonkers ,

 

Thanks for the sharing !  The SDRAM schematics has been double checked by me and the expert, and we could not find any issue within it, is it possible to share your DCD file as well? and did your application code initialize the SEMC as well? Please kindly calrify.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,583 Views
tbonkers
Contributor III

Hi @Kan_Li , thank you for looking into the schematics.

I use DCD for SEMC initialization only, the SEMC is not touched from the application. Please see attached dcd.c file.

 

 

0 Kudos
Reply
3,553 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tbonkers ,

 

Thanks for the info! Your DCD file has been reviewed and updated by the expert, please kindly have it from the attachment.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,480 Views
tbonkers
Contributor III

Hi @Kan_Li ,

The updated DCD file has made no difference and the crashes persist. 

0 Kudos
Reply
3,477 Views
Kan_Li
NXP TechSupport
NXP TechSupport

 Hi @tbonkers ,

 

Thanks for the info! Is it possible to put the data and heap/stack in another place such as SRAM? if the problem persists , that means the root cause is on application side, not the SDRAM. 

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,463 Views
tbonkers
Contributor III

Hi @Kan_Li ,

When running an application that does not use SDRAM I don't see any errors. I tested by using OCRAM for data, and writing/reading patterns into SDRAM - works with no issues, so I think I can safely conclude the problem is SDRAM-related. 

We have changed the SDRAM to another chip (ISSI) and the problem persists. I still can't be 100% sure it's a hardware/routing issue as reading and writing tests pass. Do you have any ideas on what tests to run to isolate the problem further?

 

0 Kudos
Reply
3,445 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tbonkers ,

 

The attached patch is some code for SDRAM stress test, you may use "git apply" command with this patch in any folder to have the source files to be included in your project.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,375 Views
tbonkers
Contributor III

Hi @Kan_Li ,

I have a lead which points to firmware as the culprit. I've been using Zephyr v3.7.1 LTS up to now, yesterday I switched to Zephyr v4.2.99, and left two boards running overnight, and they run with no problems.

Thanks for you help.

 

3,286 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tbonkers ,

 

Great to know that! Please kindly let me know if you have any question.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
3,691 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tbonkers ,

 

Is there any attempt from your app code to read/write the EPSR register? especially the T bit in this register, because Attempting to execute instructions when the T bit is 0 results in a fault or lockup.  I am wondering if the undefined instruction issue is also due to that, and unaligned memory access issue as well. 

 

I assume you are using a custom board and your project runs in XIP mode, right? Not sure if you have RT1160EVK as well, if yes, you may try your application code on the EVK and check if the result is the same, that would help to locate where the root cause is, hardware or software.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2172105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2172105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20a%20custom%20board%20which%20uses%26nbsp%3BMIMXRT1166%20and%20W9812G6KB%20SDRAM%20at%20166%20MHz.%20I've%20configured%20the%20DCD%20to%20align%20the%20SDRAMCRx%20settings%20with%20the%20specific%20values%20requested%20by%20the%20SDRAM%20datasheet.%20DQS%20pin%20is%20not%20routed%20on%20the%20board.%3C%2FP%3E%3CP%3EMy%20application%20is%20using%20Zephyr%20and%20SDRAM%20is%20utilized%20for%20data%20and%20application%20heap%2Fstacks.%20After%20a%20few%20minutes%20of%20running%2C%20the%20application%20crashes%20with%20different%20error%20messages%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5B00%3A08%3A10.517%2C000%5D%20%3CERR%3E%20os%3A%20*****%20USAGE%20FAULT%20*****%0A%5B00%3A08%3A10.525%2C000%5D%20%3CERR%3E%20os%3A%20%20%20Illegal%20use%20of%20the%20EPSR%0A%0A%5B00%3A18%3A33.709%2C000%5D%20%3CERR%3E%20os%3A%20*****%20USAGE%20FAULT%20*****%0A%5B00%3A18%3A33.717%2C000%5D%20%3CERR%3E%20os%3A%20%20%20Attempt%20to%20execute%20undefined%20instruction%0A%0A%5B00%3A01%3A58.470%2C000%5D%20%3CERR%3E%20os%3A%20*****%20USAGE%20FAULT%20*****%0A%5B00%3A01%3A58.478%2C000%5D%20%3CERR%3E%20os%3A%20%20%20Unaligned%20memory%20access%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EI've%20tested%20the%20SDRAM%20by%20running%20a%20bare-metal%20application%20that%20writes%20a%20pattern%2C%20then%20checks%20it%20-%20runs%20for%20hours%20with%20no%20issues.%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20spent%20a%20lot%20of%20time%20tweaking%20SEMC%20parameters%20with%20no%20success.%20From%20what%20I%20can%20tell%2C%20wrong%20values%20are%20popped%20out%20of%20the%20stack%2C%20however%20the%20crash%20happens%20at%20a%20different%20place%20every%20time%20and%20I%20can't%20find%20a%20pattern%20to%20it.%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20spent%20a%20lot%20of%20time%20chasing%20the%20issue%20and%20will%20really%20appreciate%20any%20pointers.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2175443%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2175443%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EGreat%20to%20know%20that!%20Please%20kindly%20let%20me%20know%20if%20you%20have%20any%20question.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174897%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174897%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EI%20have%20a%20lead%20which%20points%20to%20firmware%20as%20the%20culprit.%20I've%20been%20using%20Zephyr%20v3.7.1%20LTS%20up%20to%20now%2C%20yesterday%20I%20switched%20to%20Zephyr%20v4.2.99%2C%20and%20left%20two%20boards%20running%20overnight%2C%20and%20they%20run%20with%20no%20problems.%3C%2FP%3E%3CP%3EThanks%20for%20you%20help.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174721%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174721%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20attached%20patch%20is%20some%20code%20for%20SDRAM%20stress%20test%2C%20you%20may%20use%20%22git%20apply%22%20command%20with%20this%20patch%20in%20any%20folder%20to%20have%20the%20source%20files%20to%20be%20included%20in%20your%20project.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHope%20that%20helps%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174281%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174281%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EWhen%20running%20an%20application%20that%20does%20not%20use%20SDRAM%20I%20don't%20see%20any%20errors.%20I%20tested%20by%20using%20OCRAM%20for%20data%2C%20and%20writing%2Freading%20patterns%20into%20SDRAM%20-%20works%20with%20no%20issues%2C%20so%20I%20think%20I%20can%20safely%20conclude%20the%20problem%20is%20SDRAM-related.%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20changed%20the%20SDRAM%20to%20another%20chip%20(ISSI)%20and%20the%20problem%20persists.%20I%20still%20can't%20be%20100%25%20sure%20it's%20a%20hardware%2Frouting%20issue%20as%20reading%20and%20writing%20tests%20pass.%20Do%20you%20have%20any%20ideas%20on%20what%20tests%20to%20run%20to%20isolate%20the%20problem%20further%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174072%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174072%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%26nbsp%3BHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20the%20info!%20Is%20it%20possible%20to%20put%20the%20data%20and%20heap%2Fstack%20in%20another%20place%20such%20as%20SRAM%3F%20if%20the%20problem%20%3CSPAN%3Epersists%20%2C%20that%20means%20the%20root%20cause%20is%20on%20application%20side%2C%20not%20the%20SDRAM.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThe%20updated%20DCD%20file%20has%20made%20no%20difference%20and%20the%20crashes%20persist.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2173891%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173891%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20the%20info!%20Your%20DCD%20file%20has%20been%20reviewed%20and%20updated%20by%20the%20expert%2C%20please%20kindly%20have%20it%20from%20the%20attachment.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHope%20that%20helps%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2173351%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173351%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%2C%20thank%20you%20for%20looking%20into%20the%20schematics.%3C%2FP%3E%3CP%3EI%20use%20DCD%20for%20SEMC%20initialization%20only%2C%20the%20SEMC%20is%20not%20touched%20from%20the%20application.%20Please%20see%20attached%20dcd.c%20file.%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2173170%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173170%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20the%20sharing%20!%26nbsp%3B%20The%20SDRAM%20schematics%20has%20been%20double%20checked%20by%20me%20and%20the%20expert%2C%20and%20we%20could%20not%20find%20any%20issue%20within%20it%2C%20is%20it%20possible%20to%20share%20your%20DCD%20file%20as%20well%3F%20and%20did%20your%20application%20code%20initialize%20the%20SEMC%20as%20well%3F%20Please%20kindly%20calrify.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2172684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2172684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EBelow%20is%20the%20SDRAM%20schematic%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22tbonkers_0-1758273258227.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tbonkers_0-1758273258227.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F357736i66907C045178215E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22tbonkers_0-1758273258227.png%22%20alt%3D%22tbonkers_0-1758273258227.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22tbonkers_1-1758273315525.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tbonkers_1-1758273315525.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F357737i4A7B3F2D569F6AB7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22tbonkers_1-1758273315525.png%22%20alt%3D%22tbonkers_1-1758273315525.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2172675%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2172675%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20the%20clarification!%20Is%20it%20possible%20to%20share%20part%20of%20your%20schematics%20for%20a%20review%3F%20especially%20regarding%20the%20connection%20between%20RT%20and%20SDRAM.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2172620%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2172620%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThe%20code%20does%20not%20attempt%20to%20read%20or%20write%20the%20EPSR%2C%20and%20the%20application%20runs%20in%20XIP%20mode.%20I%20don't%20have%20access%20to%20EVK%20but%20I%20have%20a%20previous%20board%20revision%20which%20uses%20another%20SDRAM%20chip%2C%20and%20the%20application%20runs%20with%20no%20problems.%20This%20points%20to%20SDRAM%20misconfiguration%20or%20hardware%20problems.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20exceptions%20are%20different%20most%20of%20the%20time%20and%20they%20occur%20in%20different%20places.%20Here's%20an%20example%3A%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%5B00%3A26%3A09.898%2C000%5D%20%3CERR%3E%20os%3A%20*****%20MPU%20FAULT%20*****%0A%5B00%3A26%3A09.906%2C000%5D%20%3CERR%3E%20os%3A%20%20%20Instruction%20Access%20Violation%0A%5B00%3A26%3A09.914%2C000%5D%20%3CERR%3E%20os%3A%20r0%2Fa1%3A%20%200x00000001%20%20r1%2Fa2%3A%20%200x80101c60%20%20r2%2Fa3%3A%20%200x80101c60%0A%5B00%3A26%3A09.925%2C000%5D%20%3CERR%3E%20os%3A%20r3%2Fa4%3A%20%200x80101c60%20r12%2Fip%3A%20%200x8012b4bc%20r14%2Flr%3A%20%200x300335ad%0A%5B00%3A26%3A09.936%2C000%5D%20%3CERR%3E%20os%3A%20%20xpsr%3A%20%200x20000246%0A%5B00%3A26%3A09.943%2C000%5D%20%3CERR%3E%20os%3A%20s%5B%200%5D%3A%20%200x80101c60%20%20s%5B%201%5D%3A%20%200x800026c4%20%20s%5B%202%5D%3A%20%200x00000000%20%20s%5B%203%5D%3A%20%200x3005c74c%0A%5B00%3A26%3A09.955%2C000%5D%20%3CERR%3E%20os%3A%20s%5B%204%5D%3A%20%200x3005c730%20%20s%5B%205%5D%3A%20%200x30031fef%20%20s%5B%206%5D%3A%20%200x80082460%20%20s%5B%207%5D%3A%20%200x00072300%0A%5B00%3A26%3A09.968%2C000%5D%20%3CERR%3E%20os%3A%20s%5B%208%5D%3A%20%200x00000038%20%20s%5B%209%5D%3A%20%200x3000debb%20%20s%5B10%5D%3A%20%200x8012b4c8%20%20s%5B11%5D%3A%20%200x3000a52f%0A%5B00%3A26%3A09.981%2C000%5D%20%3CERR%3E%20os%3A%20s%5B12%5D%3A%20%200x00000000%20%20s%5B13%5D%3A%20%200xfffffffd%20%20s%5B14%5D%3A%20%200xaaaaaaab%20%20s%5B15%5D%3A%20%200xaaaaaaab%0A%5B00%3A26%3A09.993%2C000%5D%20%3CERR%3E%20os%3A%20fpscr%3A%20%200xaabaaaaa%0A%5B00%3A26%3A10.000%2C000%5D%20%3CERR%3E%20os%3A%20Faulting%20instruction%20address%20(r15%2Fpc)%3A%200x80101c60%0A%5B00%3A26%3A10.010%2C000%5D%20%3CERR%3E%20os%3A%20%26gt%3B%26gt%3B%26gt%3B%20ZEPHYR%20FATAL%20ERROR%2020%3A%20Unknown%20error%20on%20CPU%200%0A%5B00%3A26%3A10.020%2C000%5D%20%3CERR%3E%20os%3A%20Fault%20during%20interrupt%20handling%0A%0A%5B00%3A26%3A10.029%2C000%5D%20%3CERR%3E%20os%3A%20Current%20thread%3A%200x80101c60%20(lvgl_handler_tid)%0A%5B00%3A26%3A10.039%2C000%5D%20%3CERR%3E%20os%3A%20Halting%20system%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FERR%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EThe%20PC%20points%20to%20SDRAM%2C%20which%20is%20odd%20because%20the%20application%20is%20not%20supposed%20to%20execute%20any%20functions%20from%20SDRAM.%20Some%20of%20the%20registers%20contain%20a%20suspicious%20value%20of%200xaaaaaaab%2C%20which%20may%20mean%20stack%20poisoning%20as%20Zephyr%20fills%20stacks%20with%200xaaaaaaaa%20pattern.%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20vary%20the%20SDRAM%20timing%20parameters%20in%20my%20DCD%20file%2C%20the%20errors%20tend%20to%20increase%20in%20frequency%20-%20again%2C%20that%20makes%20me%20think%20the%20SDRAM%20is%20the%20issue%2C%20however%20I%20can't%20pinpoint%20the%20exact%20reason.%3C%2FP%3E%3CP%3EI've%20tried%20lowering%20the%20SDRAM%20speed%20but%20crashes%20still%20appear.%20Another%20thing%20I've%20noticed%20is%20that%20AXIBUSERR%20in%20SEMC_INTR%20is%20set%20-%20that's%20not%20happening%20when%20running%20the%20bare%20metal%20application.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2172400%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1166%20and%20W9812G6KB%20SDRAM%20errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2172400%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EIs%20there%20any%20attempt%20from%20your%20app%20code%20to%20read%2Fwrite%20the%20EPSR%20register%3F%20especially%20the%26nbsp%3B%3CSPAN%3ET%20bit%20in%20this%20register%2C%20because%26nbsp%3BAttempting%20to%20execute%20instructions%20when%20the%20T%20bit%20is%200%20results%20in%20a%20fault%20or%20lockup.%26nbsp%3B%20I%20am%20wondering%20if%20the%20undefined%20instruction%20issue%20is%20also%20due%20to%20that%2C%20and%20unaligned%20memory%20access%20issue%20as%20well.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EI%20assume%20you%20are%20using%20a%20custom%20board%20and%20your%20project%20runs%20in%20XIP%20mode%2C%20right%3F%20Not%20sure%20if%20you%20have%20RT1160EVK%20as%20well%2C%20if%20yes%2C%20you%20may%20try%20your%20application%20code%20on%20the%20EVK%20and%20check%20if%20the%20result%20is%20the%20same%2C%20that%20would%20help%20to%20locate%20where%20the%20root%20cause%20is%2C%20hardware%20or%20software.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E