Contradiction in SCP5 studio generated code (clock.h)
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)"
#endifDue 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
