![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 410](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630410.webp)
www.geehy.com Page 409
Field
Name
R/W
Description
0
ERRWFLG
R
Error Warning Occur Flag
When the value of the receiving error counter or transmitting error
counter ≥96, this bit is set to 1 by hardware.
0: No error warning
1: Error warning occurred
1
ERRPFLG
R
Error Passive Occur Flag
When the value of the receiving error counter or transmitting error
counter ≥127, this bit is set to 1 by hardware.
0: No passive error
1: Passive error occurred
2
BOFLG
R
Enter Bus-Off Flag
When the value of the transmitting error counter TXERRCNT is
greater than 255, CAN will enter the bus-line state and this bit is set
to 1 by hardware.
0: CAN not in bus-line state
1: CAN in bus-line state
3
Reserved
6:4
LERRC
R/W
Record Last Error Code
When the error on CAN bus is detected, it is set by hardware
according to the error category; when the message is sent or received
correctly, this bit is cleared by hardware.
000: No error
001: Bit stuffing error
010: Form (Form) error
011: Acknowledgment (ACK) error
100: Recessive bit error
101: Dominant bit error
110: CRC error
111: Set by software
15:7
Reserved
23:16
TXERRCNT
R
Least Significant Byte Of The 9-Bit Transmit Error Counter
The counter is implemented according to the transmission part of fault
definition mechanism of CAN protocol.
31:24
RXERRCNT
R
Receive Error Counter
The receiving error counter is implemented according to the receiving
part of fault definition mechanism of CAN protocol. When receiving
error occurs, according to the condition of error, add 1 or 8 to the
counter, and subtract 1 after receiving successfully. When the value
of the counter is greater than 127, set the counter value to 120.
CAN bit timing register (CAN_BITTIM)
Offset address: 0x1C
Reset value: 0x0123 0000
Field
Name
R/W
Description
9:0
BRPSC
R/W
Baud Rate Prescaler Factor Setup
Time cell tq =(BRPSC+1)× tPCLK