In the process of using CMU module, I encountered the following two problems
1. In the formula for calculating the minimum value of RCCR[REF_CNT], one parameter is fbus_clock. How to determine the value of fbus_clock?
2.How do I configure the fault that the CMU detects that the frequency is too high or too low mapped to the corresponding FCCU fault? If I enable the corresponding FCCU fault, the FCCU fault is not triggered when the CMU detects a clock fault?
Hello @zhucc,
Thanks a lot for your patience. About the meaning/value of Fbus_clock, it is equivalent to the "module clock", you can see this in table 107 of the reference manual [page 581, S32G2 Reference Manual, Rev. 8, February 2024]:
you can double check it in the generated code of a project, for instance in the example Mcu_Example_S32G274A_M7, file RTD\src\Clock_Ip_Data.c, using the DDR_CLK as example, since all the elements of this array use XBAR_DIV6_CLK:
Therefore the frequency of the Fbus_clock, in this case, will be 4MHz:
Please also check section 23.8.2 [page 856 and onwards, S32G2 Reference Manual, Rev. 8, February 2024]:
Let me know if this information answers your question.
Hello @zhucc,
I will ask the internal team if we hace any example on how to configure a FCCU fault with the CMU. However, I need the following information first:
Thanks in advance.
Hello @zhucc,
the internal team has shared the following:
"
If the customer requires to map the CMU event to FCCU fault, the corresponding CMU_IER register needs to be configured. For an example, please check the Mcu_Example_S32G274A_M7.
"
Please let me know if this information helped you.