Replies: 13 comments 4 replies
-
Here are images, how it looks like on duty 1023 duty is only 99.90%, hence that light green color. (#9445) |
Beta Was this translation helpful? Give feedback.
-
Hard to say. I tried to replicate that. With a WROVER type board, it ran for hours without triggering. With a WROOM type board, it happened within minutes. See the screen shot below. The zoomed area is the last PWM cycle before the dropout. Nothing strange with it. |
Beta Was this translation helpful? Give feedback.
-
tested the same with ESP8266 and raspberry Pico W and for both it seems to be fine. |
Beta Was this translation helpful? Give feedback.
-
EDIT: it might be, this was wrongly tested, as REPL didn't take last 1 or 2 commands... testing now with
expectation is simple: for 1 second output it must be most of the time high, and for next 1 second it must be low ...
|
Beta Was this translation helpful? Give feedback.
-
tested also esp32-20220929-unstable-v1.19.1-455-ge4d90be68.bin - also bad behavior |
Beta Was this translation helpful? Give feedback.
-
well, not i'm pretty confused....
starting to have a feeling sometimes perhaps last sleep(1) isn't taken.. will make method for that and call it as last step of script and retest |
Beta Was this translation helpful? Give feedback.
-
It seems hard to replicate. Here, everything looks fine. The pattern is at both boards always like the screen-shot below: |
Beta Was this translation helpful? Give feedback.
-
now i'm 99% sure, that it was problem with REPL not taking all lines of code by pasting it ...
btw i also noted other thing: on older FWs i can paste long script to REPL without issue. With 1.19.1 i need many retries until it's correctly pasted... |
Beta Was this translation helpful? Give feedback.
-
With v1.19.1, try a sleep of 0.002 (longer than 1 PWM cycle). |
Beta Was this translation helpful? Give feedback.
-
with 0.002 it works fine. I tried also to skip 2nd wait completely. Situation is, that signal is mostly HIGH, but randomly LOW for 1sec duration. Looks like asking for trouble, if i would e.g. animate PWM using timer and then comes external request to change it to something else. If duty changes are close enough from each other, maybe bad thing will happen. i would say, both are bugs (Especially as it worked with older firmware). more details:
with this there is randomly LOW state for 100ms. This is unexpected behavior. And maybe simulation of more real life situation (using timers ... as "demo" replacement of events based on which i want to control PWM). If they are close to each other, bad thing happen ... one-before-last duty remains "active".
output:
|
Beta Was this translation helpful? Give feedback.
-
same test on other board (but also ESP32 WROOM-32), fw v1.11-187-g00e7fe8ab on 2019-08-04; console still reports bad duty after setting LOW, but on scope is fine:
(also tried with PERIODIC timer t1 and looks fine on scope |
Beta Was this translation helpful? Give feedback.
-
There was a major rework of ESP32 PWM last year, first merge in September 2021. So v1.18 included the changed version. But there were more smaller changes since then. And there might have been a change in the idf version being used for the builds. |
Beta Was this translation helpful? Give feedback.
-
But couldn't that have been the "pasting of code" problem? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
using this code
it happes usually within 1 minute, that i get 0% (0V) for 1 seconds. But expected was only 0.1ms (10 000x less)
Using sleep(0.0001) instead situation is opposite .. it's most of the time 0% and sometimes 99.9% duty appears.
tested with ESP WROOM-32 and FW
MicroPython v1.19.1 on 2022-06-18; ESP32 module with ESP32
.it's pretty strange behavior.
What is explation to that? Is duty(1023) call async and possibly delayed after sleep?
thanks
best regards
jan
Beta Was this translation helpful? Give feedback.
All reactions