Hello,
I’m working on a baremetal project that integrates both the Ethernet module and the FlexSPI module on the MIMXRT1180-EVK. I am facing a HardFault issue when trying to initialize the Ethernet module.
The program execution crashes at the following line:
enet_config.srcClockHz = EXAMPLE_CLOCK_FREQ;
I’ve attached a screenshot of the HardFault state for reference.
Any debugging tips or insights into resolving this issue would be highly appreciated.
Thank you in advance!
Hi @PavanKumarS
The line enet_config.srcClockHz = EXAMPLE_CLOCK_FREQ; suggests that the source clock for the Ethernet module might be incorrectly configured or conflicting with the FlexSPI module’s clock settings.
Verify the clock configurations for both Ethernet and FlexSPI in your project.
BR
Harry
Hi,
Initially, I used the "Hello World" example project as the base for implementing my code, where I encountered a hard fault issue during the clock initialization of the FlexSPI. However, when I switched to using the "FlexSPI" example project as the base and initialized both the FlexSPI and Ethernet modules, the hard fault issue no longer occurred.
I’ve compared the clock configurations between the "Hello World" and "FlexSPI" base project setups, but I couldn’t find any significant differences.
While this workaround has solved the issue, I would like to understand the root cause behind this behavior.
Could there be any additional settings or configurations that is required for the FlexSPI initialization? Any insights or suggestions would be greatly appreciated!
The same code was used in both the projects, I've attached the code for your reference.
Hi @PavanKumarS
Before clock initialization, there are no any additional settings or configurations that is required for the FlexSPI initialization.
So I think it's still a problem with the clock configuration, but there's no clock configuration in the file you gave me. Can you share the code that caused the hard fault?
BR
Harry