CRC for UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
tinic_3847421
Level 1
Level 1
First like given

I'm looking to use the CRC component in combination with the uart. Is there a practical way to calculate the CRC for Rx and Tx of the UART on the fly without much software overhead?

As CRC component expects a serial bit stream I would need a shift register in sync if I'm not mistaken.

0 Likes
1 Solution

Hi TimNieter​,

There are few options that you can try:

1. The Crypto block in PSoC 6 has a CRC feature. This block accepts a data pointer and computes the CRC based on the polynomial (not shift register based). You can refer to the PDL for PSoC 6 Crypto CRC APIs

2.  The CRC component that is presently available in PSoC Creator is UDB based that is configured to accept only serial data input. You may have to implement a shift register in PSoC 6 on your own to send serial data to the CRC component

3. You can also try transferring data from the TX FIFO / RX FIFO to the UDB register using DMA. But in this case you can to find out which is the exact register is going to have the data in the CRC UDB and the set that as the DMA destination.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
3 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi TimNieter​,

PSoC 5LP has a CRC component based on UDB. Can you try implementing the same using PSoC 6 UDBs?

Component - CRC V2.50 Datasheet.pdf

Regards,

Bragadeesh

Regards,
Bragadeesh

Hi BragadeeshV_41 !

Thank you for your response.

I tried using the CRC component in PSoC6. But the component only accepts serial bit streams as input format. Unfortunately there is no shift register UDB component for psoc6 to grab the UART data and feed it to the CRC component without software interaction.

I'm trying to do the whole crc calculation without software interaction because of performance requierements

0 Likes

Hi TimNieter​,

There are few options that you can try:

1. The Crypto block in PSoC 6 has a CRC feature. This block accepts a data pointer and computes the CRC based on the polynomial (not shift register based). You can refer to the PDL for PSoC 6 Crypto CRC APIs

2.  The CRC component that is presently available in PSoC Creator is UDB based that is configured to accept only serial data input. You may have to implement a shift register in PSoC 6 on your own to send serial data to the CRC component

3. You can also try transferring data from the TX FIFO / RX FIFO to the UDB register using DMA. But in this case you can to find out which is the exact register is going to have the data in the CRC UDB and the set that as the DMA destination.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes