Skip to content

Commit

Permalink
Fix clocking configuration issues on STM32H7x processors (#262)
Browse files Browse the repository at this point in the history
* Fix NUCLEO_H743ZI clock config not enabling overdrive mode

* Update most STM32H7 devices to new clocking configuration

* Fix ADC clock for old chip revs

* Fix CAN clock, finish clocking for 280MHz devices

* Fix a few typos and such

* A few more targets.json tweaks

* Fix comma
  • Loading branch information
multiplemonomials authored Mar 28, 2024
1 parent 862f462 commit 8926deb
Show file tree
Hide file tree
Showing 18 changed files with 510 additions and 824 deletions.
10 changes: 10 additions & 0 deletions targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ target_include_directories(mbed-stm32h7
)

target_link_libraries(mbed-stm32h7 INTERFACE mbed-stm mbed-stm32h7cube-fw)


# Add clock file depending on the frequency
if("STM32H7_480MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_480MHZ/system_clock.c)
elseif("STM32H7_550MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_550MHZ/system_clock.c)
elseif("STM32H7_280MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_280MHZ/system_clock.c)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ target_include_directories(mbed-stm32h723xg
target_sources(mbed-stm32h723xg
INTERFACE
${STARTUP_FILE}
system_clock.c
)

mbed_set_linker_script(mbed-stm32h723xg ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ target_include_directories(mbed-stm32h725xe

target_sources(mbed-stm32h725xe
INTERFACE
system_clock.c
${STARTUP_FILE}
)

Expand Down
216 changes: 0 additions & 216 deletions targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H725xE/system_clock.c

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_library(mbed-nucleo-h743zi2 INTERFACE)
target_sources(mbed-nucleo-h743zi2
INTERFACE
PeripheralPins.c
system_clock.c
)

target_include_directories(mbed-nucleo-h743zi2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@ add_subdirectory(TARGET_STM32H745xI_CM7 EXCLUDE_FROM_ALL)

add_library(mbed-stm32h745xi INTERFACE)

target_sources(mbed-stm32h745xi
INTERFACE
system_clock.c
)

target_link_libraries(mbed-stm32h745xi INTERFACE mbed-stm32h7)
Loading

0 comments on commit 8926deb

Please sign in to comment.