Bxcan Operating Modes; Initialization Mode - ST STM32F102 Series Reference Manual

Hide thumbs Also See for STM32F102 Series:
Table of Contents

Advertisement

Controller area network (bxCAN)
Figure 193. bxCAN operating modes
Note:
1
ACK = The wait state during which hardware confirms a request by setting the INAK or
SLAK bits in the CAN_MSR register
2
SYNC = The state during which bxCAN waits until the CAN bus is idle, meaning 11
consecutive recessive bits have been monitored on CANRX
21.3

bxCAN operating modes

bxCAN has three main operating modes: initialization, normal and Sleep. After a
hardware reset, bxCAN is in Sleep mode to reduce power consumption and an internal pull-
up is active on CANTX. The software requests bxCAN to enter initialization or Sleep mode
by setting the INRQ or SLEEP bits in the CAN_MCR register. Once the mode has been
entered, bxCAN confirms it by setting the INAK or SLAK bits in the CAN_MSR register and
the internal pull-up is disabled. When neither INAK nor SLAK are set, bxCAN is in normal
mode. Before entering normal mode bxCAN always has to synchronize on the CAN bus.
To synchronize, bxCAN waits until the CAN bus is idle, this means 11 consecutive recessive
bits have been monitored on CANRX.
21.3.1

Initialization mode

The software initialization can be done while the hardware is in Initialization mode. To enter
this mode the software sets the INRQ bit in the CAN_MCR register and waits until the
hardware has confirmed the request by setting the INAK bit in the CAN_MSR register.
To leave Initialization mode, the software clears the INQR bit. bxCAN has left Initialization
mode once the INAK bit has been cleared by hardware.
While in Initialization Mode, all message transfers to and from the CAN bus are stopped and
the status of the CAN bus output CANTX is recessive (high).
Entering Initialization Mode does not change any of the configuration registers.
To initialize the CAN Controller, software has to set up the Bit Timing (CAN_BTR) and CAN
options (CAN_MCR) registers.
502/690
Normal
SLAK= 0
INAK = 0
Reset
Sleep
SLAK= 1
INAK = 0
INRQ . ACK
INRQ . SYNC . SLEEP
RM0008
Initialization
SLAK= 0
INAK = 1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F102 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32f101 seriesStm32f103 series

Table of Contents