From 1ed44dbf4f06002e9fb24a5c797c14b105791063 Mon Sep 17 00:00:00 2001 From: "@rakshita4" Date: Fri, 22 Nov 2024 00:08:43 +0530 Subject: [PATCH] fix(can): restrict data transfer to buffer 0 and 1 due to issues with buffer 2 Identified an issue with the 2nd TX buffer in CAN. Updated the implementation to use only buffer 0 and buffer 1 for CAN data transfer. --- ivec_RTE/src/ivec_rte.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ivec_RTE/src/ivec_rte.c b/ivec_RTE/src/ivec_rte.c index 3ed9008..4b7068a 100644 --- a/ivec_RTE/src/ivec_rte.c +++ b/ivec_RTE/src/ivec_rte.c @@ -439,15 +439,11 @@ 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) ) { - xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, 0); + __gprv_u8Buf = (__gprv_u8Buf + 1) % 2; + xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf); } -// if ( retCode >= 0 && (ulId > 0x00 && ulId < 0xffffffff) ) -// { -// __gprv_u8Buf = (__gprv_u8Buf + 1) % 3; -// xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf); -// } } }