brainelectronics / micropython-modbus

MicroPython Modbus RTU Slave/Master and TCP Server/Slave library
GNU General Public License v3.0
104 stars 45 forks source link

Question: Will the PR #75 works using async mode and/or when there is threads? #77

Open beyonlo opened 1 year ago

beyonlo commented 1 year ago

Description

@brainelectronics The PR #75 fixed that hudge problem with timing/CRC errors. So I have two questions:

  1. When the @GimmickNG finish the PR #56, will the PR #75 be transparent, I mean, will works in async Slave RTU mode as well?
  2. This question is more about my personal scenario: I'm using ESP32-S3 and I have all my applications (including async Slave TCP) running over uasyncio (waiting for just for the async Slave RTU), but I have one thread running concurrently with that async tasks. Well, as I know, the FreeRTOS give 20ms for each thread, so In theory I have 20ms for my thread and 20ms for my all uasyncio applications (main thread). Well, when I will use the async Slave RTU can that thread affect the correct timing fixed in the PR #75?

Thank you!

Reproduction steps

--

MicroPython version

v1.20.0

MicroPython board

ESP32

MicroPython Modbus version

2.3.5

Relevant log output

--

User code

--

Additional informations

--