About S32K312 clock switching requirements
Currently our TBOX developed based on S32K312 needs low power consumption, we plan to use 120MHZ and 750KHZ clocks, where the 750KHZ clock will be used for low power scenarios:
my clock configurations and Power mode configurations are as follows.
1. Very low speed run mode clock config
2. RUN MODE POWER config
3. Very Low speed run mode power config
4. PIN Config
My requirement is how to switch from 120MHZ to 750KHZ or 750KHZ to 120MHZ?
Currently for RUNMODE and VERY LOW SPEED RUN MODE, there are 2 different configurations for GPIO, POWER, and CLOCK, for the modes. Can I switch the clock this way:
(1) Power-on clock configuration
```
```
(2) Switch from 120MHZ to 750KHZ
```
```
(3) from 750KHZ back to 120MHZ
```
```
Before switching, do I need to turn off the PIN, LPUART, ADC that are already turned on, and then turn them back on after the clock is switched?
Please help me to confirm the above information, currently my test keeps going to HardFault_Handler。
Best Wishes.
Solved! Go to Solution.
Hello @liangyouchao,
FIRC_CLK is optional in the Standby domain. I suppose that you can configure FIRC for low-power mode.
If you want to find out the root cause, you should debug registers and check why the Hardfault occurred.
Best regards,
Dan
My RTD Version is SW32K3_RTD_4_4_2_0_0_D2203.
Now I have solved the problem, I solved it by configuring the FIRC setting FIRC under MCU control to disabled, but didn't understand why FIRC was configured that way.
Hello @liangyouchao,
FIRC_CLK is optional in the Standby domain. I suppose that you can configure FIRC for low-power mode.
If you want to find out the root cause, you should debug registers and check why the Hardfault occurred.
Best regards,
Dan
Hello @liangyouchao,
What is the RTD package you are using?
Could you send me your .mex file (S32DS configuration file)?
Best regards,
Dan