Skip to content

Commit

Permalink
Add support for NUCLEO-H755ZI-Q board
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Misic committed Dec 18, 2024
1 parent 0cdd616 commit 1ca84f6
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
stm32h7xx secure=true,
stm32h7xx_ram,
stm32h7xx_ram secure=true,
nucleo_h755zi,
nucleo_h755zi_ram,
matek_H7_slim,
matek_H7_slim secure=true,
matek_H7_slim_ram,
Expand Down
2 changes: 1 addition & 1 deletion Bootloader/Adapters/Src/system_clock_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ SystemClock_Config(void) {

/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
HAL_PWREx_ConfigSupply(PWR_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
Expand Down
4 changes: 3 additions & 1 deletion Bootloader/Inc/board_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@

#define MANUFACTURER_ID_BASE64_STR (const char*)("Qj9FKEgrTWJRZVRoV21acTR0N3cheiVDKkYpSkBOY1I=") // Size must be equal to 44 characters Base64 format (45 bytes)

#ifdef MATEK_H743_SLIM
#ifdef NUCLEO_H755ZI
#define PRODUCT_TYPE (const char*)("IMProject_demo-nucleo_h755zi") // Maximum allowed size is 100 characters (101 bytes)
#elif MATEK_H743_SLIM
#define PRODUCT_TYPE (const char*)("IMProject_demo-matek_H7_slim") // Maximum allowed size is 100 characters (101 bytes)
#elif defined(PIXHAWK4)
#define PRODUCT_TYPE (const char*)("IMProject_demo-pixhawk4") // Maximum allowed size is 100 characters (101 bytes)
Expand Down
21 changes: 18 additions & 3 deletions Bootloader/Inc/boards_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,35 @@
#ifndef BOOTLOADER_INC_BOARDS_CONFIG_H_
#define BOOTLOADER_INC_BOARDS_CONFIG_H_

/* LED configuration for board available on the market */

#ifdef MATEK_H743_SLIM
#ifdef NUCLEO_H755ZI
#define LED1_Pin GPIO_PIN_0
#define LED1_Port GPIOB
#define LED2_Pin GPIO_PIN_1
#define LED2_Port GPIOE
#define LED_ON GPIO_PIN_SET
#define LED_OFF GPIO_PIN_RESET
#define BL_BUTTON_Pin GPIO_PIN_13 //!< Button for entering in BL if pressed at boot time
#define BL_BUTTON_Port GPIOC
#define BL_BUTTON_ON GPIO_PIN_SET
#define BL_BUTTON_OFF GPIO_PIN_RESET
#define BL_BUTTON_PRESS_TIME 500u //!< Time in [ms] needed for button to be pressed to enter in BL
#define PWR_SUPPLY PWR_DIRECT_SMPS_SUPPLY
#elif MATEK_H743_SLIM
#define LED1_Pin GPIO_PIN_4 //!< Pin defined for green LED
#define LED1_Port GPIOE
#define LED2_Pin GPIO_PIN_3 //!< Pin defined for blue LED
#define LED2_Port GPIOE
#define LED_ON GPIO_PIN_RESET
#define LED_OFF GPIO_PIN_SET
#define PWR_SUPPLY PWR_LDO_SUPPLY
#elif defined(PIXHAWK4)
#define LED1_Pin GPIO_PIN_6 //!< Pin defined for green LED
#define LED1_Port GPIOC
#define LED2_Pin GPIO_PIN_7 //!< Pin defined for blue LED
#define LED2_Port GPIOC
#define LED_ON GPIO_PIN_RESET
#define LED_OFF GPIO_PIN_SET
#define PWR_SUPPLY PWR_LDO_SUPPLY
#else
#define LED1_Pin GPIO_PIN_13
#define LED1_Port GPIOC
Expand All @@ -63,7 +76,9 @@
#define BL_BUTTON_ON GPIO_PIN_SET
#define BL_BUTTON_OFF GPIO_PIN_RESET
#define BL_BUTTON_PRESS_TIME 500u //!< Time in [ms] needed for button to be pressed to enter in BL
#define PWR_SUPPLY PWR_LDO_SUPPLY
#endif


#endif /* BOOTLOADER_INC_BOARDS_CONFIG_H_ */

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ TARGETS = \
stm32h7xx_ram \
stm32f7xx \
stm32f7xx_ram \
nucleo_h755zi \
matek_H7_slim \
matek_H7_slim_ram \
pixhawk4 \
Expand All @@ -136,6 +137,12 @@ clean:
#
BOARD =

nucleo_h755zi:
${MAKE} stm32h7xx BOARD=NUCLEO_H755ZI BOARD_FILE_NAME=$@

nucleo_h755zi_ram:
${MAKE} stm32h7xx_ram BOARD=NUCLEO_H755ZI BOARD_FILE_NAME=$@

matek_H7_slim:
${MAKE} stm32h7xx BOARD=MATEK_H743_SLIM BOARD_FILE_NAME=$@

Expand Down
15 changes: 11 additions & 4 deletions Makefile.stm32h7xx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,18 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
AS_DEFS =

# C defines
C_DEFS = \
C_DEFS = \
-DUSE_HAL_DRIVER \
-DSTM32H7xx \
-DSTM32H750xx \
-DSTM32H743xx
-DSTM32H7xx

ifeq ($(BOARD), NUCLEO_H755ZI)
C_DEFS += \
-DCORE_CM7 \
-DSTM32H755xx
else ifeq ($(BOARD), MATEK_H743_SLIM)
C_DEFS += \
-DSTM32H743xx
endif

# AS includes
AS_INCLUDES =
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Each MCU has its own example of [IMLedBlink](https://github.com/IMProject/IMLedB

| Board |MCU |
| -------------------------------------------------------------------------- |:--------:|
| [NUCLEO-H755ZI-Q](https://www.st.com/en/evaluation-tools/nucleo-h755zi-q.html) |STM32H755ZI |
| [Mateksys h743-slim](http://www.mateksys.com/?portfolio=h743-slim) |STM32H7xx |
| [Pixhawk 4](https://docs.px4.io/master/en/flight_controller/pixhawk4.html) |STM32F7xx |

Expand Down

0 comments on commit 1ca84f6

Please sign in to comment.