aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* stm32: Apply race fixes to stm32h7_adc.cKevin O'Connor2022-12-121-19/+18
| | | | | | | Improve handling of race conditions with hardware updates. This is the same changes applied to stm32f0_adc.c in commit 88325b6c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32g0: Do not disable SWD by accidentAlex Voinea2022-12-111-2/+5
| | | | | | Keep SWEN as 1 in FLASH->ACR register such that the SWD interface doesn't get disabled. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* stm32g4: Do not disable SWD by accidentAlex Voinea2022-12-111-1/+1
| | | | | | Keep SWEN as 1 in FLASH->ACR register such that the SWD interface doesn't get disabled. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* linux: add 'GPIOI' for linux process (#5926)BIGTREETECH2022-12-112-3/+4
| | | Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
* stm32: add STM32H723 supportbigtreetech2022-12-024-61/+113
| | | | | Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32g4: implement build,usb,can,i2c,spi,serial,adc.Matt Baker2022-12-0210-19/+318
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* rp2040: Fix watchdog enableKevin O'Connor2022-11-191-0/+3
| | | | | | | | | | | | The rp2040 watchdog does not actually reset anything by default. The psm_hw->wdsel field must be programmed to actually get a reset on a watchdog failure. Program that field so the watchdog is usable. Also, disable the watchdog before attempting a reboot into the bootloader. Otherwise the machine may just reboot a second time due to a missed watchdog event in the bootloader. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Fix boundary check for max gpio pinKevin O'Connor2022-11-191-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: use correct gpio bias flags (#5878)Eric Callahan2022-11-081-3/+3
| | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* rp2040: Support CanBoot as bootloaderKevin O'Connor2022-11-083-14/+41
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_reset: Introduce Kconfig FLASH_BOOT_ADDRESS valueKevin O'Connor2022-11-088-6/+26
| | | | | | | Specify the arm architecture flash bootup address for each chip type in Kconfig using a new FLASH_BOOT_ADDRESS setting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fdcan: Remove spurious executable flag on fdcan.cKevin O'Connor2022-11-042-0/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use consistent memory position/size on stm32h743Kevin O'Connor2022-11-021-3/+1
| | | | | | | Use the same memory start address and size on both stm32h750 and stm32h743. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use stm32f0_serial.c on stm32h7 chipsKevin O'Connor2022-10-313-110/+36
| | | | | | | The stm32h7 uses similar usart hardware as the stm32f0 and stm32g0 chips. Use the same code implementation for all these chips. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: fix USART ORE status flag handlingAlex Voinea2022-10-313-3/+8
| | | | | | | | | | | If an USART RX overrun happened on a stm32g0/f0/h7, the ORE flag would get set by hardware. This flag would also trigger an interrupt. The problem was that this flag was never cleared on these 3 mcu families since the ORE flag clear sequence is different to all of the older chips. Since the ORE flag is not used in any meaningful way anyway, it was disabled during the init sequence. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* stm32: Enable instruction and data cache on stm32h7D4SK2022-10-211-0/+3
| | | | Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
* stm32: Remove incorrect "spi3" definition from stm32h7Kevin O'Connor2022-10-171-4/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add support CANbus on ATSAME5x chipsKevin O'Connor2022-10-137-11/+363
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Move bootloader_request() from usbserial.c to main.cKevin O'Connor2022-10-132-18/+19
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add Kconfig definitions for same51j19 and same54p20 chipsKevin O'Connor2022-10-139-21/+43
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Add atmel same51 and same54 build definitionsKevin O'Connor2022-10-131-0/+1
| | | | | | | This also replaces the samd51 component files with the definitions from the same54 repository. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Remove unused gcc/ directories from samd21 and samd51 directoriesKevin O'Connor2022-10-131-2/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Protect message ram with barrier() calls instead of voltaile in fdcan.cKevin O'Connor2022-10-131-22/+25
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: No need for fdcan_ram global pointer in fdcan.cKevin O'Connor2022-10-131-24/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Minor code movement in fdcan.cKevin O'Connor2022-10-131-37/+41
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Suppress spurious gcc v12 array bounds warningKevin O'Connor2022-09-291-3/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* thermocouple: Only shutdown on multiple consecutive sensor errorsKevin O'Connor2022-09-231-4/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* thermocouple: Report fault information in fault fieldKevin O'Connor2022-09-231-12/+6
| | | | | | | Send the fault information explicitly in the query_thermocouple fault field for max6675, max31855, and max31865. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32l4: add stm32l412 support with adc,i2c,spi,usbMatt Baker2022-09-158-32/+305
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* samd21: fix erroneous register bit reference.Matt Baker2022-09-111-2/+0
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* stm32: Fix i2c on stm32g0Kevin O'Connor2022-09-112-0/+34
| | | | | | Fix the gpio function. Also, add buses found only on stm32g0. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add a gpio_valid() helper functionKevin O'Connor2022-09-051-12/+12
| | | | | | Add a function to validate that a gpio pin is valid on the chip. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serial_irq: Support side channel for entering bootloaderKevin O'Connor2022-09-054-0/+7
| | | | | | Add a mechanism to request the bootloader when using serial input. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move bootloader_request() from usbserial.c to main.cKevin O'Connor2022-09-053-12/+23
| | | | | | | Move bootloader_request() function so that it can be used when not using USB. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f0: implement i2c_read endpointMatt Baker2022-09-011-1/+20
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* stm32: Add Hardware PWM support for STM32G0 processors (#5714)Ben Jackson2022-09-013-4/+66
| | | | | | | | | | | Uses existing common code for STM32. Adds a table for device- specific PWM mappings. Adds support for enabling all TIM timer devices. Makes it a runtime error to enable devices the code doesn't know how to enable. I have verified performance of the fan pins (PC6, PC7, PB15) on the SKR Mini E3 V3. Signed-off-by: Ben Jackson <ben@ben.com>
* stm32: add FDCAN support for STM32H743 (SKR-3 Series) (#5668)BIGTREETECH2022-08-233-8/+85
| | | Signed-off-by: Chen.BJ from BigTreeTech <chenbj@biqu3d.com>
* stm32: Fix the STM32H743 mcu temp on SKR 3 (#5711)adelyser2022-08-191-1/+1
| | | Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
* rp2040: Enabled hw pullups for the I2C pins (#5710)chestwood962022-08-191-2/+2
| | | Signed-off-by: Adrian Joachim <adi.joachim12@gmail.com>
* atsamd: Use CONFIG_USB instead of CONFIG_USBSERIAL during clock initKevin O'Connor2022-08-162-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use new CONFIG_USB to determine if USB needs to be configuredKevin O'Connor2022-08-165-12/+14
| | | | | | | | | | | | 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>
* canserial: Fix typo in canserial.hKevin O'Connor2022-07-291-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Remove stm32f4 canbus warningKevin O'Connor2022-07-291-1/+0
| | | | | | The canbus code has been successfully tested on stm32f4. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Delay reset signaling for usb to canbus bridge nodesKevin O'Connor2022-07-291-0/+3
| | | | | | | | An mcu device acting as an "mcu bridge" should only be reset after other normal devices are reset - otherwise the bridge wont be able to pass along the reset message to the downstream mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canserial: Request bootloader via bootloader_request()Kevin O'Connor2022-07-291-2/+1
| | | | | | | Use bootloader_request() instead of try_request_canboot(). This allows the bootloader machanism to work for more bootloaders. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Rename usb_request_bootloader() to bootloader_request()Kevin O'Connor2022-07-2914-32/+45
| | | | | | | 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>
* serialqueue: Improve canbus timingKevin O'Connor2022-07-291-0/+4
| | | | | | | Adjust timing based on the minimum transmission time of canbus messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add CCRDY check to stm32g0 adcKevin O'Connor2022-07-251-0/+9
| | | | | | | The stm32g0 specification states that it is required to wait for the CCRDY flag to be raised after changing the channel configuration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add support for USB to CANbus bridge modeKevin O'Connor2022-07-062-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Initial support for CANbusKevin O'Connor2022-07-064-7/+104
| | | | | | | Add support for CANbus on the rp2040 using the can2040 "software canbus" implementation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>