Go to file
Ethan Zonca 23061febec Update README and add support for autoretransmit enable/disable 2018-12-31 14:24:46 -05:00
Drivers Port to new HAL, fixes USB issues. Revert to blocking CAN RX/TX. Add unique serial number from chip UID. 2018-10-07 14:19:58 -04:00
Middlewares/ST/STM32_USB_Device_Library Bump HAL and CMSIS libraries to latest version 2016-08-18 22:08:04 -04:00
inc Update README and add support for autoretransmit enable/disable 2018-12-31 14:24:46 -05:00
src Update README and add support for autoretransmit enable/disable 2018-12-31 14:24:46 -05:00
windows-driver added windows driver 2015-05-13 17:14:43 -04:00
.gitignore first commit 2015-01-14 10:09:08 -05:00
.travis.yml added silent mode, moved GPIO init 2015-05-14 17:41:28 -04:00
LICENSE.md first commit 2015-01-14 10:09:08 -05:00
Makefile Include and source directories now lower case 2016-08-11 22:12:58 -04:00
README.md Update README and add support for autoretransmit enable/disable 2018-12-31 14:24:46 -05:00
STM32F042C6_FLASH.ld first commit 2015-01-14 10:09:08 -05:00
cantact.ioc Bump HAL and CMSIS libraries to latest version 2016-08-18 22:08:04 -04:00
stm32f0x.cfg first commit 2015-01-14 10:09:08 -05:00

README.md

CANable/CANtact Firmware

This repository contains sources for the slcan CANtact firmware modified for the CANable USB to CAN adapter.

Supported Commands

  • O - Open channel
  • C - Close channel
  • S0 - Set bitrate to 10k
  • S1 - Set bitrate to 20k
  • S2 - Set bitrate to 50k
  • S3 - Set bitrate to 100k
  • S4 - Set bitrate to 125k
  • S5 - Set bitrate to 250k
  • S6 - Set bitrate to 500k
  • S7 - Set bitrate to 750k
  • S8 - Set bitrate to 1M
  • M0 - Set mode to normal mode (default)
  • M1 - Set mode to silent mode
  • A0 - Disable automatic retransmission
  • A1 - Enable automatic retransmission (default)
  • TIIIIIIIILDD... - Transmit data frame (Extended ID) [ID, length, data]
  • tIIILDD... - Transmit data frame (Standard ID) [ID, length, data]
  • RIIIIIIIIL - Transmit remote frame (Extended ID) [ID, length]
  • rIIIL - Transmit remote frame (Standard ID) [ID, length]

Note: Channel configuration commands must be sent before opening the channel. The channel must be opened before transmitting frames.

This firmware currently does not provide any ACK/NACK feedback for serial commands.

Building

Firmware builds with GCC. Specifically, you will need gcc-arm-none-eabi, which is packaged for Windows, OS X, and Linux on Launchpad. Download for your system and add the bin folder to your PATH.

With that done, you should be able to compile using make. If you are compiling for a device that has no external crystal, compile with make INTERNAL_OSCILLATOR=1.

Flashing & Debugging

Debugging and flashing can be done with any STM32 Discovery board as a programmer. You can also use other tools that support SWD.

To use an STM32 Discovery, run OpenOCD using the stm32f0x.cfg file: openocd -f fw/stm32f0x.cfg.

With OpenOCD running, arm-none-eabi-gdb can be used to load code and debug.

Contributors

  • Ethan Zonca - Makefile fixes and code size optimization
  • onejope - Fixes to extended ID handling
  • Phil Wise - Added dfu-util compatibility to Makefile

License

See LICENSE.md