Associate
November 8, 2020
Solved
BUG: Code generation for "HSE" is incorrectly configured as "HSI".
- November 8, 2020
- 2 replies
- 853 views
STM32CubeIDE v1.4.2
STM32F4 v1.25.2
STM32F446RC
I generated my code and got this:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;The HSE crystal is never turned on anywhere. Big bug.
I change this to:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
//RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;And now my USB finally works. =)
HSE is configured in RCC as "Crystal/Ceramic Resonator". I have not added anything to the code. I can send you files if that would help.
