aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* avr: Fix typo causing broken gpio mappingsKevin O'Connor2021-08-151-2/+2
| | | | | | | Commit 070fac07 had a typo causing two PINE definitions to be added to the list of available GPIOs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Define PORTE on atmega328pKevin O'Connor2021-08-142-1/+7
| | | | | | | | The atmega328pb supports PORTE, but the current avr-libc toolchain doesn't support the atmega328pb. So, for now, add support for PORTE to atmega328p. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Rename the analog-only PE0/PE1 pins on atmega168/328 to PE2/PE3Kevin O'Connor2021-08-141-2/+2
| | | | | | | The atmega328pb has officially named these pins as PE2 and PE3, so use that naming scheme instead of the previous Klipper invented names. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* rp2040: implement SPILasse Dalegaard2021-07-154-0/+121
| | | | | | | This implements SPI for the rp2040 target. All output groupings of both SPI blocks are available for use. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
* rp2040: hardware PWM supportLasse Dalegaard2021-07-094-0/+111
| | | | | | | | | | This implements hardware PWM support for the rp2040. The maximum value(100% duty) is set to 255 to match the other controllers. Cycle time is clamped automatically, and uses the full 8.4 fractional range of the rp2040 PWM block. This allows a maximum PWM frequency of 490kHz and a minimum frequency of 1915 Hz. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
* 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>
* rp2040: Add _ramfunc macro to internal.h and use in bootrom.c and chipid.cKevin O'Connor2021-07-043-9/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: add chipid supportLasse Dalegaard2021-07-045-4/+171
| | | | | | | | | | The rp2040 doesn't have a chip ID, but the flash chip connected does. We can get this ID by asking the flash chip directly, but doing so requires disengaging the XIP layer, performing the interrogation of the flash chip, and then re-enabling the XIP layer. This gives us a 64-bit unique ID that we can use as our USB serial number. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
* rp2040: support usb_request_bootloaderLasse Dalegaard2021-07-044-2/+30
| | | | | Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: remove unused linker optionLasse Dalegaard2021-07-041-1/+1
| | | | | | | | | In binutils 2.36 and above the -nostartfiles option is no longer ignored. -nostartfiles is actually a gcc option, and so isn't supported by ld. Earlier versions of binutils however had less error checking, and thus just ignored the option. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
* rp2040: Initial USB supportKevin O'Connor2021-07-044-1/+241
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add initial adc supportKevin O'Connor2021-07-045-2/+105
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add initial support for the rp2040 mcuKevin O'Connor2021-07-0410-0/+640
| | | | | | | Support the rp2040 (as tested on a Raspberry Pi Pico board). This adds basic uart, timer, gpio, and watchdog support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Check CONFIG_MACH_AVR for slow mcusKevin O'Connor2021-07-042-4/+4
| | | | | | | Use CONFIG_MACH_AVR instead of CONFIG_CLOCK_FREQ to check for slow mcus. Some fast MCUs do not export a high clock frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Allow CONFIG_HAVE_GPIO_BITBANGING when not CONFIG_HAVE_GPIO_SPIKevin O'Connor2021-07-041-2/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Add comments on debugging USB connections via UARTKevin O'Connor2021-07-041-0/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* trsync: Introduce new "trigger synchronization" supportKevin O'Connor2021-06-096-77/+259
| | | | | | | Separate out the stepper stopping code from endstop.c into its own trsync.c code file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Include debug symbols in the .elfSergey Alirzaev2021-06-081-0/+2
| | | | Signed-off-by: Sergey Alirzaev <zl29ah@gmail.com>
* atsamd: Add support for 25Mhz crystalsKevin O'Connor2021-06-042-0/+33
| | | | | | Needed for the Duet3 Mini 5+ board. Reported by @lukeslaboratory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Fix pll reference in samd51 config_dpll()Kevin O'Connor2021-06-041-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Revert "linux: Raise an error if configuring a pullup when that is not ↵Kevin O'Connor2021-05-271-3/+0
| | | | | | | | | | | supported" This reverts commit 70ea0806d96df5a8ea83793da46f2676d9695e69. The above commit breaks software spi on linux hosts. Revert that commit until an improved error check can be implemented. Signed-off-by: Kevin O'Connor <kevin@koconnor.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>
* lpc176x: Add support for serial on UART3 P4.29/P4.28Kevin O'Connor2021-05-253-9/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move pin definitions together in serial.cKevin O'Connor2021-05-251-22/+28
| | | | 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>
* debugcmds: Remove start/end_group commandsKevin O'Connor2021-05-071-38/+2
| | | | | | | | These commands were never used by the main code and are not particularly helpful for debugging. Remove them to reduce code size - in particular on the pru architecture. 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>
* lpc176x: Use full peripheral clock speed; fix UART interfaceKevin O'Connor2021-05-041-1/+1
| | | | | | | | | | | Commit ae89a659 caused a regression in the lpc176x UART handling. After that commit the UART clock divisor would need to be 6.25 on lpc1768 or 7.5 on lpc1769, but the code only supports whole numbers. Set the PCLKSELx registers at startup and return to using full speed peripheral clocks. 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>
* endstop: Report trigger time in endstop_query responseKevin O'Connor2021-04-301-2/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Use "clock" suffix instead of "time" in commandsKevin O'Connor2021-04-301-2/+2
| | | | | | The debugging code knows how to handle fields that end in "clock". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pulse_counter: Use "clock" suffix instead of "time" in commandsKevin O'Connor2021-04-301-3/+3
| | | | | | The debugging code knows how to handle fields that end in "clock". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Remove min_stop_interval from mcu codeKevin O'Connor2021-04-301-13/+3
| | | | | | | Now that the host never uses a min_stop_interval, remove it from the mcu code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Raise an error if configuring a pullup when that is not supportedKevin O'Connor2021-04-251-0/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Minor formatting, variable name, and error reporting changesKevin O'Connor2021-04-251-62/+53
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add i2c_read functionalityMichael Kurz2021-04-251-1/+34
| | | | | | This adds the i2c_read command to the lp176x MCU. Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* 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>
* linux: Don't use timer_repeat_until for linux "irq" pollingKevin O'Connor2021-04-211-29/+9
| | | | | | Use a simpler counter system to prioritize tasks and irqs when busy. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Call irq_poll() at start of run_tasks() loopKevin O'Connor2021-04-211-0/+1
| | | | | | | On architectures that poll for irqs, check for any pending irqs prior to checking if tasks are idle. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Rework timer_check_periodic() to use ticksKevin O'Connor2021-04-193-14/+14
| | | | | | Avoid using a 'struct timespec' to simplify the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Move timer fields into a structKevin O'Connor2021-04-191-31/+37
| | | | | | Storing the fields in a struct allows gcc to optimize memory pointers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>