Code: Select all
uart.write(cmd)
trigger_pin.on() # This is the important trigger edge
response = uart.read(n)
trigger_pin.off()
I looked up online what I can do to make the code more deterministic, and I found this link, which proposes stopping the garbage collector before a critical call. I also watched Writing fast and efficient MicroPython, but did not find a direct reference to determinism. Can you advice what can be done to achieve deterministic behavior of critical sections of code?