Serial interrupts problems with new mbed libraries

22 Nov 2012

Hi, i am trying to compile code that used to run fine with an older version of the mbed libraries, but now it seems to get stuck in a loop when attaching a serial interrupt.

here is my code:

  1. include "mbed.h"

DigitalOut myled(LED1); Serial wifly(p13,p14); Serial pc(USBTX,USBRX);

void pcrxcallback(){ wifly.putc(pc.getc()); }

void wiflyrxcallback(void){ pc.putc(wifly.getc()); }

int main(void){ pc.baud(9600); pc.attach(&pcrxcallback, RxIrq);

wifly.baud(9600); wifly.attach(&wiflyrxcallback, RxIrq);

do{ myled = 1; wait(0.2); myled = 0; wait(0.2);

} while(1); }

as far as i can tell, it gets stuck when attaching the wifly rx interrupt. Is there a bug in the new library? or am i doing something wrong?

Thanks

22 Nov 2012

Hi Christian, there was a bug in the new serial interrupt handler for the LPC1768, we should have fixed it in the latest mbed library release [Rev 45]: mbed Library Releases.

Cheers, Emilio

22 Nov 2012

oh great thanks! i will try to test that later today!