analogdevicesinc / msdk

Software Development Kit for Analog Device's MAX-series microcontrollers
Apache License 2.0
60 stars 75 forks source link

fix(PeriphDrivers): Fix SDHC Peripheral Failure for Alternative System Clocks #1041

Closed OzgunKanal closed 1 day ago

OzgunKanal commented 3 weeks ago

Description

According to the UG, SDHC peripheral is driven by always 96 MHz. Therefore, using System clock in the function MXC_SDHC_Get_Input_Clock_Freq results failure in SDHC peripheral when SytemClock is configured other than 96 MHz. Moreover, according to the UG the SDHC is driven by the 96 MHz Internal High-Speed Oscillator. Similar situations occur for ME10, ME13 and AI87 and commits relating to these MCUs will be pushed after this commit, discussions and related tests.

Jake-Carter commented 3 weeks ago

Thanks @OzgunKanal, agreed we can use the oscillator frequency macros for this instead of SystemCoreClock. I think this change is good to apply to the other micros as well.