PROBLEM: CAN Bus on ATSAMC21 configured by Harmony v3 does not work
I'm trying to understand the code created by Harmony v3 for ATSAMC21 MCU for CAN peripheral.
If I just try to transmit a message over the bus with CAN0_MessageTransmit() function and no filters are set - it seems to work. It even triggers Tx interrupt, even if only BOE interrupt is enabled.
Whenever I set up any fiter that actually should pass a message that is sent over the bus by another device - Tx interrupt is not handled properly. Rx interrupts are not triggered at all. It seems that function that sets up Message RAM is improper, it sets pointers to RAM section with different order that this one shown in the MCU datasheet. Also when Tx interrupt is triggered - the function somehow detects Rx interrupt - and while Rx FIFO (or Buffer) is empty - whole program crashes with HardFaultHandler().
Can anybody help me with that issue? IS there any working example of Harmony/MPLAB X IDE working CAN peripheral for ATSAM MCUs? I was trying to find it but without success.
Thanks in advance,