aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32
Commit message (Collapse)AuthorAgeFilesLines
* stm32: Support PB7/PB6 for USART1 on stm32f0Kevin O'Connor2021-08-012-10/+17
| | | | | | | | | | | Add support for USART1 on PB7/PB6. Remove STM32_SERIAL_USART1_ALT_PA15_PA14 option and allow all serial mappings to be used on stm32f031. Reported by @Desuuuu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add 16KiB bootloader option for STM32F103 (#4493)Simon Hawkenson2021-07-151-1/+1
| | | | | The Eryone ER-20 is a STM32F103 based 3D printer which ships with a 16KiB bootloader. Their official version of Marlin starts at 0x08004000. Signed-off-by: Simon Hawkenson <simon@hawkenson.ca>
* stm32: Allow STM32F401 boards to use STM32 HID Bootloader (#4461)Henky Prayoga2021-07-091-2/+2
| | | Signed-off-by: Henky Prayoga <henky.prayoga@callysta-engineering.com>
* stm32: Add support for STM32F072 (used in the TurboCAN board) (#4412)henrikssn2021-06-271-3/+7
| | | | | | | * Add menuconfig option for stm32f072 * Add support for internal temp of stm32f072 * Share the temperature calculation logic between stm32f0x2 MCUs Signed-off-by: Erik Henriksson <erikhenrikssn@gmail.com>
* config: Add configs for Prusa Buddy and Mini+github@matthewlloyd.net2021-06-141-0/+3
| | | | Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
* stm32: Support spi1 on PB4/PB5/PB3 on stm32f103 and stm32f2Kevin O'Connor2021-05-262-5/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Allow alternate USART1 and USART2 ports on stm32f1 and stm32f2Kevin O'Connor2021-05-252-3/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reorganize stm32f1 pin remap handlingKevin O'Connor2021-05-251-44/+34
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix USART3 on stm32f1 and stm32f2Kevin O'Connor2021-05-252-2/+6
| | | | | | | | | Commit 6a3c357a incorrectly disabled support for USART3 on stm32f1 and stm32f2 - restore that support. Also, add support for USART3 on PD9/PD8 on stm32f103. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add alternate serial ports on stm32f4Kevin O'Connor2021-05-242-3/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Include pin names in STM32_SERIAL_USART?_ALT kconfig symbolsKevin O'Connor2021-05-243-6/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Allow 32KiB bootloader on stm32f446Kevin O'Connor2021-05-201-3/+3
| | | | | | Useful on the Octopus board. Reported by @bigtreetech. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Enable ADC3 pins on stm32f446Kevin O'Connor2021-05-061-2/+2
| | | | | | Reported by @bigtreetech. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Allow selecting bootloader size for STM32F446Wilhelm Schuster2021-05-031-2/+2
| | | | Signed-off-by: Wilhelm Schuster <ws@rot13.io>
* stm32: Added mcu temperature support additional mcu (#4211)pkElectronics2021-04-251-1/+1
| | | | | Enabled MCU_Temperature sensor for STM32F405 based boards Signed-off-by: Pascal Wistinghausen <pascal.wistinghausen@ib-wistinghausen.de>
* stm32: CAN Kconfig typoOliver2021-04-072-2/+2
| | | | | | Fixed simple typo in the Kconfig and can.c. stm32f4 CAN Pins Signed-off-by: Oliver Walter <oli1111@web.de>
* stm32f1: reset peripherals in enable_pcclock()Arksine2021-04-071-0/+4
| | | | | | Some bootloaders do not disable peripherals in use before jumping to the application. Reset peripherals to assure correct operation. SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32: Add hardware PWM support for STM32F1Michael Kurz2021-03-265-0/+179
| | | | | | | | | This adds hardware PWM support for STM32F1 processors. This should also work for STM32 F0/F2/F4 processors, but I don't have one of those to test it. Signed-off-by: Michael Kurz <michi.kurz@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Minor optimization to can.c IRQ data readingKevin O'Connor2021-03-181-10/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Support reading CAN packets directly from IRQ handlerKevin O'Connor2021-03-181-3/+24
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify USB/Serial/CANbus Kconfig selectionKevin O'Connor2021-03-185-98/+116
| | | | | | | Combine the various communication options into a single "make menuconfig" menu item. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Rework CAN command protocolKevin O'Connor2021-03-131-18/+10
| | | | | | | Rework the micro-controller command protocol so that it supports direct communication with the serialqueue.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for STM32F1 I2C1 alternate pin mapping (#4012)Michael Kurz2021-03-022-5/+15
| | | | | | This adds support for the alternate pin mapping of I2C1 on PB8/9 in STM32F1 devices Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* stm32: Add support for 48KiB bootloadersKevin O'Connor2021-02-201-0/+3
| | | | | | Reported by @mks-viva. 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: F429 shall use 168Mhz to allow easy USB clock configurationArkadiusz Raj2021-02-191-2/+2
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Add STM32F429 variant (#3926)Arek2021-02-182-9/+22
| | | | | | | * Add F429 variant; add CAN on PD0,PD1; add 25Mhx clock; move CAN1_RX from PI8 to correct position (PI9) * Add test for STM32F429 Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Add support for spi bus on stm32f407 pins PI2,PI3,PI1Kevin O'Connor2021-02-121-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Minor indention change to spi.cKevin O'Connor2021-02-121-10/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Call can_notify_rx() at startup so low-level code does not need toKevin O'Connor2021-02-091-3/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Rename canbus_set_dataport() to canbus_set_filter() and simplifyKevin O'Connor2021-02-091-11/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Adding support for STM32F031x6 (#3871)Elias Bakken2021-02-033-7/+22
| | | | | | | Add support for alt usart 1 Do not select all functions on 16 K mcu Signed-off-by: Elias Bakken <elias@iagent.no>
* canbus: Move high-level CAN code to new src/generic/canbus.cKevin O'Connor2021-02-024-192/+74
| | | | | | | | | | Separate out the high-level command processing logic from the low-level transmission code. Place the high-level code in src/generic/canbus.c . This also removes the CAN dependency on serial_irq.c . Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify can.c irq handlerKevin O'Connor2021-02-021-127/+130
| | | | | | | Don't perform any heavy tasks in the CAN interrupt handler - just notify a background task to handle anything pending. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use CAN_TSR_CODE to select next tx fifo in can.cKevin O'Connor2021-02-021-6/+2
| | | | | | | | | | The spec states that the TX fifo is transmitted in chronological order if the TXFP bit is set, but it's unclear if the software needs to fill the tx fifo in a particular order to obtain that result. Use the TSR CODE bit field to fill the TX fifo in the order that the hardware reports as next. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Avoid read+write modify instructions in can.cKevin O'Connor2021-02-021-24/+13
| | | | | | | | | Prefer explicitly setting the hardware registers and avoid using C read and modify instructions where possible. This avoids race conditions where an interrupt or hardware change could cause subtle corruption of the register state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Introduce new can_set_filter() helper function in can.cKevin O'Connor2021-02-021-40/+32
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Update can.c to use more consistent indentationKevin O'Connor2021-02-021-146/+143
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Support for STM32F401 (#3853)smark-2021-01-313-9/+17
| | | | | This module adds support for the STM32F401 microcontrollers Signed-off-by: Marco D'Alessio <marco@wrecklab.com>
* stm32f1: Fix for using 16MHz external crystal (#3814)Matt Shepcar2021-01-241-2/+7
| | | Signed-off-by: Matt Shepcar <matt@shepcar.co.uk>
* stm32: Support setting the stm32f0 internal clock trim valueKevin O'Connor2021-01-182-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for spi4 bus on stm32f446 chipKevin O'Connor2021-01-041-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Only use the HSI48 clock when doing "usb clock recovery"Kevin O'Connor2020-12-081-1/+2
| | | | | | | | The HSI48 clock on the stm32f042 isn't as accurate as the main HSI clock. So, only use the HSI48 clock when using USB to synchronize that clock. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Support reading chip based temperature sensor on stm32f0Kevin O'Connor2020-10-291-2/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reduce adc_pins storage size in stm32f0_adc.cKevin O'Connor2020-10-291-19/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Support reading chip based temperature sensor on stm32f1/2/4Kevin O'Connor2020-10-291-5/+24
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Don't default to HID bootloader in KconfigKevin O'Connor2020-10-131-6/+8
| | | | | | | Restore the default of an 8KiB bootloader for stm32f103 and a 32KiB bootloader for stm32f207/stm32f407. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>