aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* stm32: STM32F031 updates (#6607)Elias Bakken2024-05-252-2/+4
| | | | | | | Add support for STM32F031x6 which is the 32 KB version of the STM32F031 MCU. Add new I2C bus variant. Signed-off by: Elias Bakken <elias@iagent.no>
* sensor_ldc1612: Halt homing if sensor reports a warningKevin O'Connor2024-05-211-2/+9
| | | | | | | Explicitly check for sensor warnings during homing and report an error code back to the host. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_ldc1612: Create new check_home() helper functionKevin O'Connor2024-05-211-15/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_ldc1612: Add support for chips with INTB line routed to mcuKevin O'Connor2024-05-211-8/+38
| | | | | | If the INTB line is available it can reduce the MCU load. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_ldc1612: Don't require DRDY bit to be set on data readKevin O'Connor2024-05-211-2/+2
| | | | | | | | It is not clear if DRDY is cleared during a STATUS read (which could occur from command_query_ldc1612_status() ). So, just check the "unread conversion" bit when reading data. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add STM32G474 chip to KconfigDropeffect GmbH2024-05-141-0/+7
| | | | Signed-off-by: Amr Elsayed from Dropeffect GmbH <code@dropeffect.com>
* stm32: Add FDCAN2 channel needed for stm32g4 alternate pinsDropeffect GmbH2024-05-142-2/+15
| | | | | | | | Some of the alternate pins defined are routed to FDCAN2 instead of FDCAN1, this commit uses the correct IRQ register and peripheral clock enable bit to enable FDCAN on those pins. Signed-off-by: Amr Elsayed from Dropeffect GmbH <code@dropeffect.com>
* stm32g4: Fix ADC3 common interface registers name to ADC345_COMMONDropeffect GmbH2024-05-141-0/+4
| | | | | | Use ADC345_COMMON instead of ADC3_COMMON for stm32g4 ADC3 channel. Signed-off-by: Amr Elsayed from Dropeffect GmbH <code@dropeffect.com>
* stm32: Add new spi2 on stm32g0 chips (#6569)Donald A. Cupp Jr2024-05-031-15/+27
| | | Signed-off-by: Donald A. Cupp Jr <doncuppjr@yahoo.com>
* pru: BeagleBone Firmware upgrade to Debian 11.7 Bullseye (#6577)Oleg Gavavka2024-04-277-140/+191
| | | | | | | | | | | | | | | * Porting BeagleBone to Kernel 5.10 * Fixing issue with installation for BeagleBone. This fix resolve 2 issue: 1. Conflict with AVR packages. 2. "klipper_pru" script is executed before PRU cores are ready * Adding additional steps to BeagleBone install guide. * Updating BeagleBone documentation, adding different use cases, adding buses configurations SPI, I2C, CAN, UART Signed-off-by: Oleg Gavavka <work@datalink.net.ua>
* rp2040: Add kconfig options for rp2040 uart (#6549)Amken USA2024-04-242-23/+97
| | | | | Modified serial.c and Kconfig to dynamically select all possible UART combinations for RP2040 Signed-off-by: Hriday Keni <info@amken.us>
* config: Artillery Sidewinder X3 (#6534)TheFeralEngineer2024-04-121-1/+1
| | | Signed-off-by: Phil Timpson <theferalengineer@gmail.com>
* sensor_ldc1612: Initial support for bulk reading ldc1612 sensorKevin O'Connor2024-04-093-1/+216
| | | | | Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Don't use absolute paths for includeMichael 'ASAP' Weinrich2024-04-032-2/+2
| | | | | | | | Not all systems (i.e. Nix) repect the standard Linux filesystem hierarchy, instead relative paths should be used and allowing GCC to rely on it's builtin search paths. Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
* stm32: fix support for USARTs on STM32G0B0Robert Cambridge2024-04-031-0/+7
| | | | Signed-off-by: Robert Cambridge <robert@cambridge.me>
* stm32: Add i2c3 bus to STM32H7 (#6541)FOG_Yamato2024-04-021-0/+3
| | | Signed-off-by: Balanuta Simion <simion@fogyamato.dev>
* linux: Allow for more i2c busesCarl Richard Theodor Schneider2024-03-211-1/+1
| | | | | | | | | | | | | | | Similar to commit df79893, this allows klipper to use up to /dev/i2c-14. Similar to before, this limit is arbitrary. This is required for some other SoCs, which have even more i2c buses available, e.g. the rk3399: $ ls -1 /dev/i2c-* /dev/i2c-0 /dev/i2c-3 /dev/i2c-7 Signed-off-by: Carl Richard Theodor Schneider <dev.github@crtified.me>
* hc32f460: Adding support for 100pin version of H32F460 (#6488)Mad Beggar2024-03-192-1/+18
| | | Signed-off-by: Guillaume Giraudon <ggiraudon@prism19.com>
* stm32: Add i2c3_PC0_PC1 for stm32g0 (#6529)BIGTREETECH2024-03-151-0/+3
| | | Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
* stm32: Fix USART3 ALT pinout on STM32G0 (#6523)Attila2024-03-101-1/+1
| | | Signed-off-by: Attila Rakosi <rattila5@hotmail.com>
* avr: enable small code size options for atmega32u4Jake2024-03-021-1/+1
| | | | Signed-off-by: Jake Beju <jake.beju@gmail.com>
* rp2040: Only change SPI settings while peripheral is disabledKevin O'Connor2024-01-251-0/+4
| | | | | | | Make sure to disable/enable the peripheral to ensure the clock polarity is properly set prior to a change in CS. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Load vectortable into ramKevin O'Connor2024-01-252-0/+27
| | | | | | | Load the interrupt vector table into ram at startup. This reduces the chance of a flash cache access causing timing instability. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Run all code from ramKevin O'Connor2024-01-251-2/+3
| | | | | | | Place all normal code into ram. This reduces the chance that rp2040 instruction cache misses could cause subtle timing issues. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Always link using rp2040_link.lds.SKevin O'Connor2024-01-252-3/+11
| | | | | | Use the rp2040 specific linker script even when using a bootloader. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Avoid invoking functions in reset_handler_stage_two()Kevin O'Connor2024-01-251-4/+28
| | | | | | | | | | Avoid calling memset() and memcpy() prior to copying the ram and clearing the bss. Also, place both ResetHandler() and reset_handler_stage_two() in an explicit ".text.armcm_boot" linker section. These changes make it easier to support targets that want to run all code in ram. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Remove product names from bootloader choices menuKevin O'Connor2024-01-221-7/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add 36KiB bootloader offset option (#6449)Jakub2024-01-221-0/+3
| | | | | - This offset is used by Anycubic Kobra 2 Neo bootloader Signed-off-by: Jakub Przystasz <jakub.przystasz@gmail.com>
* stm32g0: Disable internal pull-down resistors on UCPDx CCx pins, because ↵BIGTREETECH2024-01-211-0/+2
| | | | | klipper never uses UCPD (#6462) Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
* sensor_lis2dw: No need to schedule start of bulk readingKevin O'Connor2024-01-191-42/+11
| | | | | | It's simpler and faster to enable the lis2dw in the python code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_mpu9250: No need to schedule start of bulk readingKevin O'Connor2024-01-191-98/+27
| | | | | | It's simpler and faster to enable the mpu9250 in the python code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_adxl345: No need to schedule start of bulk readingKevin O'Connor2024-01-191-43/+12
| | | | | | It's simpler and faster to enable the adxl345 in the python code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_bulk: New C file with helper code for sending bulk sensor measurementsKevin O'Connor2024-01-198-120/+113
| | | | | | | | | | Refactor the low-level "bulk sensor" management code in the mcu. This updates the sensor_adxl345.c, sensor_mpu9250.c, sensor_lis2dw.c, and sensor_angle.c code to use the same "bulk sensor" messages. All of these sensors will now send "sensor_bulk_data" and "sensor_bulk_status" messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_angle: No need to send messages when stopping queriesKevin O'Connor2024-01-191-5/+2
| | | | | | Simplify the mcu code as any messages are ignored by the host anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_lis2dw: No need to send messages when stopping queriesKevin O'Connor2024-01-191-19/+2
| | | | | | Simplify the mcu code as any messages are ignored by the host anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_mpu9250: No need to send messages when stopping queriesKevin O'Connor2024-01-191-9/+0
| | | | | | Simplify the mcu code as any messages are ignored by the host anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_adxl345: No need to send messages when stopping queriesKevin O'Connor2024-01-191-18/+0
| | | | | | Simplify the mcu code as any messages are ignored by the host anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_mpu9250: Check for overflows on each query_mpu9250_status commandKevin O'Connor2024-01-071-10/+12
| | | | | | | | | | | | Move overflow detection from mp9250_stop() to command_query_mpu9250_status(). Currently the host ignores any contents returned from a stop request, so overflow reporting at that point has limited utility. In practice, this change will result in one additional i2c transaction to the mpu9250 device every 100ms. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_mpu9250: Simplify mp9250_query()Kevin O'Connor2024-01-071-14/+10
| | | | | | | | The mpu9250 code always reads from the sensor in 48 byte chunks and always sends an mpu9250_data message immediately after that. Make that more clear in the querying code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_mpu9250: Fix timing in command_query_mpu9250_status()Kevin O'Connor2024-01-071-8/+9
| | | | | | | | | | | | Commit 80a7744b optimized the fifo tracking code. However, it introduced an error in the time tracking in command_query_mpu9250_status(). The purpose of that function is to provide a precise timestamp of the total number of messages produced at the time of that call. Thus, the returned fifo value needs to be the fifo level in the chip at the time of the call (not the value read during previous checks). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix CAN for STM32G4Alex Maclean2023-12-212-3/+6
| | | | Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* stm32: Fix ADC for STM32G4Alex Maclean2023-12-211-2/+3
| | | | | | | | At least STM32G4 requires four ADC clock cycles between hardware clearing ADCCAL and setting ADEN or the write disappears. Make a tenacious write attempt. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* stm32: Fix STM32G4 USBAlex Maclean2023-12-211-1/+6
| | | | | | STM32G4 USB controller requires 8 or 16-bit access, not 32-bit Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* hard_pwm: Add pin defs for STM32F070 and STM32F072 (#6409)Will Puckett2023-12-052-2/+65
| | | | | Define hard_pwm pins for STM32F070 and STM32F072, and update KConfig accordingly. Signed-off-by: Will Puckett <willpuckett@gmail.com>
* avr: enable small code size options for 328 and 328p (#6411)CODeRUS2023-11-291-1/+1
| | | Signed-off-by: Andrei Kozhevnikov <coderusinbox@gmail.com>
* stm32: enable 64KiB bootloader offset for all F4docgalaxyblock2023-11-161-1/+1
| | | | Signed-off-by: Joshua Schlicker <potter-91@web.de>
* atsam: Add support for CAN on atsame70 (#6366)Luke V2023-10-196-5/+359
| | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* atsam: Remove USB endpoint header (#6365)Alex Maclean2023-10-121-10/+0
| | | | | | | | | | The atsam USB hardware only requires that the ACM endpoint be endpoint 3. As of commit 11828387 the atsam chips can therefore use the default USB endpoints. This will allow CAN bridge support for the SAME70 to function (upstream host driver has hardcoded endpoints). Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* stm32: Make sure to limit tx during usbfs startupKevin O'Connor2023-10-051-1/+2
| | | | | | | Wait for two tx packets before startup, and make sure one of those packets is acked before sending a third tx packet. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix usbfs spurious USB packet transmit on startupKevin O'Connor2023-10-041-6/+16
| | | | | | | | | | | Commit cd8d57c2 added USB double buffering mode on transmits. However, when enabling double buffering mode, the hardware seems to always send at least two packets. Spurious transmissions could cause the Linux gs_usb driver to get confused, which could lead to the can0 device becoming unavailable on restarts. Fix by waiting for two USB packets to be available before enabling the endpoint. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>