nxp-mcuxpresso/mcux-sdk

MIMXRT117x: Clock root divider setting cut off at 255.

Closed this issue · 1 comments

The function CLOCK_SetRootClockDiv() allows setting a divider for the clock. The divider is an 8 bit value. Suitable values at the register are 0-255 for a divider in the range 1-256. For convenience, the divider is provided in the function call, and the macro subtracts 1 before storing the value. However, a divider of 256 cannot be set, since the function parameter is declared as uint8_t.

static inline void CLOCK_SetRootClockDiv(clock_root_t root, uint8_t div)

Setting it to uint16_t or uint32_t fixes the problem.

Thanks for reporting the issue. Our developer is working on this.