The source code is gcc-friendly, but you must adapt the code yourself if you wish to adopt a different tool chain. Rowley Crossworks for ARM is needed to compile this code. This sniffer uses a single IC (STM32F042 USB microcontroller) to output received messages on the CANbus in the "LAWICEL" protocol form over a USB virtual CDC serial port. All this is inelegant and prone to user misconfiguration. Furthermore, the CAN microcontroller is oblivious to the USB-to-serial rate, so there must be a protocol invented on top of the serial data to configure both the CANbus rate of the CAN microcontroller and the USB-to-serial rate. If the USB-to-serial interface runs at a rate lower than the CAN microcontroller, data is lost during heavy traffic. The USB-to-serial interface has one bit rate, but then the CAN microcontroller has another. This approach creates a bevy of implementation complications. There are a bevy of existing CANbus products, but they seem to universally rely on two ICs working in tandem: one provides a USB-to-serial interface and the other (generally a microcontroller) implements the CAN sniffing. This implementation was born out of a challenge to myself to create a CANbus sniffer less complicated than existing commercial products. CANbus sniffer using STM32F042 microcontroller
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |