AnsweredAssumed Answered

CRC multithreading

Question asked by olenich.rodion on Jul 1, 2016
Latest reply on Jul 1, 2016 by olenich.rodion
Good day.
In my program i use CAN interface. I send and receive messages (consist of few CAN packs) with crc.
       
  1. When i receive the CAN pack i put it into buffer and when the message complete i calculate it crc.
  2.    
  3. Transmitting message depends on free CAN bus. When i can send another CAN pack i want to calculate next crc and send CAN bytes.

Time to send 8 full CAN packs with 250kbit/s is about 10ms. In this time i can not use CRC because it has no way to set the DR register, like CRC->DR=0x12345678; bool temp = (CRC->DR == 0x12345678); temp = true
So the question is - is there a way to do this? Or i need to use software calculation?

I mean function like this:

uint CRCcalc(uint previousCRC, uint data);

Thanks

Outcomes