fix(can): address issue with __gprv_u8Buf causing unexpected behavior in filtering

- Changed buffer number calculation from static `0` to dynamic cycling using `(__gprv_u8Buf + 1) % 3`.
- Investigating unexpected behavior affecting CAN filtering process.
stable
@rakshita4 2024-11-21 11:08:35 +05:30
parent 03a449ca7f
commit f5bba30502
2 changed files with 8 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -439,11 +439,15 @@ void vRTE_UARTDataProcess(void)
if ( retCode == 0 && ulId == 0){
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x0, g_pu8Buf, 0);
}
if ( retCode >= 0 && (ulId > 0x00 && ulId < 0xffffffff) )
if ( retCode >= 0 && ulId > 0x00 && ulId < 0xffffffff )
{
__gprv_u8Buf = (__gprv_u8Buf + 1) % 3;
xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf);
xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, 0);
}
// if ( retCode >= 0 && (ulId > 0x00 && ulId < 0xffffffff) )
// {
// __gprv_u8Buf = (__gprv_u8Buf + 1) % 3;
// xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf);
// }
}
}