-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Added stm32l496nucleo board support #3220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for the STM32L496ZG Nucleo board to the existing STM32L4 board support package. It includes complete board configuration files and improves USB GPIO pin speed settings for the entire STM32L4 family.
- Added complete board support files for the STM32L496 Nucleo board
- Updated GPIO pin speed configuration for USB pins from HIGH to VERY_HIGH speed
- Created linker script, build configuration, and board header files
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
hw/bsp/stm32l4/family.c | Updated USB GPIO pin speed to very high for better USB performance |
hw/bsp/stm32l4/boards/stm32l496nucleo/board.mk | Make build configuration defining compiler flags and linker files |
hw/bsp/stm32l4/boards/stm32l496nucleo/board.h | Board header with pin definitions, clock configuration, and initialization functions |
hw/bsp/stm32l4/boards/stm32l496nucleo/board.cmake | CMake build configuration with MCU variant and target definitions |
hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld | Linker script defining memory layout for the STM32L496ZG microcontroller |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
# GCC | ||
SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32l496xx.s | ||
LD_FILE_GCC = $(BOARD_PATH)/STM32L496KBUx_FLASH.ld |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linker file reference 'STM32L496KBUx_FLASH.ld' doesn't match the actual file 'STM32L496XX_FLASH.ld' in the same directory. This will cause build failures.
LD_FILE_GCC = $(BOARD_PATH)/STM32L496KBUx_FLASH.ld | |
LD_FILE_GCC = $(BOARD_PATH)/STM32L496XX_FLASH.ld |
Copilot uses AI. Check for mistakes.
@@ -0,0 +1,10 @@ | |||
set(MCU_VARIANT stm32l496xx) | |||
set(JLINK_DEVICE stm32l496kb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JLINK_DEVICE is set to 'stm32l496kb' but the board is STM32L496ZG according to the URL in board.h and PR description. This should be 'stm32l496zg' to match the actual device.
set(JLINK_DEVICE stm32l496kb) | |
set(JLINK_DEVICE stm32l496zg) |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copilot is right, are we using the correct variant here ?
/** Initializes the RCC Oscillators according to the specified parameters | ||
* in the RCC_OscInitTypeDef structure. | ||
*/ | ||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSI; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The clock configuration comment states 'System Clock source = PLL (MSI)' but the actual PLL source is configured as HSI. The comment should be updated to reflect the actual HSI-based configuration.
Copilot uses AI. Check for mistakes.
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; | ||
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; | ||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; | ||
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The clock configuration comment states 'System Clock source = PLL (MSI)' but the actual PLL source is configured as HSI. The comment should be updated to reflect the actual HSI-based configuration.
Copilot uses AI. Check for mistakes.
1b7f7db
to
f69d894
Compare
This pull request adds the functionality for the stm32l496ZG nucleo board. USB has been tested with all example code.
Increased the GPIO pin speeds for USB on the STM32L4 family.