aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/stm32f4.c
Commit message (Collapse)AuthorAgeFilesLines
* stm32: Use new CONFIG_USB to determine if USB needs to be configuredKevin O'Connor2022-08-161-2/+2
| | | | | | | | | | | | Introduce a CONFIG_USB build symbol that is set whenever CONFIG_USBSERIAL or CONFIG_USBCANBUS is set. Use that symbol during setup so that the USB controller is properly initialized for both usb serial and usb canbus bridge configurations. This fixes the clock configuration for usb canbus bridge mode on stm32f446. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Rename usb_request_bootloader() to bootloader_request()Kevin O'Connor2022-07-291-4/+4
| | | | | | | Rename this board API function to a more generic name. This is in preparation for calling the function from the canbus code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_reset: Add a armcm_reset.h header file for try_request_canboot()Kevin O'Connor2022-06-041-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: call "try_request_canboot" for bootloader requestsEric Callahan2022-06-031-0/+1
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32: Unify enable_pclock() codeKevin O'Connor2021-12-301-39/+15
| | | | | | | | | Unify the handling of the enable_pclock() and is_enabled_pclock() code across all stm32 chips. All chips will now perform a peripheral reset on enable_pclock() (this is a change for stm32f0 and stm32h7). The enable_pclock() code will now also disable irqs during the enable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reorganize usb bootloader code in stm32f4.cKevin O'Connor2021-12-231-30/+63
| | | | | | Reorganize stm32f4.c into major code blocks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add new gpioperiph.c file for gpio_peripheral() codeKevin O'Connor2021-12-231-26/+1
| | | | | | | | The gpio_peripheral() code is the same in stm32f0.c, stm32f4.c, and stm32h7.c. Move that function to a new gpioperiph.c file to avoid code duplication. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f4: reset peripherals in enable_pcclock()Eric Callahan2021-11-081-0/+7
| | | | | | | Reset peripherals to after enabling to clear stale registers set by the bootloader. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32f4: reset peripheral clocks on initEric Callahan2021-11-081-0/+6
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32: Add comments to configuration of OSPEEDR gpio speedKevin O'Connor2021-10-121-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add an MACH_STM32F4x5 alias for F405, F407, and F429 chipsKevin O'Connor2021-10-061-4/+2
| | | | | | | | | The F405, F407, and F429 chips are in the same series and almost all code definitions should apply to all chips in that series. Implement the alias and fix defintions in adc.c and Kconfig that were only applying to a subset of that series. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Optimize stm32f401 peripheral clockKevin O'Connor2021-02-191-2/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: stm32f401 pll_freq updatesArkadiusz Raj2021-02-191-2/+3
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: 25MHz clock fixesArkadiusz Raj2021-02-191-1/+2
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Fix missing STM32F429 clock initializationArkadiusz Raj2021-02-191-2/+3
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Support for STM32F401 (#3853)smark-2021-01-311-2/+3
| | | | | This module adds support for the STM32F401 microcontrollers Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
* stm32: Initial support for stm32f2 (#3001)combolek2020-06-231-2/+26
| | | | | | | Initial support for stm32f2 in general and STM32F207 in particular. Boots up and communicates on STM32F207VC. Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
* stm32f4: Add support for HID bootloaderArksine2020-05-281-1/+12
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32: Allow external crystal speed to be customized in KconfigKevin O'Connor2019-11-251-35/+32
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: stm32f4 usb boot check only needed when CONFIG_USBSERIALKevin O'Connor2019-10-261-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f4: Add support for flashing over USBKevin O'Connor2019-10-261-0/+14
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Implement armcm_main() in arch specific codeKevin O'Connor2019-10-241-4/+15
| | | | | | | Move armcm_main() to stm32f0.c, stm32f1.c, and stm32f4.c. This gives the arch specific code more control on the early boot setup. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Move VTOR fixup from main() to chip specific codeKevin O'Connor2019-09-181-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Move usb_request_bootloader() to chip specific codeKevin O'Connor2019-09-181-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for configuring open drain output modeKevin O'Connor2019-08-201-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Make sure to enable the gpio clock prior to setting the first valueKevin O'Connor2019-08-201-2/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Enable 48Mhz USB clock on stm32f446Kevin O'Connor2019-08-141-0/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Rename clock.c to stm32f4.cKevin O'Connor2019-08-051-0/+158
Rename the clock.c file to stm32f4.c to make it more clear that the code is specific to the stm32f4 chips. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>