Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvollrath/canbus_bbone_stm32
LED sync between BeagleBone Black and STM32F4 Discovery Board
https://github.com/mvollrath/canbus_bbone_stm32
beaglebone-black can-bus socketcan stlink stm32f4-discovery
Last synced: 3 months ago
JSON representation
LED sync between BeagleBone Black and STM32F4 Discovery Board
- Host: GitHub
- URL: https://github.com/mvollrath/canbus_bbone_stm32
- Owner: mvollrath
- Created: 2015-12-19T06:09:47.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-03T00:21:46.000Z (almost 8 years ago)
- Last Synced: 2024-04-18T19:37:52.357Z (7 months ago)
- Topics: beaglebone-black, can-bus, socketcan, stlink, stm32f4-discovery
- Language: C
- Size: 568 KB
- Stars: 12
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-canbus - BB-to-STM32 - LED sync between BeagleBone Black and STM32F4 Discovery Board. (Hardware / Others HW)
README
### Video
I swear this works at least a little bit, here look:
### Enabling CAN Bus on BeagleBone Black
You'll need to compile and install a dtbo.
There are a couple of scripts that can do this for you:
```
./build_dtbo.sh
./install.sh
```### DIY CAN Bus Cape
This describes how to put together a CAN Bus transceiver project board.
### SocketCAN
The canping and canpong binaries use the excellent [SocketCAN](https://www.kernel.org/doc/Documentation/networking/can.txt) interface. Once DCAN1 is enabled, use `iface.sh` to set up `can0` and `vcan0` interfaces.
### Preparing LED's on BeagleBone Black
Use `leds.sh` to disable the default LED triggers on the BBB.
### Building canping and canpong
Shouldn't need anything special.
```
gcc -o canping canping.c
gcc -o canpong canpong.c
```### Testing canping and canpong
As long as `vcan0` is available, this should give you some blinkage.
```
./canping -n vcan0 &
sudo ./canpong -n vcan0 &
```Kill everything with `pkill canping` and `sudo pkill canpong` when you're done.
### Building and burning the STM32F4 binary
I used [stlink](https://github.com/texane/stlink) to build and burn to the STM32F4 board from the BBB. Follow the README in that repo to set up the toolchain.
Set the STLINK path in `stm32f4_canpong/Makefile` and try a build:
```
cd stm32f4_canpong
make
```If that works, burn it:
```
make burn
```Reset the board and, if everything is hooked up correctly and you're lucky, you should see lights blinking in concert. Be sure to startup `canping` and `canpong` against `can0`.
### Debugging
The `candump` tool is really handy for spitting out all CAN messages that the BBB can see:
```
candump can0
```