Built desktop application that allows users to write can messages through the serial port to the CAN bus. Developed STM32 software application to handle the CAN bus communication with the PC.
The project was built during the lecture on Communication Protocols, held at the Warsaw University of Technology.
Built desktop application that allows users to write can messages through the serial port to the CAN bus. Developed app using the .NET and AVALONIA framework, which allows cross-platform WPF-like development. Application can run under Windows and Unix-like systems - Linux, and MacOS.
Build software application for STM32 microcontroller. One of the STM32 microcontrollers had to receive and send CAN messages. In addition, to establish communication with the bus, an additional driver was programmed to enable the translation of CAN messages to UART and vice-versa.
Mapped a special "dictionary" to systemize the message addresses. Added extra heartbeat message to know if the CAN STM32 board is open to the bus.
Message ID [hex] | node ID Message | Description |
---|---|---|
0x100 | - | Reset of the available microcontrollers |
0x200 | 0xFF | Read ADC value from PA7 pin. (little endian) |
0x250 | 0x01/0x00/0xFF | Activation of "cyclic message" sent every 250 milliseconds. The message carries information about the ADC value read from the PA7 pin. |
0x300 | 0x00/0xFA/0xFF | Set the PWM channel value on the PB7 pin. Value range 0-250. Pulses are triggered at a frequency of 100 Hz. |
0x350 | 0x00/0x01/0xFF | Set the built-in diode to the selected high/low state. |
0x400 | 0xFF | Sending a request for a group of frames. It includes messages with IDs 0x200, 0x600 and 0x650. |
0x500 | 0xFF | Querying the temperature value from the internal stm32 sensor. |
0x550 | 0x00/0x01/0xFF | Setting the GPIO of the PA6 port to the selected high/low state |
0x600 | 0x00-0x03 | CAN speed setting |
0x650 | 0xFF | Query of reference voltage value |
Created Master Commands to control the CAN STM32 board, ex. save the CAN speed to the flash memory or reset the microcontroller.
‼️ Master commands were mapped to CanApp GUI elements.‼️
Took the message snapshots using the LOGIC2 Saleae application and the logic analyzer.