Hi,
I'm trying to run the flexcan example of MQX 4.1 for PXN20 on our custom board which has a MPC5668G (automotive version). I've only modified the clock setting of the BSP (InitClock function), the BSP_XOSC_CLOCK and BSP_FMPLL0_CLOCK constant to fit our board.
In the example, I've only modify the bitrate, the CAN_DEVICE (I use Flexcan B) and the CAN clock (I use FLEXCAN_OSC_CLK).
The transmission works fine which tells me that the connection between my PC and the board is not the problem. I can also see that the message I send from my PC is received in the message buffer when I check the registers. The only thing is that the ISR is not called.
Is there something I'm missing here? Is there a configuration to set in user_config.h to enable the interrupt (MQX_USE_INTERRUPT is already set) ?
Thanks,
Hugo
Solved! Go to Solution.
Ok problem solved.
I was using CANalyser from Vector with a VN1610 interface. I switch to PCAN-view with a Peak CAN interface and it worked...
Sorry!
Hugo
Actually, I'm not sure if the reception works even if the interruption is not thrown. The proper IMASK bit is set but the corresponding IFLAG bit is not set and when I check in the received data of the message buffer, they are different from what I expected.
I also added a call to the FLEXCAN_Int_enable function after having initialize the ISR (call to FLEXCAN_Install_isr) to set the priority level of the interrupt to something else than 0 but it still doesn't work:
result = FLEXCAN_Int_enable(CAN_DEVICE, RX_mailbox_num);
Any idea?
Thanks
Hugo
Ok problem solved.
I was using CANalyser from Vector with a VN1610 interface. I switch to PCAN-view with a Peak CAN interface and it worked...
Sorry!
Hugo
Hello Hugo,
Thank you for your contribution.
Regards
Soledad