6 years, 7 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

6 years, 7 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.