Home

Awesome

AS USB2CAN

I. Project Goal

This project is AS demo USB2CAN device built on stm32f107vc. The core of this project is based on the source code generated by STM32CubeMX and this project is part of AS.

This USB2CAN device implements 2 virtual CAN bus, the virtual CAN bus 0 will process the CAN mesages of the AUTOSAR COM stack, while the virtual CAN bus 1 will process the CAN messages on the real hardware CAN1. So that the virtual CAN bus 1 is a real USB2CAN device, let's name it USB2CAN1, and the virtual CAN bus 0 is a real virtualized CAN bus for the purpose to study AUTOSAR COM stack, let's name it USB2CAN0.

The goals of this project are:

Limitations:

II. How to build and load firmware

Follow this page as-study-platform to set up build environment.

set BOARD=stm32f107vc
scons
set BOARD=stm32f107vc
scons
scons run

III. Play with USB2CAN

demo usb2can

In the panel of asone, run below command to launch the tool asone.

python main.py

A. Play with USB2CAN0

1. open USB2CAN0

open-usb2can0

2. play AUTOSAR COM stack on USBCAN0

play-usb2can0

3. update the stm32f107vc firmware over USBCAN0

update-firmware-over-usbcan0

B. Play with USB2CAN1

1. open USB2CAN1

open-usb2can1

2. play AUTOSAR COM stack on USBCAN1

play-usb2can1-com-rx play-usb2can1-com-tx

3. update the mpc5634 firmware over USBCAN1

update-mpc56xx-over-usbcan1