Skip to main content
WBura.1
Visitor II
March 23, 2022
Question

[STM32F103] CAN_RX0 and CAN_RX1 interrupts stop working if I power board using USB cable.

  • March 23, 2022
  • 1 reply
  • 1944 views

If powered otherwise, everything is OK.

HAL_CAN_RxFifo0MsgPendingCallback is CAN_RX0 and HAL_CAN_RxFifo1MsgPendingCallback is RX1 right?

I see that "USB low priority or CAN RX0 interrupts" are connected, but CAN RX1 should be independent from USB?

Is it possible to use CAN RX interrupts with USB plugged in (only for powering board)?

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
March 23, 2022

Doesn't the STM32F103 share a common buffer between USB and CAN?

If you want the two functions to co-exist you'd need to be using F105 or F107 devices.

If you're not actually using the USB interface/pins, double check you're not setting some register bits, or disabling some clocks.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Amel NASRI
Technical Moderator
March 31, 2022

To continue on the hypothesis of @Community member​ , please refer to the article Concurrent use of USB and CAN with STM32F103.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.