Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 3 months ago.
DiscoF746NG Ethernet & Serial Port
Hi! I'm trying to recive data from the UART and transmit them using Ethernet's interface. I'm following this example
Https:os.mbed.com/users/DieterGraef/code/Nucleo_F746ZG_Ethernet/
My problem occurs when I receive data from the UART. I'm using the attach function. My device stops when I try to send data. I suppose that I have versions problems.
I'm sorry for my english.
1 Answer
7 years, 2 months ago.
The function that you attach runs in an Interrupt Service Routine (ISR). In an ISR you cannot do network operations (or printf for that matter). You need to signal from the ISR to the main thread and do your network operations there.
Some ways to do signalling (f.e. via Semaphore) are in this blog post.