cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting bxCAN: CAN_MCR vs. RCC_APB1RSTR

jens2
Associate
Posted on February 22, 2016 at 12:26

Hallo,

I have a question to the STM32F103 (high-density device):

After using bxCAN (sending, receiving, using filters, ...) I want to set the CAN-controller in the initial state (as far it is possible without a hardware-reset).

The documentation (referece manual) gives me two ways to reset the CAN-controller:

1. CAN_MCR, Bit 15 RESET -- bxCAN software master reset

2. RCC_APB1RSTR, Bit 25 CANRST -- CAN reset

Is there finally a difference in the result (state of the CAN controller) after the reset?

In which cases I have to leave the clock enabled for the CAN-controller? Is it necessary to have the clock enabled for the way via CAN_MCR? Or must the clock by enabled for both ways?

The current implemented way is:

- disable clock for CAN

- using CAN_MCR, Bit 15 RESET for doing a reset

Should I change anything?

Thanks in advance for an answer.

Best Regards, jk
1 REPLY 1
Posted on February 22, 2016 at 14:36

Does the register even work without a clock? I'd reset it, then turn off the clock.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..