AnsweredAssumed Answered

LPC54616J512 CAN filter options

Question asked by Paul Norström on Sep 3, 2018
Latest reply on Sep 4, 2018 by Paul Norström


I'm trying to setup filters for the CAN fifo.

But I'm not having much luck, setting the globalmask for the fifo seems to work just fine, both reject and accept all but I'm having no luck at all when I try to set the individual masks. I have tried both fifos (FIFO0,FIFO1) but all messages get rejected. According to "LPC546xx CAN Driver API.pdf" those 2 lines setting the individual mask should work.

So whats wrong? 


CAN_Init(CAN0, &configCAN0.config, SystemCoreClock);
configCAN0.isInit = true;

      configCAN0.fifo_config.idFilterNum = 64;

      CAN_SetRxFifoConfig(CAN0, 0, &configCAN0.fifo_config, true);
      CAN_SetRxFifoConfig(CAN0, 1, &configCAN0.fifo_config, true);
      // CAN_SetRxGlobalMask(CAN0, kCAN_GlobalFilter_Standard_FIFO0 | kCAN_GlobalFilter_Extended_FIFO0);

      CAN_SetRxIndividualMask(CAN0, 0, CAN_RX_FIFO1_STD_MASK(0x100, 0x7FF));
      CAN_SetRxIndividualMask(CAN0, 1, CAN_RX_FIFO1_STD_MASK(0x101, 0x7FF));



   CAN_Enable(CAN0, true);


#LPC54616J512 can filter #CAN_SetRxIndividualMask