2020-07-24 03:08 AM
Hi,
In code generated by SPC5Studio for SPC582B microcontroller there are some macrodifinitions, which validate setting of the clock.
Particularily the one (components\spc582bxx_clock_component_rla\lib\include\clock.h):
/* Check ratio between SPC5_LIN_CLK and PBRIDGE_CLK.*/
#if (SPC5_LIN_CLK != 0U) && (SPC5_PBRIDGE_CLK < ((1UL * SPC5_LIN_CLK) / 3UL) || SPC5_PBRIDGE_CLK > ((2UL * SPC5_LIN_CLK) / 3UL))
#error "SPC5_LIN_CLK outside acceptable range (1/3 PBRIDGE_CLK...2/3 PBRIDGE_CLK)"
#endif
Due to the #if equation - LIN_CLK must be 2 times bigger than PBRIDGE_CLK.
But due to #error comment - LIN_CLK acceptable value is half of PBRIDGE_CLK (between 1/3 and 2/3 of PBRIDGE_CLK actually).
Which one is correct?
Best,
Yannek
Solved! Go to Solution.
2021-01-12 11:32 AM
Hello,
actually the relationship is correct while the comment is wrong.
Reference Manual says: "The relationship “(2/3)* LIN_CLK > PBRIDGEx_CLK > 1/3*LIN_CLK�? should be maintained"
Regards,
Giuseppe
2020-08-18 02:32 AM
Yes , the error comment does not match with the if
i am submitting a ER
Best regards
Erwan
2021-01-12 11:32 AM
Hello,
actually the relationship is correct while the comment is wrong.
Reference Manual says: "The relationship “(2/3)* LIN_CLK > PBRIDGEx_CLK > 1/3*LIN_CLK�? should be maintained"
Regards,
Giuseppe