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.

DCAN RAM Parity Initialization without Hardware based Initialization

Hello Support,

With DCAN Parity Enabled [PMD=0x0A], I was assuming DCAN Parity RAM area can be initialized either by

1> using MSINENA [Hardware Based Auto Init]

or

2> by using Direct Write using IFxCMD Register to every rows of Message RAM Objects.

For the second case above, I see that PER bit of DCANCTL Register is set. Which indicates that during IFxCMD based WRITE, parity area is not written even though PMD field is set to 0x0A. This is observed only for case when MSINENA based initialization is not performed.

Any clue about why I can't initialize all the MESSAGE RAM Area only by using direct write with IFxCMD Register?

Thank you.

Regards

Pashan

 

  • Hello Pashan,

    The DCAN will perform read-modify-write if user tries to access mailbox through IF1/IF2 command.

    If memory is not initialized ahead of time, you will see parity error in PER bit. 

    When parity error occurs, the msgval (message valid) bit of the corresponding mailbox will be stopped. 

    this will prevent mailbox being transmitted outside and hence you may not be able to update the mailbox.

    the proper way is to initialize the mailbox with hardware initialization method (much quicker than IF1/IF2 write) and start using IF1/IF2 to access (read/write) to mailbox.

    I hope this helps.

    Henry

  • Hello Henry,

    In your reply it was mentioned that IF1/IF2 based initialization will also initailize the PARITY AREA.

    That means, instead of MSINENA based Parity Initialization, I can perform direct write using IF1/IF2 to the Message Objects and all Parity Area will be initialized.

    I find that doesn't work. I get PER bit set even though I am writing only using IF1/IF2.

    Is that because IF1/IF2 always performs Read-Modify-Write and hence PER bit is set [because of READ before WRITE]?

    That is the question.

    Hope I am clear.

    I was expecting that I can initialize all Message Objects using Direct Write with IF1/IF2 and hence no Parity Error will occur.

    Looks like I must perform MSINENA based initialization due to inherent READ-MODIFY-WRITE action with IF1/IF2 WRITE Function.

    Please help me understand if it is expected behaviour.

    Thank you.

    Regards

    Pashan