CAN Driver empty frames Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
cmirabile
Posts: 3
Joined: Tue Feb 13, 2018 5:39 pm
Been thanked: 2 times

CAN Driver empty frames

Postby cmirabile » Tue Feb 13, 2018 5:55 pm

Hi,
i'm using ChibiOS 17.6.0 to read CAN messages. I'm using an STM32F427VGT_100 device.
Implementing the code as in the STM32F4xx-CAN example project i can correctly catch every Frame receive event:

Code: Select all

while (true) {
    if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0)
      continue;
    while (canReceive(&CAND2, CAN_ANY_MAILBOX, &rxmsg, TIME_IMMEDIATE) == MSG_OK ) {
      //i can reach this point any time a CAN message arrives...
    }
  }


But all rxmsg fields are blank: SID, DLC and data... i checked the CAN messages with a Canalyzer tool and i'm sure messages are not empty.
Also I'm able to receive messages only if i pass the CAN_ANY_MAILBOX constant in the canReceive method.
In the STM32F4xx-CAN example project is left to the reader the CAN message parsing... is there any task i'm missing?

Thanks

cmirabile
Posts: 3
Joined: Tue Feb 13, 2018 5:39 pm
Been thanked: 2 times

Re: CAN Driver empty frames  Topic is solved

Postby cmirabile » Tue Feb 13, 2018 6:15 pm

Solved!
The problem was that I only started the CAN2 driver... starting also the CAN1 make me able to read the CAN RxFrame content.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 24 guests