You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arnav Gupta edited this page Oct 15, 2025
·
11 revisions
CAN Wrapper Module requires enabling FreeRTOS and at least one CAN peripheral. In fact, you won't be able to compile your project without following the below steps.
The below instructions assume an L452RE microcontroller. But CAN Wrapper is compatible with any STM32 with at least one CAN peripheral.
Configuring CAN
To set up CAN:
Enable the CAN1 peripheral in your .ioc file under Pinout & Configuration > Connectivity.
Configure CAN1 as such:
In NVIC Settings, enable RX0 interrupt.
In Parameter Settings, set Prescaler (for Time Quantum) to 16.
In Parameter Settings, set Time Quanta in Bit Segment 1 to 5 Times.
In Parameter Settings, set Time Quanta in Bit Segment 2 to 4 Times.
⚠️ Note: These Quanta settings are recommended for microcontrollers running at 80MHz to keep all subsystems synced. Should you decide to change your clock speed, you will need to modify these values accordingly.
Save & regenerate code.
Ensure MX_CAN1_Init(); has been generated in main.c
Enabling RTOS
To enable RTOS, if it isn't already:
In your .ioc file, navigate to Middleware and Software Packs > FREERTOS
Select CMSIS_V2 as the interface.
Save and generate code.
That's it! CAN Wrapper will automatically configure its tasks and queues.