Part Number: PROCESSOR-SDK-J721E
Tool/software:
Hi TI Team, I´ve been working with CAN API´s from MCAL in an application. But I´m facing some doubts at CAN_ISR level.
In my application I have an ISR Callback such as the next snipped code
#define CAN_START_SEC_ISR_CODE
#include "Can_MemMap.h"
/* =====================================================================================
* @brief CANDrv_XISR
* -------------------------------------------------------------------------------------
* This is a call for the ISR.
*
* @param[in] uintptr_t can_ptr. Interrupt status
*
* @return none.
* ====================================================================================
* */
FUNC(void, CAN_CODE_FAST) CANDrv_XISR(uintptr_t can_ptr)
{
Can_IsrType canChIsr = (Can_IsrType)can_ptr;
/* Associated CAN ISR */
canChIsr();
}
#define CAN_STOP_SEC_ISR_CODE
#include "Can_MemMap.h"
at lowest level the function that is called is the next one in Can.c file on PSDK. I see that the Rx frame in CAN is store in Can_DriverObj struct after the ISR is processed, but this struct is not visible outside Can.c file.
/*******************************************************************************
* INTERRUPT SERVICE ROUTINES
******************************************************************************/
#define CAN_START_SEC_ISR_CODE
#include "Can_MemMap.h"
FUNC(void, CAN_CODE) Can_IntISR_Fun(Can_ControllerInstance CanInstanceID)
{
uint32 ctrlId;
ctrlId = Can_DriverObj.controllerIDMap[CanInstanceID];
Can_mcanProcessISR(&Can_DriverObj.canController[ctrlId],
&Can_DriverObj.canMailbox[0]);
}
#define CAN_STOP_SEC_ISR_CODE
#include "Can_MemMap.h"
I want to get Rx CAN frame (ID, Payload, length,etc) from my ISR Routine. How could I get this information in my ISR?, How could I access to Rx CAN frame from the ISR?
Best Regards
Eduardo