nxp-mcuxpresso / mcux-sdk

MCUXpresso SDK
BSD 3-Clause "New" or "Revised" License
323 stars 142 forks source link

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

Closed VoodooChild99 closed 10 months ago

VoodooChild99 commented 10 months ago

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

mcuxsusan commented 10 months ago

Thanks for reporting the issue. The issue has been forwarded to development team for investigation, reply could be delayed, thanks for your patience.

Thanks, Susan

mcuxsusan commented 10 months ago

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