This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: crc calculation with dma

Part Number: MSP430FR5994

Hi,

how can I calculate a crc with supporting of dma? I tried this initialisation:


CRCINIRES = 0xFFFF;
CRCDIRB_H = 0x00;
DMA3CTL = 0x00;
DMA3SA = start of array of bytes
DMA3DA = (__SFR_FARPTR)(&CRCDIRB_L);
DMA3SZ = 5;
DMA3CTL = DMADT_5 | DMASRCINCR_3 | DMADSTINCR_0 | DMADSTBYTE | DMASRCBYTE | DMAEN | DMAREQ ;

After a compare with https://crccalc.com/ I see the result in CRCINIRES is wrong.

Have I to initalise other registers?

Best Regards

  • The documentation doesn't really say what happens on a byte write to CRCDIRB_H but nothing good can happen so don't do it. Either write a byte to the low byte or write a word.

  • I get the same result whether I write with the CPU or with the DMA. How certain are you that that Web site's conditions (bit order, byte order, CRC variant) match with the CRC16?

**Attention** This is a public forum