Home/Support/Support Forum/Accessing Serial Port from within System Timer Thread on Digi Connect ME 9210
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Accessing Serial Port from within System Timer Thread on Digi Connect ME 9210

0 votes
I am using Digi ESP for NET+OS (7.5.2) on the Digi Connect ME 9210 platform.
I created a NET+OS Project which includes the TCP/Serial Transfer service.
The TCP/Serial Comm thread can read/write the com port perfectly fine but I am trying to read/write the serial port from a timer function that runs within the System Timer Thread and it fails to write to the serial port using the identical call that was used within the TCP/Serial Comm thread. Is there a way to read/write the serial port from within a timer function?
(i.e. wake up every 2 seconds and write a cmd to the serial port and then read the response?)
asked Aug 21 in NET+OS by WMiller New to the Community (3 points)

Please log in or register to answer this question.

1 Answer

0 votes
 
Best answer
interrupts are disabled while you are inside system timer thread to ensure nothing else interrupts it. you cannot do anything interrupt related from it. All you can do is fill up a buffer that can be sent to UART once you are out of system timer thread.
answered Aug 22 by LeonidM Veteran of the Digi Community (3,126 points)
selected Aug 22 by WMiller
That makes perfect sense. Thanks LeonidM
...