I am using the can_pal example for nxp s32k144 and would like to know how to change the system clock explicitly.
I saw that in flex_Can you can use a Normal_Model_80 (or similar) function, but I don't see it in can_pal.
Can you tell me how to make explicit whether to run at 80Mhz or 112Mhz ?
Thank you in advance.
1. How to set HSRUN mode?
Please add a new component in Processor Expert and new a Power mode configurations as below.
Then in the code call ROWER_SYS_Setmode, and fill in the power mode index which indicates the HSRUN mode, in my case it's 1.
2. How to set RUN mode to 80MHZ from 48MHZ?
Please set SPLL_CLK - Multiply to 40 and choose SYS_CLK RUN mode to SPLL_CLK/2.
3. How to know your current system clock frequency?
You can use the clock output feature.
In PIN_MUX component you can set maxim 4 pins as clock output
Then go to clock manager component, choose the clock source you want to monitor
Hope it will help. Any question please feel free to reply.
First of all, thank you for your answer.
However, I don't understand where I can explain that my code can run in normal or highspeed mode.
Also because from the component inspector I can't change the frequency value (48 MHz for Normal Mode and 112MHz for High Speed are values that I can't decide).
I mean that in the SYS_CLK row of the interface clocks table I can't change the values indicated (at least I think it doesn't give me any option and I don't do it).
Maybe in the table below (Clock Sources) I can change the values. But if I try, it shows me a lot of Warnings (?).
Thanks for your attention,