Intro
After a reset, he MCXA153 microcontroller runs ate 48MHz, because:
- After reset, SCS bits in SCG->CSR = [011] : FIRC
- After reset, FIRC (fro_hf) = 48 MHz, as stated in Reference Manual paragraph 21.2 (Rev. 7, 2024-10-22)
- After reset, DIV bits in AHBCLKDIV = [00000000] : prescaler = 1
Problem
In the MCUXpresso SDK (26_03_00_pvw1), the SystemCoreClock global variable is configured in the function SystemCoreClockUpdate() in the file system_MCXA153.c. This is correct if the fsl_clock driver is used. If this driver is not used, the SystemCoreClock variable is set to 12MHz, which is not correct.
As a suggestion, update the following
In the file system_MCXA153.h, update the define:
#define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */
#define DEFAULT_SYSTEM_CLOCK 48000000u /* Default System clock value */
In the file system_MCXA153.c, update the function SystemCoreClockUpdate() so it does not depend on the fsl_clock driver anymore and uses direct register access.