dsPIC33FJ64MC804 - ECAN Filters Not Working as Expected
Below are a few suggestions on how to resolve the problem:
- Do not use the DMA with ECAN in Peripheral Indirect mode. Use the DMA in Register Indirect mode with Continuous mode enabled and Ping-Pong mode disabled.
- The receive DMA channel count should be set to eight words. The transmit DMA channel count should be set for the actual message size (maximum of seven words for Extended CAN messages and six words for Standard CAN messages).
- Simplify the application error handling while using this mode, only one TX buffer should be used. While the message filtering is not affected, messages will not be stored in distinct RX buffers.
- All messages are stored contiguously in memory. The start of this memory is pointed to by the receive DMA channel. The application must still clear the RXFULx flags and other interrupt flags.
- The application software must manage the RX buffer memory and not rely on the DMA controller for proper placement.