aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* linux: Avoid calling timer_read_time() in timer_dispatch() when not neededKevin O'Connor2021-04-181-3/+15
| | | | | | | The timer_read_time() call can be expensive - when the next timer is definitely pending, avoid making that call. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Simplify timer dispatch codeKevin O'Connor2021-04-181-54/+50
| | | | | | | | Implement rescheduling math using the simple 32-bit timer instead of the Unix timespec struct. This makes the code simpler and doesn't adversely impact the overall performance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Fix local timer_repeat_until cache in timer.cKevin O'Connor2021-04-181-1/+1
| | | | | | | Make sure to update the local copy of timer_repeat_until when updating it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: CAN Kconfig typoOliver2021-04-072-2/+2
| | | | | | Fixed simple typo in the Kconfig and can.c. stm32f4 CAN Pins Signed-off-by: Oliver Walter <oli1111@web.de>
* stm32f1: reset peripherals in enable_pcclock()Arksine2021-04-071-0/+4
| | | | | | Some bootloaders do not disable peripherals in use before jumping to the application. Reset peripherals to assure correct operation. SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32: Add hardware PWM support for STM32F1Michael Kurz2021-03-265-0/+179
| | | | | | | | | This adds hardware PWM support for STM32F1 processors. This should also work for STM32 F0/F2/F4 processors, but I don't have one of those to test it. Signed-off-by: Michael Kurz <michi.kurz@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add hardware PWM support for LPC176xMichael Kurz2021-03-265-0/+107
| | | | | | This adds hardware PWM support for LPC176x processors. Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* lpc176x: Do not modify PCLKSELx at runtimeKevin O'Connor2021-03-251-8/+1
| | | | | | | | | The lpc176x has an errata that could cause updates to PCLKSELx to not take effect. Rework the code to use the default peripheral clock speed (25Mhz or 30Mhz) so that this register does not need to be updated at runtime. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Introduce get_pclock_frequency()Kevin O'Connor2021-03-256-12/+23
| | | | | | | Add get_pclock_frequency() - a standard way of obtaining the peripheral clock frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: Segmentation fault on 64bit Raspberry PiEvgeny Chukreev2021-03-191-1/+1
| | | | Signed-off-by: Evgeny Chukreev <Evgeny.Chukreev@gmail.com>
* stm32: Minor optimization to can.c IRQ data readingKevin O'Connor2021-03-181-10/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Support reading CAN packets directly from IRQ handlerKevin O'Connor2021-03-183-17/+67
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Fix Kconfig USB/Serial selectionKevin O'Connor2021-03-181-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use "communication interface" menu option in KconfigKevin O'Connor2021-03-181-4/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use "communication interface" menu option in KconfigKevin O'Connor2021-03-181-8/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Use "communication interface" menu option in KconfigKevin O'Connor2021-03-181-4/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Use "communication interface" menu option in KconfigKevin O'Connor2021-03-181-12/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify USB/Serial/CANbus Kconfig selectionKevin O'Connor2021-03-185-98/+116
| | | | | | | Combine the various communication options into a single "make menuconfig" menu item. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Rework CAN command protocolKevin O'Connor2021-03-133-73/+94
| | | | | | | Rework the micro-controller command protocol so that it supports direct communication with the serialqueue.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Improve ARM Cortex-M control transfer from bootloaders (#4024)Matt Baker2021-03-091-8/+39
| | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* stm32: Add support for STM32F1 I2C1 alternate pin mapping (#4012)Michael Kurz2021-03-022-5/+15
| | | | | | This adds support for the alternate pin mapping of I2C1 on PB8/9 in STM32F1 devices Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* fan: Add tachometer supportAdrian Keet2021-03-012-1/+100
| | | | | | | | | | | | | | This adds new config options for fans: 'tachometer_pin' to specify the GPIO pin, and 'tachometer_ppr' (default 2) to specify the number of signal pulses per revolution. The rpm is also exposed by get_status for command templates and the API server. For fast fans (at least 10000 RPM), the polling interval can be shortened using the 'tachometer_poll_interval' option. There is a new mcu object for a generic edge counter, which repeatedly polls a GPIO pin and periodically reports the count to the host. Signed-off-by: Adrian Keet <arkeet@gmail.com>
* stm32: Add support for 48KiB bootloadersKevin O'Connor2021-02-201-0/+3
| | | | | | Reported by @mks-viva. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Optimize stm32f401 peripheral clockKevin O'Connor2021-02-191-2/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: stm32f401 pll_freq updatesArkadiusz Raj2021-02-191-2/+3
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: 25MHz clock fixesArkadiusz Raj2021-02-191-1/+2
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Fix missing STM32F429 clock initializationArkadiusz Raj2021-02-191-2/+3
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: F429 shall use 168Mhz to allow easy USB clock configurationArkadiusz Raj2021-02-191-2/+2
| | | | Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Add STM32F429 variant (#3926)Arek2021-02-182-9/+22
| | | | | | | * Add F429 variant; add CAN on PD0,PD1; add 25Mhx clock; move CAN1_RX from PI8 to correct position (PI9) * Add test for STM32F429 Signed-off-by: Arkadiusz Raj <arek.raj@gmail.com>
* stm32: Add support for spi bus on stm32f407 pins PI2,PI3,PI1Kevin O'Connor2021-02-121-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Minor indention change to spi.cKevin O'Connor2021-02-121-10/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pru: Request the host not send more than 496 bytes to the pruKevin O'Connor2021-02-121-0/+3
| | | | | | | | Writes over 496 bytes don't fit in a single "rpmsg" page. Request the host limit the number of bytes outstanding to avoid getting "write: (22)Invalid argument" errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Call can_notify_rx() at startup so low-level code does not need toKevin O'Connor2021-02-092-3/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Rename canbus_set_dataport() to canbus_set_filter() and simplifyKevin O'Connor2021-02-093-13/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>