SDK example flash and LWIP hard-fault Hi, When I combine the two SDK examples “frdmimxrt1186_lwip_ipv4_ipv6_echo_freertos_cm33” and “frdmimxrt1186_flexspi_nor_polling_transfer_cm33,” I eventually get a hard fault after executing the function “ FLEXSPI_SoftwareReset(base);” eventually results in a hard fault. I also notice that the “base” address 0x445E0000 changes. I'm using the FRDM-RT1186 EVA kit. What could be causing this? I'm using MCUXpressoIDE_25.6.136. Thank´s for feedback. Re: SDK example flash and LWIP hard-fault Hi Pablo, thank´s to go in contact with me. I use SDK 26.03.00 (928 2026-03 , Manifest Version 3.15.0 I start with "frdmimxrt1186_lwip_ipv4_ipv6_echo_freertos_cm33". This happens consistensly, no specific conditions. I import the files from the example "frdmimxrt1186_flexspi_nor_polling_transfer_cm33" board/hardware_init_Flash.c drivers/fsl_flexspi.c drivers/fsl_flexspi.h source/appFlash/flexspi_nor_flash_ops.c source/appFlash/flexspi_nor_polling_transfer.c board/app.h // this containes both app.h source/lwip_ipv4_ipv6_echo_freertos.c // this includes two function-calls: int main(void) { BOARD_InitHardware(); BOARD_InitHardware_Flash(); main_Flash(); void BOARD_InitHardware_Flash(void) { BOARD_CommonSetting(); // BOARD_ConfigMPU(); // bord.c = identisch mit Lwip prj // BOARD_InitBootPins(); // pin_mux.c "" BOARD_InitFLASHPins(); // BOARD_InitBootClocks(); // clock_config.c "" // BOARD_InitDebugConsole(); // board.c "" } int main_Flash(void) { uint32_t i = 0; status_t status; uint8_t vendorID = 0; // BOARD_InitHardware_Flash(); ... return 1; /* while (1) { } */ } I think that's it. Thank you in advance. Gerd Re: SDK example flash and LWIP hard-fault Hi @GerdMartin,
Could you please provide more details about how you combined the two SDK examples? What changes were made?
Which example did you use as the starting point?
Which SDK version are you currently using?
Also, you mentioned that a hard fault eventually occurs after executing FLEXSPI_SoftwareReset(base);. Does this happen consistently every time the function is called, or only under specific conditions?
Best Regards, Pablo Re: SDK example flash and LWIP hard-fault Hi Pablo, I'd like to know if you have any information about my problem. Thank you very much Gerd Re: SDK example flash and LWIP hard-fault Hi, I have one update. I forgott to copy the folder linkscript from example flexspi . now, I get an other hard-fault init lwip, but the flexspi init is working. Gerd Re: SDK example flash and LWIP hard-fault Hi, I have done a test with another example from SDK (lwip_dhcp) together with flexSpi, but I get also an randomize hard_fault. So, I have a problem to go in my project. May be, if there is another solution to store data aprox. 1 KB) into the flash, please let me know. Many thanks Gerd Re: SDK example flash and LWIP hard-fault Hi @GerdMartin,
I was able to reproduce the behavior, and after performing some tests, I observed the following:
In the first two examples that you combined, flexspi_nor_polling_transfer_cm33 erases and writes to a memory region. By default, the region that this example uses is part of the combined project image.
We can calculate the sector that the example accesses. In this case, the example uses sector 20, with a sector size of 4k.
Therefore, the FlexSPI example modifies the following address:
20 × 4k + FlexSPI2_AMBA_BASE = 0x4014000
If we examine the memory contents before and after the call to main_FLASH(), we can see that part of the project image is being overwritten.
Pablo_Ramos_0-1787777815010.pngPablo_Ramos_0-1787777815010.pngPablo_Ramos_0-1787777815010.png
Pablo_Ramos_1-1787777823697.pngPablo_Ramos_1-1787777823697.pngPablo_Ramos_1-1787777823697.png
Could you modify the memory region used by the FlexSPI example so that it does not overlap with the project image?
After making this change, does the issue still occur?
Best Regards, Pablo Re: SDK example flash and LWIP hard-fault Thank´s, that´s it. I have modify the define EXAMPLE_SECTOR from 20 to a value that the result offset is not in my code. Now, I can go on. Gerd
查看全文