nxp-mcuxpresso/mcux-sdk

[BUG] MCG_C4[DMX32] and MCG_C4[DRST_DRS] are not updated in CLOCK_SetFbeMode()

Closed this issue · 2 comments

Describe the bug
In the current implementation of CLOCK_SetFbeMode(), MCG_C4[DMX32] and MCG_C4[DRST_DRS] are not updated to the given value. For example, in the following code snippet, the local variable mcg_c4 is updated, but it is not written into MCG->C4:
https://github.com/nxp-mcuxpresso/mcux-sdk/blob/main/devices/MK64F12/drivers/fsl_clock.c#L1810C5-L1817C6

Initially I thought this might be a workaround to ERR007993. However, after reading about ERR007993, I found the following sentence: "If you want to change the MCG_C4[DMX32] or MCG_C4[DRST_DRS] to new values along with the reference clock, the sequence described above must be performed before setting these values to the new value(s)". The suggested sequence has been performed, but C4 is not updated, therefore I believe this is a bug.

To Reproduce

Expected behavior
MCG_C4[DMX32] or MCG_C4[DRST_DRS] should be updated after CLOCK_SetFbeMode()

Screenshots and console output

Additional context

Update: The developer has confirmed it's an issue and working on it.