23061febec | ||
---|---|---|
Drivers | ||
Middlewares/ST/STM32_USB_Device_Library | ||
inc | ||
src | ||
windows-driver | ||
.gitignore | ||
.travis.yml | ||
LICENSE.md | ||
Makefile | ||
README.md | ||
STM32F042C6_FLASH.ld | ||
cantact.ioc | ||
stm32f0x.cfg |
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 channelC
- Close channelS0
- Set bitrate to 10kS1
- Set bitrate to 20kS2
- Set bitrate to 50kS3
- Set bitrate to 100kS4
- Set bitrate to 125kS5
- Set bitrate to 250kS6
- Set bitrate to 500kS7
- Set bitrate to 750kS8
- Set bitrate to 1MM0
- Set mode to normal mode (default)M1
- Set mode to silent modeA0
- Disable automatic retransmissionA1
- 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