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>
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>
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>
* 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>
Separate out the high-level command processing logic from the
low-level transmission code. Place the high-level code in
src/generic/canbus.c .
This also removes the CAN dependency on serial_irq.c .
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't perform any heavy tasks in the CAN interrupt handler - just
notify a background task to handle anything pending.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The spec states that the TX fifo is transmitted in chronological order
if the TXFP bit is set, but it's unclear if the software needs to fill
the tx fifo in a particular order to obtain that result. Use the TSR
CODE bit field to fill the TX fifo in the order that the hardware
reports as next.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Prefer explicitly setting the hardware registers and avoid using C
read and modify instructions where possible. This avoids race
conditions where an interrupt or hardware change could cause subtle
corruption of the register state.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The HSI48 clock on the stm32f042 isn't as accurate as the main HSI
clock. So, only use the HSI48 clock when using USB to synchronize
that clock.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Restore the default of an 8KiB bootloader for stm32f103 and a 32KiB
bootloader for stm32f207/stm32f407.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Improved CAM bus ID generation, there were issues with ID collisions.
Added a small fast hash library.
Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
Reworked the STM32F0 CAN bus implementation. It's more robust and higher performance.
Added support for function remapping to different pins. API is emulating an STM32F0.
Improved and ported CAN bus to STM32F0, F1 and F4.
Signed-off-by: Pontus Borg <glpontus@gmail.com>
Initial support for stm32f2 in general and STM32F207 in particular.
Boots up and communicates on STM32F207VC.
Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.com>
Add a new build definition to note micro-controllers that have strict
timing. The Linux mcu code does not have strict timing - all other
targets currently do.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Endpoint 0 OUT needs to NAK everything until the core signals that the
setup stage is complete.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
A setup packet is only valid after receiving the "setup complete"
notification.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>