I'm integrating flexspi nor polling code in lpuart interrupt handler code (my base code), I'm facing issue here while debugging it is going into hard fault error in flexspi_nor_flash_init(EXAMPLE_FLEXSPI);
can you please check this issue because i don't see any changes in configuration.
Board: IMXRT1020, I'm using latest SDK example code.
Thanks,
Shealtiel
Hi @Shealtiel
Can you use a debugger like SEGGER J-Link debugger to set breakpoints and step through your code?
This will allow you to see exactly where the program is failing.
Or add print statements in your code to output the values of variables and the status of operations.
This can help you identify where things start to go wrong.
Hope this will help you.
BR
Hang
I'm getting 0x3 fault (interrupt program status register) and getting hang in
FLEXSPI_Init(base, &config);
Thanks
Shealtiel
Hi @Shealtiel
I tried to reproduce your question. I add FLEXSPI related files based on lpuart_interrupt_transfer example.
And i add flexspi_nor_flash_init(FLEXSPI) in the lpuart interrupt function. I did not add flexspi related pin initialization.
You can refer to the picture.
It can work without any mistakes.
So I think there may be some issues with your code, please double check it.
Hope this will help you.
BR
Hang
Hi @Shealtiel
I tested your project on my board. I have encountered the same issue as you. And I ported the code in my own project. The same code works on IAR but not on MCUXpresso. I will investigate this issue.
There are two workaround.
You can run your project using IAR IDE.
Or you can add lpuart polling code in flexspi_polling example on MCUXpresso.
I have tested both methods and they can work.
And i will continue investigate the issue.
Hope this will help you.
BR
Hang
Hi @Harry_Zhang
Thank you for the quick response.
I have tried merging Lpuart code into flexspi code but I'm using custom board there I'm facing issue in Lpuart I'm not able to receive or transmit the data and it hangs in PRINTF debug console.
But separately when I check Lpuart and flexspi both are working, Facing issue after merging the code in custom board.
Checked all the register, pins, schematic all are proper.
But it works in EVK-MIMXRT1020.
Thanks
Shealtiel
Hi @Harry_Zhang
Can you send the IAR IDE working code so that I can also try it from my side.
Thank you
Shealtiel