CSEG AT 01BBH ;U3RXDMA_VECTOR
JMP U3RXDMA_ISR
CSEG AT 01C3H ;U4TXDMA_VECTOR
JMP U4TXDMA_ISR
CSEG AT 01CBH ;U4RXDMA_VECTOR
JMP U4RXDMA_ISR
CSEG AT 01D3H ;LCMDMA_VECTOR
JMP LCMDMA_ISR
CSEG AT 01DBH ;LCMIF_VECTOR
JMP LCMIF_ISR
P0INT_ISR:
P1INT_ISR:
P2INT_ISR:
P3INT_ISR:
P4INT_ISR:
P5INT_ISR:
P6INT_ISR:
P7INT_ISR:
P8INT_ISR:
P9INT_ISR:
M2MDMA_ISR:
ADCDMA_ISR:
SPIDMA_ISR:
U1TXDMA_ISR:
U1RXDMA_ISR:
U2TXDMA_ISR:
U2RXDMA_ISR:
U3TXDMA_ISR:
U3RXDMA_ISR:
U4TXDMA_ISR:
U4RXDMA_ISR:
LCMDMA_ISR:
LCMIF_ISR:
JMP 006BH
END
23.10.2 UART1 interrupt mode and computer transceiver test - DMA data
check
C language code
// Operating frequency for test is 11.0592MHz
/************* Function Description **************
UART1 works in full-duplex interrupt mode to send and receive data. PC sends data to the MCU, and the MCU will
automatically store the received data in the DMA space. The last two bytes of the data packet are used as the check
digit, and the routine performs the check using the crc16_ccitt algorithm. When the DMA space is full of the content
of the set size, the valid data is checked and calculated, and then compared with the last two check digits. The data in
the storage space is output through the DMA automatic sending function of UART1. If a timer is uased as baud rate
generator, it is recommended to use 1T mode (unless 12T is used for low baud rates), and select a clock frequency that
is divisible by the baud rate to improve accuracy.