Thanks for the suggest but i have seen already this AN, but anyway looking deeper on the code, i note i difference betwen the AN52701 and the code generate for the KIT CY8CKIT-059.
The AN52701, have file CAN_Data_TX_RX_func.c , where we can found the function called by the main.c : CAN_SendMsgTxMessage1(void)
following the code:
uint8 result = CYRET_SUCCESS;
if ((CAN_TX[0u].txcmd.byte[0u] & CAN_TX_REQUEST_PENDING) ==
result = CAN_FAIL;
/* `#START MESSAGE_TxMessage1_TRASMITTED` */
/* `#END` */
CY_SET_REG32((reg32 *) &CAN_TX[0u].txcmd, CAN_SEND_MESSAGE);
As you can see the condiction, if ((CAN_TX[0u].txcmd.byte[0u] & CAN_TX_REQUEST_PENDING) ==
have a compare with "CAN_TX_REQUEST_PENDING" define as 01u, but to the kit code we have:
#if (CY_PSOC3 || CY_PSOC5)
if ((CAN_Data_TX[0u].txcmd.byte[0u] & CAN_Data_TX_REQUEST_PENDING) != 0u).
This means that we have always the CAN_FAIL due to 0u and not 01u.
Actually i am doing a service to the Bolivia forest , and no way to do any test until next week
Please anyway could you give to me your opinion?