aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* rp2040: set clock to 200MhzTimofey Titovets2025-02-261-2/+18
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* stm32: Add support for stm32f070x6 mcusKevin O'Connor2025-02-162-9/+13
| | | | | | This mcu has smaller memory and may require remapping of PA11/PA12. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Avoid ending a transmission with a max size usb packetKevin O'Connor2025-02-151-3/+5
| | | | | | | | | | | | | | | It seems the Linux kernel will consider a maximum size usb packet to be a transaction that will continue into the next usb packet. It will thus hold on to the traffic from the first packet until it gets the next packet. However, if the mcu has no further data to send after the first packet then the data could get delayed for an extended period of time. To avoid this, check for transmissions that could end on a maximum sized packet and send that data in two packets instead. This avoids this unusual corner case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc_ep: Define endpoint sizes in usb_cdc_ep.hKevin O'Connor2025-02-153-8/+15
| | | | | | | | Move the definition of the usb endpoint sizes from usb_cdc.h to usb_cdc_ep.h . This allows individual boards to override the default endpoint sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: h7 spi support reload mode & frequencyTimofey Titovets2025-02-062-3/+17
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* usb_canbus: Detect canbus stalls when in usb to canbus bridge modeKevin O'Connor2025-02-021-3/+57
| | | | | | | | | | | | | | | If the low-level canbus stops working then it could become impossible to send messages to and from the canbus bridge node itself. This can make it difficult to diagnose canbus problems. Change the canbus bridge code to detect if message transmits become stalled for 50+ milliseconds and go into a "discarding" state. In this discarding state, messages destined for the canbus will be discarded until the canbus becomes active again. In this discarding state it will therefore be possible to transmit messages to and from the canbus bridge node. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus_stats: Periodically report canbus interface statisticsKevin O'Connor2025-02-021-1/+20
| | | | | | | | | Add support for a new get_canbus_status command to canserial.c . Add new canbus_stats.py module that will periodically query canbus mcus for connection status information. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Add support for reporting canbus stateKevin O'Connor2025-02-021-2/+47
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add support for reporting canbus stateKevin O'Connor2025-02-021-2/+47
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add support for reporting canbus stateKevin O'Connor2025-02-021-1/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for reporting canbus state from fdcan.cKevin O'Connor2025-02-021-2/+47
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for reporting canbus state from can.cKevin O'Connor2025-02-022-2/+57
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Simplify WANT_XXX definitionsKevin O'Connor2024-12-122-31/+26
| | | | | | | | | | | | | Use WANT_ADXL345 and WANT_MPU9250 instead of WANT_SENSOR_ADXL345 and WANT_SENSOR_MPU9250. This makes these definitions similar to the other accelerometer defintions. Order menu so accelerometers are close to each other in the menu. Simplify Makefile as Kconfig already assures a symbol will only be defined if its dependencies are met. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* angle: mt6826s added supportTimofey Titovets2024-12-121-0/+38
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* angle: mt6816 added supportTimofey Titovets2024-12-121-5/+40
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* Kconfig: split sensorsTimofey Titovets2024-12-122-11/+37
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* rp2040: Add spi0_gpio4_gpio3_gpio2 bus to support fysetc PITB V2 (#6683)Jessica Hunt2024-11-271-3/+24
| | | | | | | | | | | | | | | | The Fysetc PITB V2 board uses a spi bus config that is supported by the RP2040 chip, but not klipper, so this adds the relevant config to the file to allow you to run the tmc5160's on the board via hardware SPI. This resolves the issue of software spi not working on this board, which I was unable to fully understand. I have also seen other users encounter similar bus config issues with the rp2040 setting up things like accelerometers and such with this pin layout. As requested, this also uses the new convention for spi bus naming, while maintaining the old bus names for compatibility. Signed-off-by: Jessica Hunt <hunt.jessica@proton.me>
* rp2040: Improve indentation in Kconfig fileKevin O'Connor2024-11-141-34/+34
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add rp2350 bootrom based chipid and reboot to bootloader codeKevin O'Connor2024-11-144-9/+65
| | | | | | | This adds the bootrom code needed to implement "reboot into bootloader" and "chipid" capabilities. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Move chipid reading to bootrom.cKevin O'Connor2024-11-144-108/+120
| | | | | | | | | | | Rewrite chipid.c so that it contains just the USB and canbus id manipulation code. Move the low-level chipid reading to bootrom.c. Also, introduce a new bootrom_reboot_usb_bootloader() function in bootrom.c so that the main.c code does not need to know the specifics of rebooting into the bootrom. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Initial rp2350 supportKevin O'Connor2024-11-146-24/+62
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Use a higher USB PLL internal frequencyKevin O'Connor2024-11-141-1/+5
| | | | | | | The rp2350 chip requires a higher internal frequency, so choose a value that works for both rp2040 and rp2350. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Avoid using memcpy() on USB dpramKevin O'Connor2024-11-141-7/+30
| | | | | | | | Some versions of the system memcpy() may make unaligned memory accesses, which can result in a bus fault when accessing the usb dpram device memory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Rename rp2040_link.lds.S to rpxxxx_link.lds.SKevin O'Connor2024-11-133-3/+3
| | | | | | This is in preparation for rp2350 support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Rename CONFIG_RP2040_yyy Kconfig symbols to CONFIG_RPXXXX_yyyKevin O'Connor2024-11-135-34/+44
| | | | | | | Rename the Kconfig symbols. This is in preparation to adding support for the rp2350 mcu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Support ARM cortex-m33 chipsKevin O'Connor2024-11-133-3/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update lib/rp2040 to v2.0.0 SDK releaseKevin O'Connor2024-11-131-6/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Move lib/rp2040/elf2uf2 to lib/elf2uf2Kevin O'Connor2024-11-131-4/+4
| | | | | | | | Recent versions of the rp2040 sdk no longer contain the elf2uf2 tool. So, move that code to a new dedicated directory. This is in preparation for updating the rp2040 sdk version. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: allow i2c rate to be 400kHzWulfsta2024-11-121-4/+10
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* sensor_lis2dw: add lis3dh sensor and i2c communicationWulfsta2024-11-124-26/+141
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* atsamd: Add Kconfig definition for SAME51N19 chipKevin O'Connor2024-10-281-2/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Remove references to manufacturers in KconfigKevin O'Connor2024-10-284-17/+17
| | | | | | | | Avoid referring to particular board manufacturers in "make menuconfig". This information becomes rapidly outdated and is sometimes viewed by competing manufacturers as being unfair. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trsync: Don't require callers of trsync_do_trigger() to disable irqsKevin O'Connor2024-10-261-3/+6
| | | | | | | | | Disable irqs within trsync_do_trigger(). This fixes a bug in ldc1612 - as that code was calling trsync_do_trigger() without first disabling irqs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Improve timer vs task priority checkKevin O'Connor2024-10-266-11/+15
| | | | | | | | | | | | | | | Rename sched_tasks_busy() to sched_check_set_tasks_busy() and change it to only return true if tasks are active (running or requested) for two consecutive calls. This makes it less likely that timers will yield to tasks except when tasks really are notably backlogged. This also makes it less likely that multiple steppers controlling the same rail will be interrupted by tasks mid-step. This should slightly improve the timing, and make it less likely that a halt during homing/probing will occur with these steppers taking a different number of total steps. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mpu: shutdown on i2c errorsTimofey Titovets2024-10-261-6/+12
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* ldc1612: shutdown on i2c errorsTimofey Titovets2024-10-262-1/+3
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2ccmds: move status checks to functionTimofey Titovets2024-10-262-31/+26
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* stm32: forward i2c errors to i2ccmdTimofey Titovets2024-10-261-13/+23
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* rp2040: forward i2c errors to i2ccmdTimofey Titovets2024-10-261-18/+24
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* linux: forward i2c errors to i2ccmdTimofey Titovets2024-10-261-7/+15
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2c_software: forward errors to i2ccmdTimofey Titovets2024-10-261-18/+39
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2c: handle errors at i2ccmdsTimofey Titovets2024-10-2620-49/+123
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2ccmds: abstract i2c dev from bus implementationTimofey Titovets2024-10-264-23/+35
| | | | | | | | Added wrapper around sw/hw bus API, pins.py code will ensure that pins will not mix between HW/SW buses. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* stm32: Add support for USART3 on PC11/PC10 on STM32G474. (#6704)Liam Powell2024-10-242-0/+12
| | | Signed-off-by: Liam Powell <liam@liampwll.com>
* atsam: Enable TCM and cache for atsame70Wulfsta2024-10-215-13/+188
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* atsam: Add data memory barrier to USB driverWulfsta2024-10-211-0/+1
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* stm32: allow 400Khz in stm32f0_i2c.c (#6694)Timofey Titovets2024-10-091-0/+7
| | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* stm32: Fix i2c clock speeds for chips with a peripheral clock over 48MhzKevin O'Connor2024-09-221-5/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reduce peripheral clock speed on stm32g4 chipsKevin O'Connor2024-09-221-2/+2
| | | | | | A 170mhz (or 150mhz) peripheral clock is too fast for some peripherals. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Check for i2c NACK/Start NACK (#6692)Timofey Titovets2024-09-221-0/+22
| | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>