![GigaDevice Semiconductor GD32F20 Series Скачать руководство пользователя страница 759](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801759.webp)
GD32F20x User Manual
759
26.3.8.
Error flags
The error management as described in the CAN protocol is handled entirely by hardware
using a Transmit Error Counter (TECNT value, in CAN_ERR register) and a Receive Error
Counter (RECNT value, in the CAN_ERR register), which get incremented or decremented
according to the error condition. For detailed information about TECNT and RECNT
management, please refer to the CAN standard.
Both of them may be read by software to determine the stability of the network.
Furthermore, the CAN hardware provides detailed information on the current error status in
CAN_ERR register. By means of the CAN_INTEN register (ERRIE bit, etc.), the software can
configure the interrupt generation on error detection in a very flexible way.
Bus-Off recovery
The Bus-Off state is reached when TECNT is greater than 255. This state is indicated by
BOERR bit in CAN_ERR register. In Bus-Off state, the CAN is no longer able to transmit and
receive messages.
Depending on the ABOR bit in the CAN_CTL register, CAN will recover from Bus-Off
(becomes error active again) either automatically or on software request. But in both cases
the CAN has to wait at least for the recovery sequence specified in the CAN standard (128
occurrences of 11 consecutive recessive bits monitored on CAN RX).
If ABOR is set, the CAN will start the recovering sequence automatically after it has entered
Bus-Off state.
If ABOR is cleared, the software must initiate the recovering sequence by requesting CAN to
enter and to leave initialization mode.
26.3.9.
CAN interrupts
Four interrupt vectors are dedicated to CAN. Each interrupt source can be independently
enabled or disabled by setting or resetting related bits in CAN_INTEN.
The interrupt sources can be classified into:
transmit interrupt
FIFO0 interrupt
FIFO1 interrupt
error and status change interrupt
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...