| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
| |
Reported by @kaidegit.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
| |
This is needed for the Creality Ender 3 S1 with the STM32F401 chips to enable a 64kib bootloader offset
Signed-off-by: James Hartley <james@hartleyns.com>
|
|
|
| |
Signed-off-by: Alexander Stöpperger <a.stoepperger@gmx-topmail.de>
|
|
|
|
|
|
| |
Reported by @StoneColdCrazy.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Reported by @GerogeFu.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
| |
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
|
|
|
|
|
|
|
|
|
| |
The stm32 specs indicate that the SPE bit must be cleared before
changing the CPHA or CPOL bits.
Reported by @cbc02009 and @bigtreetech.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible for the SCLK pin to still be updating even after the
last byte of data has been read from the receive pin. (In particular
in spi mode 0 and 1.) Exiting early from spi_transfer() in this case
could result in the CS pin being raised before the final updates to
SCLK pin.
Add an additional wait at the end of spi_transfer() to avoid this
issue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Don't reset the ADC peripheral if the clock is already enabled.
Fixes #5236
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
|
|
|
| |
Signed-off-by: Sergey Terentiev <sergey@terentiev.me>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Unify the handling of the enable_pclock() and is_enabled_pclock() code
across all stm32 chips. All chips will now perform a peripheral reset
on enable_pclock() (this is a change for stm32f0 and stm32h7). The
enable_pclock() code will now also disable irqs during the enable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
| |
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
|
|
|
|
|
|
| |
It seems the stm32f042 chip needs a small delay during ADC enable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
| |
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid read-modify-write operations where possible. The register
values are in a known state so prefer absolute writes.
Improve handling of race conditions with hardware updates.
Remove the adc reference from "struct gpio_adc" as it is a constant.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Use a fixed layout for the USB transfer memory and remove the ep_mem
struct definition.
This is in preparation for stm32g0 support.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
When the buffers are over 32 bytes, a block count of 1 starts at 0.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
The USB dfu bootloader wasn't enabled on stm32h7, so remove the
copy-and-paste code stubs for it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Reorganize stm32f0.c into major code blocks.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Reorganize stm32f4.c into major code blocks.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Reorganize stm32f1.c into major code blocks.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The gpio_peripheral() code is the same in stm32f0.c, stm32f4.c, and
stm32h7.c. Move that function to a new gpioperiph.c file to avoid
code duplication.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Tested by @FotoFieber.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
| |
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
| |
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Don't go above 400Mhz as otherwise it causes 32bit rollover issues.
(Parts of the code expect a rollover will not occur faster than 10
seconds.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
| |
Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
|
|
|
|
|
|
|
| |
Reset peripherals to after enabling to clear stale
registers set by the bootloader.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
| |
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Add an optimized step function for drivers that support stepping on
both rising and falling edges of the step pin. Enable this
optimization on 32bit ARM micro-controllers. Automatically detect
this capability in the host code and enable on TMC drivers running in
SPI/UART mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The floating point unit must be enabled in order to use it and Klipper
does not currently implement that. Newer versions of gcc may spill
registers to the floating point unit causing failures.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The F042 and F072 chips are in the same series and the code should be
nearly identical for these chips. Implement the alias and enable USB
for the F072 chips.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
The previous OSPEEDR value of 0x2 was copied from the stm32f4.c code,
but the stm32f0 interprets that value the same as 0x0 - which is "low"
speed. Change the OSPEEDR value to "medium" speed so that it matches
the configuration of stm32f1 chips.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|