You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is, tx_idle will be set in the next tick of the i2s unit. Specially with lower I2S frequencies this will fail, because idle is not cleared when entering the the while loop.
The problem with my solution that if the I2S is working with fast frequencies, it often happen that the !idle state will not be detected, because it already is idle again when checking the state. So it lowers the speed of sending single data packages or commands.
For CLK_DIV > 8 it will mostly detect the !idle state. So my output looking depending on frequency like this:
got not idle:4
got not idle:2
got not idle:5
got not idle:7
got not idle:4
got not idle:5
got not idle:3
got not idle:5
got not idle:4
So the loop will will call break in 1-7 iterations.
For CLK_DIV 2, 4 or 8 i run often in the timeout.
But i still get:
got not idle:1
got not idle:1
got not idle:1
got not idle:1
got not idle:1
in some cases. I have never seen 0 here. Don't know why.
In every case this may not be ignored, because the I2S could be stopped before it did his work.
Maybe the solution could be to wait for an interrupt, but I'm not sure that this is faster then my loop timeout. Specially not if WAIT_FOR_NOT_IDLE (Max loop iterations) is set depending on the I2S frequency (clk divider and cpu speed).
The text was updated successfully, but these errors were encountered:
@masterxq Sorry for the late response, the I2S LCD driver in esp-iot-solution is archived now. Currently, we suggest using the latest esp-lcd for the LCD development.
github-actionsbot
changed the title
I2S LCD displays: Busy waiting for idle will not work like this.
I2S LCD displays: Busy waiting for idle will not work like this. (AEGHB-291)
Jul 10, 2023
This will cause problems:
The problem is, tx_idle will be set in the next tick of the i2s unit. Specially with lower I2S frequencies this will fail, because idle is not cleared when entering the the while loop.
A good solution would be:
Sadly i don't know how to wait for the next I2S tick, so in order to get it work i did like this:
The problem with my solution that if the I2S is working with fast frequencies, it often happen that the !idle state will not be detected, because it already is idle again when checking the state. So it lowers the speed of sending single data packages or commands.
For CLK_DIV > 8 it will mostly detect the !idle state. So my output looking depending on frequency like this:
So the loop will will call break in 1-7 iterations.
For CLK_DIV 2, 4 or 8 i run often in the timeout.
But i still get:
in some cases. I have never seen 0 here. Don't know why.
In every case this may not be ignored, because the I2S could be stopped before it did his work.
Maybe the solution could be to wait for an interrupt, but I'm not sure that this is faster then my loop timeout. Specially not if WAIT_FOR_NOT_IDLE (Max loop iterations) is set depending on the I2S frequency (clk divider and cpu speed).
The text was updated successfully, but these errors were encountered: