Skip to content

CAN Wrapper Module Installation Guide

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:

  1. Enable the CAN1 peripheral in your .ioc file under Pinout & Configuration > Connectivity.
  2. 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.

image

⚠️ 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.

  1. Save & regenerate code.
  2. Ensure MX_CAN1_Init(); has been generated in main.c

Enabling RTOS

To enable RTOS, if it isn't already:

  1. In your .ioc file, navigate to Middleware and Software Packs > FREERTOS
  2. Select CMSIS_V2 as the interface.
  3. Save and generate code.

That's it! CAN Wrapper will automatically configure its tasks and queues.

Clone this wiki locally