Working with the MIMXRT1021 EVK board with MCUXpresso and gcc.
I'm changing the clock frequency to conform to the lower maximum core clock for the industrial temperature rated parts.
The auto-generated code in clock_config.c may have an issue when changing the source and frequency of the AHB clock. In this case is is necessary to not declare SKIP_SYSCLK_INIT. The generated code is:
/* Disable Semc clock gate. */
/* Set SEMC_PODF. */
/* Set Semc alt clock source. */
/* Set Semc clock source. */
- (Simple issue for information). If this is compiled with no optimization then the inline functions are treated as normal functions. If the stack pointer is in external RAM this causes a problem when the SEMC clock is disabled. Perhaps this could be highlighted in a comment.
- There is no corresponding call to CLOCK_EnableClock(kCLOCK_Semc). This can be added by hand, but the change is over-written if the file is updated again from the tool.
In point (2). Have I missed something? If not then could the call to CLOCK_EnableClock(kCLOCK_Semc) be added to this section of code as an output from the Clocks tool?