8 years, 6 months ago.

Mbed LPC1768 CAN read interrupt

Dear all, please help me with this problem. I am unsuccessfuly trying to use interrupts for reading CAN.

I followed the example in "https://developer.mbed.org/questions/2929/CAN-Interrupts/". but the compiler, Version: LPCXpresso v5.2.2 [Build 2108] [2013-04-17] , refuses to compile the following instruction can2.attach(CAN2_rec, CAN::RxIrq); <<quote>> Error Message : RxIrq' is not a member of 'mbed::CAN' <<quote>>

This instruction also fails to compile can2.attach(CAN2_rec, RxIrq); <<quote>> Error message is Multiple markers at this line - candidates are: - no matching function for call to 'mbed::CAN::attach(void (&)(), SerialIrq)' <<quote>>

can2 is defined as CAN can2(p30, p29); It is working as a transmission port.

CAN2_rec is the following function void CAN2_rec(void) { CANMessage msg; if(can2.read(msg)) led1 = ON; }

Any idea what's wrong? Thank you in advance. Best regards Daniel

1 Answer

8 years, 6 months ago.

Hello Daniel,
Since the CAN Test code compiles smoothly for LPC1768 when I use the online compiler it must be some issue with your compiler.
Zoltan