recently i started new project (STM32F407VGT6) use USB FS with stm32 CUBE IDE, i choose clock source from bypass(cause usb cant use internal clock), after code is generated by cube ide, i check by blink led on PA1, but the led is not blinking at all. but after i disable USB and change clock source to internal, led is blinking as it should.
am i wrong with configuration of USB and clock source?, (i already watch usb tutorial on stm32 youtube channel also)
i believe my code is not wrong (cause its just basic blink led):
here is my board: https://github.com/mcauser/MCUDEV_DEVEBOX_F407VGT6
Code: Select all
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
HAL_GPIO_WritePin(led_GPIO_Port, led_Pin, GPIO_PIN_RESET);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_GPIO_TogglePin(led_GPIO_Port, led_Pin);
HAL_Delay(100);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}