Sirs,
I have a question about the HalCoGen sample code.
[C:\ti\Hercules\HALCoGen\v03.08.01\examples\TMS570LS04x\example_canIntCommunication.c]
We see a C function canMessageNotification():
void canMessageNotification(canBASE_t *node, uint32 messageBox)
{
/* node 1 - transfer request */
if(node==canREG1)
{
tx_done=1; /* confirm transfer request */
}
/* node 2 - receive complete */
if(node==canREG2)
{
while(!canIsRxMessageArrived(canREG2, canMESSAGE_BOX1)); //// Ln.172
canGetData(canREG2, canMESSAGE_BOX1, rx_ptr); /* copy to RAM */
rx_ptr +=8;
}
/* Note: since only message box 1 is used on both nodes we dont check it here.*/
}
-----------------------------------------------------------------------
So my question is, why the blue colored line is required? Or, for what the line is waiting? (Ln.172)
Do you assume any specific case that the line is executed but the CAN received message is NOT ready to be read?