cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Data from python's Serial library over UART (DMA) to CAN Bus using STM32 — Transmission & Debugging Help...not working

tantheman
Associate

 

STM32F103C8T6 CAN Not Responding — UART to CAN Test

I’m testing a very simple setup with two STM32F103C8T6 (Bluepill) boards.
The goal is just to send data from my PC to one STM32 through UART, and then transmit it over CAN to another STM32 board.


Setup

Data flow:

 

 
PC (PySerial) → UART → STM32 (Transmitter) → CAN Bus → STM32 (Receiver) → UART → PC
 

Hardware used:

  • Two STM32F103C8T6 boards

  • MCP2551 CAN transceivers

  • 120 Ω termination resistors at both ends

  • Common ground between boards

  • UART baud: 115200

  • CAN bit rate: 1 Mbps (Prescaler = 2, BS1 = 15, BS2 = 2)


What’s Working

  • The PC is successfully sending UART data using Python (PySerial).

  • The STM32 transmitter receives the data correctly — UART works fine.

  • The DMA callbacks trigger as expected, showing that data reception over UART is confirmed.


What’s Not Working

  • The CAN bus is not showing any transmission or response.

  • The transmitter’s CAN doesn’t seem to send anything, even though initialization completes without errors.

  • The receiver board also does not detect or print anything over UART.

  • No CAN interrupts are triggered on either board.


Summary

UART communication from PC to STM32 is verified and working.
However, the CAN side shows no activity — no transmission, no reception, and no response from either STM32 board.
I just need help understanding why the CAN is completely silent even though everything initializes correctly in CubeIDE..... All codes are below


:white_heavy_check_mark: In short:
PC → UART → STM32 works fine,
but STM32 → CAN → STM32 shows no response at all.

0 REPLIES 0