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.

TMS570LS1227: Use of MsgVal bit in reconfiguration of DCAN Message Object

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

Tool/software:

Hello,

I have been consulting with the Technical Reference Manual concerning reconfiguration of message objects after initialization. Sections 12.7.6 and 12.7.7 specify the MsgVal bit must be reset before changing the configuration of certain values in the message.

I have been using the below code generated by HALCoGen to update the ID of a message object configured for reception. Based on the manual, the ID bits cannot be changed of a reception object without the MsgVal bit being reset to not valid, but, based on my understanding of this function, the function does not appear reset the MsgVal bit before changing the ID, yet the function is still correctly updating the ID. 

I am looking to update some of the other values that are listed in the manual as requiring a MsgVal reset, but the canUpdateID function has me confused as to when a MsgVal reset is required and what a reset would look like.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void canUpdateID(canBASE_t *node, uint32 messageBox, uint32 msgBoxArbitVal)
{
/** - Wait until IF2 is ready for use */
while ((node->IF2STAT & 0x80U) ==0x80U)
{
} /* Wait */
/** - Configure IF2 for
* - Message direction - Read
* - Data Read
* - Clears NewDat bit in the message object.
*/
node->IF2CMD = 0xA0U;
/* Copy passed value into the arbitration register. */
node->IF2ARB &= 0x80000000U;
node->IF2ARB |= (msgBoxArbitVal & 0x7FFFFFFFU);
/** - Update message box number. */
/*SAFETYMCUSW 93 S MR: 6.1,6.2,10.1,10.2,10.3,10.4 <APPROVED> "LDRA Tool issue" */
node->IF2NO = (uint8) messageBox;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Any clarification on this matter would be appreciated.

Regards,

Garrett