NuMicro® NUC029LEE/NUC029SEE
32-bit Arm
®
Cortex
®
-M0 Microcontroller
Aug, 2018
Page
199
of
497
Rev 1.00
N
U
MICRO
®
N
UC02
9L
E
E
/N
UC029
S
E
E
T
E
CHN
ICA
L R
E
F
E
R
E
NC
E
M
A
NU
A
L
Write data to CRC write data register (CRC_WDATA (CRC_WDATA[31:0])) to
perform CRC calculation.
Then, get the CRC checksum results by reading the CRC checksum register
(CRC_CHECKSUM (CRC_CHECKSUM[31:0])).
Procedure when operating in CRC DMA mode:
Enable CRC engine by setting CRC Channel Enable bit CRCCEN (CRC_CLT[0]) to 1.
Set the transfer data format to enable write data order reverse (WDATA_RVS
(CRC_CTL[24])), checksum reverse (CHECKSUM_RVS (CRC_CTL[25])), write data
1’s complement (WDATA_COM (CRC_CTL[26])), checksum 1’s complement
(CHECKSUM_COM (CRC_CTL[27])) and initial seed value in CRC seed register
(CRC_SEED (CRC_SEED[31:0])).
Specify a valid source address (word alignment) and transfer counts by setting CRC
DMA transfer source address register (CRC_DMASAR (CRC_DMASAR[31:0])) and
CRC DMA transfer byte count register (CRC_DMABCR (CRC_DMABCR[15:0])).
Set CRC DMA trigger enable bit TRIG_EN (CRC_CTL[23]) to 1 to perform CRC
calculation.
Wait CRC DMA transfer and check if CRC DMA transfer is done by the CRC DMA
block transfer done interrupt flag (CRC_BLKD_IF (CRC_DMAISR[1])), and then get
the CRC checksum results by reading the CRC checksum register
(CRC_CHECKSUM (CRC_CHECKSUM[31:0])).