cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RET6R TWO CAN PERIPHERALS

Davaol19
Associate III

Hello!!

I'm trying to use both CAN peripherals in an STM32F446RET6R on a custom PCB, but something is not going well enough.

I've done the basic configuration using the STMCubeIDE platform (I'll add the code later, but first I want to know if someone has had similar issues with this microcontroller).

The problem is that if I only configure one peripheral, CAN1 (the Master), everything works okay—no error bits in SFRs, no BUSOFFs or anything like that, everything is transmitted and received well.

But when I configure CAN2 (SLAVE), CAN1 continues working perfectly, but CAN2 starts sending frames with CRC errors and corrupted data (I'm using CANoe to read the messages). The TEC bit starts incrementing until the node gets stopped.

The flags raised when the transmission stops are TEC, EPVF, and EWGF.

I also want to add that if I configure everything without a reception interrupt in CAN2, the transmission and reception in CAN1 and transmission in CAN2 work fine without any flags raised.

If anyone can help me with this topic, I’d appreciate it a lot. I've done similar configurations with other microcontrollers, and they worked well.

 

THANKS!!

 

 

0 REPLIES 0