Commit Graph

91 Commits

Author SHA1 Message Date
Frederic Morin 33b18fd62b stm32f7: add support for stm32f7 and remram board
Signed-off-by: Frederic Morin <frederic.morin.8@gmail.com>
2023-05-07 11:15:05 -04:00
Kevin O'Connor 3bd0be40d5 lib: Update to latest can2040 code
Disable tx state machine before resetting it
Check for rx message with same id as tx but different payload
Do not use canrx line to alter bit timing of cantx line
Improve bit time synchronization with slow transmitters
Implement tx synchronization to faster transmitters

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-05-03 10:45:41 -04:00
Wulfsta 06e5c577bd lib: Add Atmel SAM C21 headers
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2023-05-01 13:56:32 -04:00
Kevin O'Connor 1987742545 lib: Update to latest can2040 code
Fix tx hang after error frame during tx

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-29 11:49:53 -04:00
Kevin O'Connor aa8a6f4cf1 lib: Update to latest can2040 code
Avoid some gcc warnings by using uint32_t for iterators
Better document the fallthough case statement in crc_bytes()
Fix txpending race from report_line_ackdone()
Make can2040_transmit() multi-cpu atomic

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-04-11 11:20:57 -04:00
Alexey 23e82d37f1
stm32: Add support for Nation N32G45x mcus (#6116)
N32G452/G455 are mostly compatible with STM32F103 but have M4 core and different ADC.

Signed-off-by: Alexey Golyshin <stas2z@gmail.com>
2023-04-07 12:20:14 -04:00
Elias Bakken b7978d37b3
ar100: Support for ar100 (#6054)
Add files to support AR100

Signed-off-by: Elias Bakken <elias@iagent.no>
2023-02-20 20:15:01 -05:00
Steven Gotthardt 94cbf5ff48 lib: Add hc32f460 definitions
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
2023-02-13 12:12:27 -05:00
bigtreetech 50b2e2e67e lib: update lib/stm32h7 to v1.9.0 for stm32h723
Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com
2022-12-02 13:26:02 -05:00
Matt Baker 9ab367d813 stm32g4: add lib from stm32cubeg4 v1.4.0
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2022-12-02 11:31:42 -05:00
Kevin O'Connor 1b56a63abf lib: Update to latest can2040 code
Clear PIO irq flags in pio_sm_setup()
Set TXPENDING during pio_sm_setup()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-11-23 11:59:24 -05:00
Kevin O'Connor c51f169c06 lib: Update to latest can2040 code
Fix PIO "sync" register overflow check
Reduce latency of tx scheduling
Clear ackdone irq from report_note_eof_success()
Defer ack inject until after rx fifo drained
Improve passive/dominant bit conflict check on tx reschedule

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-11-21 09:36:30 -05:00
Kevin O'Connor cfb633a0ec lib: Update to latest can2040 code
Minor comment change to unstuf_pull_bits()
Introduce unstuf_get_raw() helper function
Move crc stuffed bit calculation to data_state_go_crc()
Restore stuffed_bits state on missing ack
Use a single pio_irq_set() function
Reschedule tx if previous tx unexpectedly finished transmit
Simplify report_state handling

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-11-19 10:31:08 -05:00
Kevin O'Connor 6cc104677e lib: Update to latest can2040 code
Fix gpio function selection for PIO1 usage.
Minor variable name changes.
Allow scheduling tx "matched" event after a crc match.
Allow for up to 5 passive bits after unstuf_clear_state().
Pause PIO "rx" bit reception after 10 passive bits.
Signal the CPU to process data every 10 read bits.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-10-13 17:11:57 -04:00
Kevin O'Connor 69bd26b757 lib: Add atmel same51 and same54 build definitions
This also replaces the samd51 component files with the definitions
from the same54 repository.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-10-13 11:27:14 -04:00
Kevin O'Connor 960fd0b1f3 lib: Remove unused gcc/ directories from samd21 and samd51 directories
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-10-13 11:27:14 -04:00
Matt Baker d9c917b950 stm32l4: add stm32l412 support with adc,i2c,spi,usb
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2022-09-15 11:51:26 -04:00
Matt Baker 57b0eb5d43 stm32l4: copy libs from STM32CubeL4 v1.17.0
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2022-09-15 11:51:26 -04:00
Kevin O'Connor 75c4b1238e lib: Update to latest can2040 code
Simplify tx state tracking.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-07-16 21:08:58 -04:00
Kevin O'Connor 36887ce6fe lib: Update to the latest can2040 code
Rename to "match" state machine instead of "ack".
Minor simplification to tx_note_crc_start().
Call pio_match_clear() from report functions.
Add pio_match_calc_key() helper function.
Raise irq after 6 passive eof bits for faster rx message notification.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-07-16 09:57:12 -04:00
Kevin O'Connor f10fd7c2fa lib: Add can2040 code
The "can2040" project implements "software canbus" support on rp2040
micro-controllers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-07-06 00:28:48 -04:00
Kevin O'Connor d3c4ba4839 rp2040: Add a Kconfig option for selecting "generic_03H" flash type
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-06-20 13:03:58 -04:00
Kevin O'Connor c43f62bdd6 lib: Update lib/README with latest canboot changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-06-03 14:53:18 -04:00
Eric Callahan b829a89069 flash_can: add usb support
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-06-03 14:51:01 -04:00
Kevin O'Connor be4b8b17f2 docs: Minor CanBoot documentation fixes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-05-10 11:55:06 -04:00
Eric Callahan 5ec3939f34 lib: add flash_can.py
This script may be used to update Klipper firmware for CAN
nodes running the CanBoot bootloader.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-05-10 11:48:06 -04:00
Alex Maclean 99c2bf0ded lib: Add Atmel SAM E70 headers
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
2022-03-26 11:59:27 -04:00
Lasse Dalegaard 7c0559c6e6 rp2040: add make flash support
This adds `make flash` support for the rp2040 target. Flashing is
performed using a custom `rp2040_flash` tool that uses the PICOBOOT
protocol. Root is not required.

The user specifies the serial device of the rp2040 they wish to flash as
the device. This device is reset into bootsel mode and `rp2040_flash`
is invoked on the original USB device path.

If the device is already in bootloader mode, the user can specify
'first' as `FLASH_DEVICE` which will simply invoke `rp2040_flash` with
no bus/address options.

Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
2022-01-06 17:32:54 -05:00
Kevin O'Connor 4576b3918c lib: Add cmsis libraries for stm32g0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-12-23 22:15:25 -05:00
D4SK 53b98ebaed lib: Added cmsis libraries for stm32h7
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:17:06 -04:00
D4SK 309fbbc104 lib: Updated existing cmsis-core for stm32h7 support
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-06 18:17:06 -04:00
Kevin O'Connor 8865f5799e lib: Update stm32f4 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:14:54 -04:00
Kevin O'Connor 72c07acc99 lib: Update stm32f2 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:10:09 -04:00
Kevin O'Connor 118f787d5c lib: Update stm32f1 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:06:33 -04:00
Kevin O'Connor 729ac52851 lib: Update stm32f0 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:06:33 -04:00
Kevin O'Connor 20c5976356 lib: Changes to rp2040 build files to work in Klipper build system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-07-04 10:11:02 -04:00
Kevin O'Connor cc0969dd05 lib: Add rp2040 build files
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-07-04 10:11:02 -04:00
Kevin O'Connor 45cd3543e3 lpc176x: Use full peripheral clock speed; fix UART interface
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>
2021-05-04 20:29:48 -04:00
Arksine 7699834a61 lib: add FatFS notes to README
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-02-05 19:37:56 -05:00
Arksine 4f34c6a4e8 lib: add FatFS library files
FatFS is an open source filesystem library supporting FAT12, FAT16, FAT32, and exFAT.  The source is available at http://elm-chan.org/fsw/ff/00index_e.html

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-02-05 19:37:56 -05:00
Kevin O'Connor 928fc0df72 kconfiglib: Update README with info on kconfiglib modifications
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-23 10:17:48 -05:00
Kevin O'Connor c947e5e8d2 kconfiglib: Update menuconfig.py with simpler menu layout
Remove infrequently used menu options (custom file loading/saving and
developer modes).  Simplify the help screen.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-23 10:17:48 -05:00
Kevin O'Connor 779b99c42b kconfiglib: Update kconfiglib.py to always emit symbols
Emit all symbols (even ones disabled) to the autoconf.h header file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-23 10:17:48 -05:00
Kevin O'Connor 0d5b05c704 lib: Add kconfiglib code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-11-23 10:17:48 -05:00
Kevin O'Connor 2c76f7527d lib: Add a .gitignore file for intermediate files in lib/ directory
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-21 11:34:06 -04:00
Kevin O'Connor 153883c6c5 lib: Fix whitespace in README
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-09 21:10:08 -04:00
bondus 35d28e880d
stm32: Improvements to CAN bus ID generation. And added a small fast hash library (#3165)
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>
2020-08-09 21:07:59 -04:00
combolek 7cab732ae9
stm32: Initial support for stm32f2 (#3001)
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>
2020-06-23 10:52:15 -04:00
Kevin O'Connor 5ef930454e lib: Add info on hidflash to README.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-28 14:53:57 -04:00
Kevin O'Connor a5b5474f69 hidflash: Convert changes.diff to a unix style file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-28 14:52:22 -04:00