09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Controller area network (bxCAN) <strong>RM0090</strong><br />

Bits 25:24 SJW[1:0]: Resynchronization jump width<br />

These bits define the maximum number of time quanta the CAN hardware is allowed to<br />

lengthen or shorten a bit to perform the resynchronization.<br />

t RJW = t CAN x (SJW[1:0] + 1)<br />

Bit 23 Reserved, must be kept at reset value.<br />

Bits 22:20 TS2[2:0]: Time segment 2<br />

These bits define the number of time quanta in Time Segment 2.<br />

t BS2 = t CAN x (TS2[2:0] + 1)<br />

Bits 19:16 TS1[3:0]: Time segment 1<br />

These bits define the number of time quanta in Time Segment 1<br />

t BS1 = t CAN x (TS1[3:0] + 1)<br />

For more information on bit timing, please refer to Section 24.7.7: Bit timing on page 675.<br />

Bits 15:10 Reserved, must be kept at reset value.<br />

Bits 9:0 BRP[9:0]: Baud rate prescaler<br />

These bits define the length of a time quanta.<br />

t q = (BRP[9:0]+1) x t PCLK<br />

24.9.3 CAN mailbox registers<br />

This chapter describes the registers of the transmit and receive mailboxes. Refer to<br />

Section 24.7.5: Message storage on page 673 for detailed register mapping.<br />

Transmit and receive mailboxes have the same registers except:<br />

● The FMI field in the CAN_RDTxR register.<br />

● A receive mailbox is always write protected.<br />

● A transmit mailbox is write-enabled only while empty, corresponding TME bit in the<br />

CAN_TSR register set.<br />

There are 3 TX Mailboxes and 2 RX Mailboxes. Each RX Mailbox allows access to a 3 level<br />

depth FIFO, the access being offered only to the oldest received message in the FIFO.<br />

Each mailbox consist of 4 registers.<br />

CAN_RI0R<br />

CAN_RDT0R<br />

CAN_RL0R<br />

CAN_RH0R<br />

CAN_RI1R<br />

CAN_RDT1R<br />

CAN_RL1R<br />

CAN_RH1R<br />

CAN_TI0R<br />

689/1416 Doc ID 018909 Rev 3<br />

CAN_TDT0R<br />

CAN_TDL0R<br />

CAN_TDH0R<br />

CAN_TI1R<br />

CAN_TDT1R<br />

CAN_TDL1R<br />

CAN_TDH1R<br />

FIFO0 FIFO1<br />

Three Tx Mailboxes<br />

CAN_TI2R<br />

CAN_TDT2R<br />

CAN_TDL2R<br />

CAN_TDH2R

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!