aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* flash_usb: Run dfu-util via sudoKevin O'Connor2019-03-112-2/+2
| | | | | | | Default to running dfu-util via sudo as most machines will not have the user setup with permissions to access the raw usb device. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* flash_usb: Try to make the bossac atsam reboot logic more stableKevin O'Connor2019-03-101-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Support an optimized step/unstep function on ARMKevin O'Connor2019-03-103-32/+58
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Add support for entering the bootloader via USBKevin O'Connor2019-03-083-2/+17
| | | | | | | | | | | | Add support for entering the "stm32duino" bootloader via the arduino 1200 baud USB request. Add supprot for flashing over USB via the "make flash" command. Rename the existing "make flash" command to "make serialflash". Default to using a bootloader in Kconfig. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add support to "make flash" to automatically enter the bootloaderKevin O'Connor2019-03-081-3/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Improve support for flashing over USBKevin O'Connor2019-03-081-4/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add support for flashing via "make flash"Kevin O'Connor2019-03-081-6/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Reduce use of $^ in build rulesKevin O'Connor2019-03-025-9/+9
| | | | | | | It's rare to use all of a target's prerequisites in a recipe - replace most cases with $< (the target's first prerequisite). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Fix lpc176x and stm32f1 buildsKevin O'Connor2019-03-022-15/+13
| | | | | | | | | Commit e18501d0 broke the build for targets that added objects to klipper.elf via adding dependencies. Rework the build so that it is possible to add objects to klipper.elf via a new OBJS_klipper.elf makefile variable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Reduce memory for have_run_init in spi/i2cKevin O'Connor2019-03-012-6/+6
| | | | | | | Some of the samd21 chips have limited memory - change the code to reduce the size of global variables. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add definitions for SAMD21E18 chipKevin O'Connor2019-03-012-2/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Implement custom memory allocation functionsKevin O'Connor2019-03-012-2/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use CONFIG_MCU in MakefileKevin O'Connor2019-03-011-6/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use the full micro-controller name for CONFIG_MCUKevin O'Connor2019-03-011-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Use local linker scriptKevin O'Connor2019-03-013-9/+84
| | | | | | | Use a local linker script instead of the linker script provided by Atmel. This will allow Klipper to use dynamic memory allocation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add support for programming SERCOM pinsKevin O'Connor2019-03-017-41/+430
| | | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pru: Wrap code to 80 columnsKevin O'Connor2019-02-272-21/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Wrap code to 80 columnsKevin O'Connor2019-02-273-3/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Wrap code to 80 columnsKevin O'Connor2019-02-273-3/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spicmds: Wrap code to 80 columnsKevin O'Connor2019-02-271-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pwmcmds: Wrap code to 80 columnsKevin O'Connor2019-02-271-2/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Wrap code to 80 columnsKevin O'Connor2019-02-271-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: Wrap code to 80 columnsKevin O'Connor2019-02-271-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Wrap code to 80 columnsKevin O'Connor2019-02-271-3/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* simulator: Wrap code to 80 columnsKevin O'Connor2019-02-271-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Wrap code to 80 columnsKevin O'Connor2019-02-272-6/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Add support for pull down resistorsKevin O'Connor2019-02-275-18/+36
| | | | | | | Add initial support for selecting pull down resistors (for micro-controllers that support it). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Default to using an external 32Khz crystalKevin O'Connor2019-02-241-2/+2
| | | | | | | Most samd boards have the crystal and it does improve the clock accuracy, so default to enabling it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add support for reference clock selection to SAMD21Kevin O'Connor2019-02-222-27/+58
| | | | | | | | | Add support for using the internal clocks (with USB clock recovery mode if available) on the SAMD21. Don't use the internal clock if the external crystal is requested (instead use the PLL synced to the external 32Khz signal). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Update SAMD51 clock configurationKevin O'Connor2019-02-222-41/+64
| | | | | | | | | Add support for USB clock recovery mode if an external 32Khz crystal is not in use. If using an external crystal, then don't use the internal 48Mhz DFLL48Mhz clock (just use the PLLs synced to the external 32Khz signal). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Increase ADC frequency on SAMD51Kevin O'Connor2019-02-221-2/+2
| | | | | | | | The SAMD51 ADC is only clocked on rising edges (vs both rising and falling edges on the SAMD21) and it has a greater minimum frequency than the SAMD21. So, increase the ADC clock. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Only support 8KiB bootloader on SAMD21Kevin O'Connor2019-02-221-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add a GET_FUSE() helper macroKevin O'Connor2019-02-223-26/+19
| | | | | | | Add a helper macro for accessing the non-volatile factory-calibrated "fuse" values. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Only prompt for cpu speed and uart port on LOW_LEVEL_OPTIONSKevin O'Connor2019-02-161-3/+3
| | | | | | | The cpu is almost always 16Mhz and the serial port is almost always UART0, so no need to prompt in the normal case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Fix samd51 get_clock() sync bit checkKevin O'Connor2019-02-161-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Fix typo in MakefileKevin O'Connor2019-02-161-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Do not generate 200M/100M interal clocksKevin O'Connor2019-02-161-51/+2
| | | | | | | | Now that the internal DWT timer is used for software timers, there is no need to clock the peripherals at a higher clock speed. Clock all peripherals at 48Mhz and simplify the clock generation code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Don't clear the watchdog if a clear is still in progressKevin O'Connor2019-02-152-2/+4
| | | | | | | | Clearing the watchdog while it is in progress can cause bus stalls on the SAMD21. It appears that clearing the watchdog on the SAMD51 can cause lockups of the watchdog device. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Move watchdog code to its own filesKevin O'Connor2019-02-154-31/+49
| | | | | | | Move the watchdog code from main.c to watchdog.c and samd51_watchdog.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Fix hard pwm cycle divider calculationKevin O'Connor2019-02-131-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spi_software: Implementation of software spiKevin O'Connor2019-02-134-5/+128
| | | | | Signed-off-by: Matt Janus <FragginRight@variabl.es> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Add support for hard pwm via PWM controllerKevin O'Connor2019-02-134-3/+106
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Fix typo in header guardKevin O'Connor2019-02-131-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Enable ADC support for samd51 devices (#1204)Florian Heilmann2019-02-083-19/+100
| | | | | | * adc: Enable ADC support for samd51 devices Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* atsam: Configure the atsam sram matrix registerKevin O'Connor2019-02-071-0/+11
| | | | | | | | The sram matrix configuration is, bizarrely, configured with a slow default. It will typically add an extra wait state to every memory access. Set the matrix sram controller to improve the performance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* debugcmds: Add support for reading/writing 32bit valuesKevin O'Connor2019-02-071-29/+25
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Convert code to use armcm_timerKevin O'Connor2019-02-064-123/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Use internal functions for early USB gpio toggleKevin O'Connor2019-02-063-6/+24
| | | | | | | Avoid using the "low-level" library timing utilities. This is in preparation for using SysTick as part of the timer implementation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Convert code to use armcm_timerKevin O'Connor2019-02-064-67/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Convert code to use armcm_timerKevin O'Connor2019-02-064-190/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>