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.

Am335x CAN parity mechanism

Hi,

In stareware demo: dcanlpbk, the code enable the CAN parity interrupt, and can get the word num and message num,the question i wonder is:

Firstly, ,what should i do next besides got the message and word Num in ISR? In my opinion ,Rx MO reveived the can fram from can bus and store the data in the message ram, and during the process of reading out the data of the message ram to interface register,the parity mechanism worked. It's goal is avoid the difference between the data in message ram and IF, if the ISR generated ,there must be wrong during of reading.  so should i read the MO again till the ISR won't happen again?if my understanding is wrong, please pointed it out directly.

Secondly, if i disable the parity, is there any  danger? How big is the probability of parity error?

Regards!

Stone

  • Hi Stone,

    1.  Your understanding on handling a Parity error is correct i.e. Parity error is generated if data read is corrupt when a read is performed on Message RAM using IF regs.
    2. Application needs to ensure that the read data is valid. Yes app can read the MO again
    3. I can say the probablity of parity error is very less. So far a parity error is not encountered while testing the examples at 1Mbps speed.

    Regards,

    Jeethan

     

     

  • Hi Jeethan,

    Thanks  a lot.

     

    Regards,

    Stone

     

  • Cristal clear. I can cope with this.

    But, what happens when using IF3 for automatic update?

    If the parity error happens when the message RAM is read by the IF3 is it still signalled?
    The DMA trigger is still generated (transferring bad data...) and the NewDat bit is still cleared (potentially breaking detecting of message loss ...)?
    In this case the message has to be retrieved by using IF1/IF2 within the parity error interrupt routine?

    Or maybe, simply, is in this case the reading is automatically re-issued by IF3 till it's successfully done (so we don't have to care about it)?