Kevin O'Connor
4ec6db7a87
stm32: Add support for additional ADC3 ports on stm32f4
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-15 23:21:41 -04:00
Kevin O'Connor
aac51bdb0a
stm32: Initial support for USB On-The-Go (OTG) driver on stm32f4
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-15 22:26:49 -04:00
Kevin O'Connor
841150ff00
stm32: Enable 48Mhz USB clock on stm32f446
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-14 19:33:11 -04:00
Kevin O'Connor
effe6f6ddd
lcd_st7920: Add brief delay around gpio toggle calls on fast MCUs
...
On fast MCUs (like the SAMD51) it is possible for the gpio to toggle
faster than the st7920 can accept. Add a small delay around the clock
rise signal.
Signed-off-by: Lars R. Hansen <popshansen@hotmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-10 11:45:15 -04:00
Kevin O'Connor
a70055a625
stm32: Add support for the 32KiB bootloader on the SKR Pro
...
Signed-off-by: Gerrit Sturm <gsturm16@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-09 20:37:31 -04:00
Kevin O'Connor
96ff54e143
stm32: Add serial USART serial port option for port PD9/PD8
...
Signed-off-by: Gerrit Sturm <gsturm16@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-09 20:32:46 -04:00
Kevin O'Connor
f6d1ab2ea2
neopixel: Rework timing so that it works on AVR micro-controllers
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-07 15:37:05 -04:00
Kevin O'Connor
8712648370
stm32: Fix memory sizing for STM32F405/7 chips
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-06 23:35:45 -04:00
Kevin O'Connor
c2a08962b7
spicmds: Rework spi config commands
...
Rework the spi_config commands so that bus configuration and shutdown
message configuration is done separately from the main "config_spi"
command. This makes the spi configuration more flexible. It's now
possible to use software spi without a CS pin. It's now possible to
define multiple SPI messages to send on a shutdown event.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-06 18:56:53 -04:00
Kevin O'Connor
3d0f7188df
stm32: Automatically disable SWD if PA13/PA14 is used on stm32f103
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:39:42 -04:00
Kevin O'Connor
36217f27aa
stm32f1: Remove now unused src/stm32f1/ directory
...
Now that the stm32f1 code has been merged into the stm32 code, there
is no longer a need to keep the stm32f1/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:25:40 -04:00
Kevin O'Connor
fe065d72d0
stm32: Rename clock.c to stm32f4.c
...
Rename the clock.c file to stm32f4.c to make it more clear that the
code is specific to the stm32f4 chips.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:25:40 -04:00
Kevin O'Connor
8b9cc62359
stm32: Rename stm32f4/ directory to stm32/
...
Now that the code in stm32f4/ can handle both stm32f1 and stm32f4
chips, rename the directory to just "stm32".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:25:40 -04:00
Kevin O'Connor
ec3d865b51
stm32f4: Add support for USB on stm32f103
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:25:40 -04:00
Kevin O'Connor
7efc53ff59
stm32f4: Add support for STM32F103
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-05 11:25:40 -04:00
Kevin O'Connor
c176b66f29
stm32f4: Allow the USART serial port to be configured
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-28 22:55:48 -04:00
Kevin O'Connor
e6ffef9a9f
stm32f4: Make using the internal clock source a low level option
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-28 22:55:48 -04:00
Kevin O'Connor
9bc3a29ee4
stm32f4: Add support for full range of GPIO pins
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-28 22:55:48 -04:00
Kevin O'Connor
bc9c8cd7a0
stm32f4: Only enable peripherals once
...
Add is_enabled_pclock() and only initialize spi and adc once during
configuration.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-28 17:57:02 -04:00
Kevin O'Connor
ef0784afe6
stm32f4: Encode mode/func into single parameter of gpio_peripheral
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-28 11:32:56 -04:00
Kevin O'Connor
92c2fbdce4
armcm_timer: Improve comments on wrap_timer code
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-27 22:05:50 -04:00
Kevin O'Connor
7bc0a261ab
stm32f4: Automatically calculate dynmem start/end
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-27 21:32:04 -04:00
Kevin O'Connor
16616662ed
stm32f4: Add Kconfig build rules for STM32F405/7
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-27 21:32:04 -04:00
Kevin O'Connor
961d13ee1a
stm32f4: Add support for SPI
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-27 21:01:01 -04:00
Kevin O'Connor
d79f99b188
stm32f4: Add support for ADC
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-27 10:58:28 -04:00
Kevin O'Connor
73709984b0
stm32f4: Add support for watchdog
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-26 08:36:11 -04:00
Kevin O'Connor
899b6726fa
stm32f4: Improve serial baud rate calculation
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-26 08:01:31 -04:00
Kevin O'Connor
f3d7287a28
stm32f4: Add support for external 8Mhz crystal
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-26 07:51:12 -04:00
Kevin O'Connor
1487f8a257
stm32f4: Add support for GPIO
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-25 18:13:06 -04:00
Kevin O'Connor
d501ca6b0b
stm32f4: Add initial support for STM32F446 chip
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-25 18:08:28 -04:00
Kevin O'Connor
52dd6f0b57
atsamd: Fix comment typo in serial.c
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-25 12:18:21 -04:00
Kevin O'Connor
634ec46813
initial_pins: Only build when CONFIG_HAVE_GPIO is enabled
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-24 01:09:45 -04:00
Kevin O'Connor
79bd13dba7
armcm_timer: Support micro-controllers faster than 160Mhz
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-24 01:08:18 -04:00
Kevin O'Connor
4e5ddff00b
neopixel: Update to more flexible bit-banging timing
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-23 22:00:12 -04:00
Kevin O'Connor
893acdb56b
lib: Update stm32f1 code to version 1.8.0
...
Update the stm32f1 code to the latest from ST. Merge the
lib/cmsis-stm32f1/ and lib/hal-stm32f1/ into a single lib/stm32f1/
directory. Document all the differences from the pristine upstream
code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-21 22:40:56 -04:00
Kevin O'Connor
1a387ad509
stm32f0: Remove trailing tab from Makefile
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-21 21:49:22 -04:00
Kevin O'Connor
d5cc2a7b7b
neopixel: Improve timing of gpio bit-banging
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-17 16:36:28 -04:00
Kevin O'Connor
0af5b9ff6d
neopixel: Be sure to set the line low on a failed write
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-13 00:00:57 -04:00
Kevin O'Connor
be2d0abbab
neopixel: Optimize the update loop
...
Optimize the transmit code so it can run on some slower ARM cpus.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-12 23:39:00 -04:00
Kevin O'Connor
b7bc96c3b2
neopixel: Add initial support for "neopixel" leds
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-12 21:44:01 -04:00
Kevin O'Connor
28aa2f507a
endstop: Rename mcu end_stop commands to endstop
...
Rename the commands.
The main reason for this change is to force a micro-controller code
updated (due to important bugfix in 7fefe52d
).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-12 08:10:53 -04:00
Kevin O'Connor
7fefe52df7
stepper: Don't update SF_LAST_DIR if SF_NEED_RESET
...
If the move is not added to the move queue, then the SF_LAST_DIR
setting must not be changed. Otherwise, it could result in an
incorrect direction being set on the stepper after a homing operation.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-12 07:54:24 -04:00
Kevin O'Connor
b77375e955
lpc176x: Reset LPC_UART0->FDR when using serial
...
The popular "LPC17xx-DFU-Bootloader" alters the LPC_UART0->FDR
register, so be sure to reset it back to its default when using serial
in Klipper.
Reported by @b-vs.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-10 20:00:58 -04:00
Arksine
0f1d42466b
buttons: initialize mcu buttons based on inverted state
...
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2019-07-05 20:01:07 -04:00
Kevin O'Connor
8951dc3d51
lpc176x: Add more filtering to workaround adc hardware defect
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-20 08:57:24 -04:00
Kevin O'Connor
8d029ad652
lpc176x: Fix adc clock divisor
...
Commit 1096075d
changed CONFIG_CLOCK_FREQ to the actual cpu frequency,
but that commit failed to update adc.c accordingly. That made the adc
run 4 times slower. Make the corresponding change to adc.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-19 21:21:01 -04:00
Kevin O'Connor
700e35c6ac
armcm_timer: Unify udelay() implementation
...
Move the udelay() code from various arm board directories into the
src/generic/armcm_timer.c code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-09 20:27:57 -04:00
Kevin O'Connor
3910a44cc9
atsam: Add support for "timer" controlled hardware pwm pins
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-02 10:59:33 -04:00
Kevin O'Connor
e2e4a5d4e6
atsamd: Add build support for SAMD21E15 chip
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-01 13:43:37 -04:00
Kevin O'Connor
9e7ef3cf89
atsamd: Reduce the compile size of the hard_pwm pin list
...
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-05-30 14:05:31 -04:00