Hi,rong,
Both CAN0 and CAN1 not use two at the same time, and CAN1 interface is used as reserve. I want to archieve the function that both CAN receice the same frame, and how to do?
Function of SDK not support the setting, and SDK make a protect for frame. But I can am not receiving data after removing the protection. The following is a library function.
STATIC Status setupEXTSection(uint32_t *pCANAFRamAddr, CAN_EXT_ID_ENTRY_T *pExtCANSec, uint16_t EntryNum)
{
uint16_t i;
uint32_t CurID = 0;
uint32_t Entry;
uint16_t EntryCnt = 0;
/* Setup FullCAN section */
for (i = 0; i < EntryNum; i++) {
if (CurID > pExtCANSec[i].ID_29) { //Ascending protection
return ERROR;
}
CurID = pExtCANSec[i].ID_29;
Entry = createExtIDEntry(&pExtCANSec[i]);
pCANAFRamAddr[EntryCnt] = Entry;
EntryCnt++;
}
return SUCCESS;
}
/* Setup Group Extended ID section */
STATIC Status setupEXTRangeSection(uint32_t *pCANAFRamAddr,
CAN_EXT_ID_RANGE_ENTRY_T *pExtRangeCANSec,
uint16_t EntryNum)
{
return setupEXTSection(pCANAFRamAddr, (CAN_EXT_ID_ENTRY_T *) pExtRangeCANSec, EntryNum * 2);
}
CAN Acceptance filter:

write data:
CAN_EXT_ID_RANGE_ENTRY_T EffGrpSection[] = {
{{CAN_CTRL_NO, ((1 << 11) | 0x300)}, {CAN_CTRL_NO, ((1 << 11) | 0x400)}},
{{CAN_CTRL_NO, ((1 << 11) | 0x500)}, {CAN_CTRL_NO, ((1 << 11) | 0x600)}},
{{CAN_CTRL_NO, ((1 << 11) | 0x700)}, {CAN_CTRL_NO, ((1 << 11) | 0x780)}},
{{1, ((1 << 11) | 0x300)}, {1, ((1 << 11) | 0x400)}},
{{1, ((1 << 11) | 0x500)}, {1, ((1 << 11) | 0x600)}},
{{1, ((1 << 11) | 0x700)}, {1, ((1 << 11) | 0x780)}},
};