There is an error in the example project, the command has to be send to the corresponding mailbox (might work for MB 0, but not if you want to use a different one).
Set up the receive mailbox with RTR and RTR reply set in the module. IRQ is not required.
-----------------------#define RXCMD 0x00820038 /*Starting from MSB,
Byte1 => Reserved,
Byte 2 => last four bits used to specify datalength, (what about the first nibble?)
Byte 3 => Reserved,
Byte 4 => (bit 5 = receive interrupt enable),bit 4 = RTR reply, bit 3 = Buffer Enable (what about the other bits?)*/#define ID 0x1 //Id or the responce
#define CAN_RX_ID_SHIFT 21 //shift required for the id reg.
#define SHIFTED_ID ID<<CAN_RX_ID_SHIFT//Update the CMD and ID registers of our mailboxCY_SET_REG32((reg32 *)&CAN_RX[<mailboxid>].rxcmd, (RXCMD));
CY_SET_REG32((reg32 *)&CAN_RX[<mailboxid>].rxid, (SHIFTED_ID));