aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* armcm_link: Fix build on recent arm gcc/newlibc versionsKevin O'Connor2024-06-178-9/+14
| | | | | | | | It seems recent arm gcc versions no longer build correctly using the "--specs=nano.specs --specs=nosys.specs" linker flags. Replace those linker flags with "-nostdlib -lgcc -lc_nano". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Support 2-byte message idsKevin O'Connor2024-06-103-8/+33
| | | | | | | | Allow command ids, response ids, and output ids to be either 1 or 2 bytes long. This increases the total number of message types from 128 to 16384. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_bulk: Change maximum data size from 52 to 51 bytesKevin O'Connor2024-06-102-3/+3
| | | | | | | | | | | | Reduce the maximum data size from 52 bytes to 51 bytes. This will enable support for 2-byte response ids. This change would alter the behavior of the ldc1612 sensor support. Force an ldc1612 command name change so that users are alerted that they must rebuild the micro-controller code upon update of the host code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>