HI All,
I modify the USB DFU sample code from ST and it works when the main clock is set to 48Mhz. The following is the system settings.
SCU_MCLKSourceConfig(SCU_MCLK_OSC); // FMI_Config(FMI_READ_WAIT_STATE_2,FMI_WRITE_WAIT_STATE_0, FMI_PWD_ENABLE, FMI_LVD_ENABLE,FMI_FREQ_HIGH); SCU_PLLFactorsConfig(192, 25, 3); SCU_PLLCmd(ENABLE); SCU_MCLKSourceConfig(SCU_MCLK_PLL); SCU_AHBPeriphClockConfig(__VIC, ENABLE); SCU_AHBPeriphReset(__VIC, DISABLE); /*USB clock = MCLK= 48MHz*/ SCU_USBCLKConfig(SCU_USBCLK_MCLK); /*Enable USB clock*/ SCU_AHBPeriphClockConfig(__USB, ENABLE); SCU_AHBPeriphReset(__USB, DISABLE); SCU_AHBPeriphClockConfig(__USB48M, ENABLE);
If I change the main clock to 96Mhz as below, then DFU doesn't work anymore.
SCU_PLLFactorsConfig(192, 25, 2); SCU_USBCLKConfig(SCU_USBCLK_MCLK2);
I greatly appreciate any helps to point me out the reason and what I need to do to fix the issue.
Best Regards,
Lillian
Hi All,
More information. I use STR912FAW44 and keil MDK to develop the product.
Thanks