3 Replies Latest reply on Apr 4, 2019 3:48 AM by BragadeeshV_41

    CRC for UART

    tinic_3847421

      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.

        • 1. Re: CRC for UART
          BragadeeshV_41

          Hi tinic_3847421,

           

          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

          2 of 2 people found this helpful
          • 2. Re: CRC for UART
            tinic_3847421

            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

            • 3. Re: CRC for UART
              BragadeeshV_41

              Hi tinic_3847421,

               

              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