update stm32u5xx_hal_driver, fix build with old u575 board
This commit is contained in:
parent
214a4afa6a
commit
3e140756dc
|
@ -37,10 +37,11 @@
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void Error_Handler(void) {
|
#include "bsp/board_api.h"
|
||||||
|
|
||||||
|
TU_ATTR_UNUSED static void Error_Handler(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "bsp/board_api.h"
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
@ -152,12 +153,6 @@ void board_init(void) {
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
/* Enable USB power on Pwrctrl CR2 register */
|
|
||||||
HAL_PWREx_EnableVddUSB();
|
|
||||||
|
|
||||||
/* USB clock enable */
|
|
||||||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
|
||||||
|
|
||||||
// Enable VBUS sense (B device) via pin PA9
|
// Enable VBUS sense (B device) via pin PA9
|
||||||
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN;
|
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN;
|
||||||
#else
|
#else
|
||||||
|
@ -169,6 +164,12 @@ void board_init(void) {
|
||||||
USB_OTG_FS->GOTGCTL |= USB_OTG_GOTGCTL_BVALOVAL;
|
USB_OTG_FS->GOTGCTL |= USB_OTG_GOTGCTL_BVALOVAL;
|
||||||
#endif // vbus sense
|
#endif // vbus sense
|
||||||
|
|
||||||
|
/* Enable USB power on Pwrctrl CR2 register */
|
||||||
|
HAL_PWREx_EnableVddUSB();
|
||||||
|
|
||||||
|
/* USB clock enable */
|
||||||
|
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// STM59x/Ax/Fx/Gx only have 1 USB HS port
|
// STM59x/Ax/Fx/Gx only have 1 USB HS port
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ deps_optional = {
|
||||||
'675c32a75df37f39d50d61f51cb0dcf53f07e1cb',
|
'675c32a75df37f39d50d61f51cb0dcf53f07e1cb',
|
||||||
'stm32l5'],
|
'stm32l5'],
|
||||||
'hw/mcu/st/stm32u5xx_hal_driver': ['https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git',
|
'hw/mcu/st/stm32u5xx_hal_driver': ['https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git',
|
||||||
'2e1d4cdb386e33391cb261dfff4fefa92e4aa35a',
|
'4d93097a67928e9377e655ddd14622adc31b9770',
|
||||||
'stm32u5'],
|
'stm32u5'],
|
||||||
'hw/mcu/st/stm32wbxx_hal_driver': ['https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git',
|
'hw/mcu/st/stm32wbxx_hal_driver': ['https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git',
|
||||||
'2c5f06638be516c1b772f768456ba637f077bac8',
|
'2c5f06638be516c1b772f768456ba637f077bac8',
|
||||||
|
|
Loading…
Reference in New Issue