Quantcast
Channel: MultiTech Developer Resources » All Posts
Viewing all articles
Browse latest Browse all 7111

Hang when using serial.attach

$
0
0

Hi,

I was trying to read some data from the serial port using the serial.attach() function call, but everything hangs when I put a serial.getc() in the interrupt call. I´ve read here: https://developer.mbed.org/search/?q=serial+interrupt that it is not possible to use printf and interrupts. So I removed all of the loginfo from the code, but it seems that it always hangs even if there is no printf in the code. Is there any other way to read only one line from the serial port? I´ve tried with a while loop but it seems that there are some characters that are dropped. So I´m stuck.

Thanks.


Viewing all articles
Browse latest Browse all 7111

Trending Articles