EDIT: the following text was a reply for an answer which has been deleted. The user was registered after I opened my topic, and the answer was very ChatGPT-like (it cited the api reference in a slightly modified way)
Can you show me an example how to set up detecting a mismatch?
The api reference is talking about loop count, but nothing about a condition on when to stop the transmit:
https://docs.espressif.com/projects/esp ... ransaction
The
technical reference manual states this on page 402:
The data structure in RAM is shown in Figure 15-2. Each 32-bit value contains two 16-bit entries, with two fields
in every entry, ”level” and ”period”. ”Level” indicates whether a high-/low-level value was received or is going to be
sent, while ”period” points out the divider-clock cycles for which the level lasts. A zero period is interpreted as an
end-marker: the transmitter will stop transmitting once it has read this, and the receiver will write this, once it has
detected that the signal it received has gone idle.
So it says that it stops transmitting when the period is set to 0. Again, nothing about conditional stop.
As I said I would like to stop is the transmit part not the receive part (what you seem to referring to)
I am afraid it can't be done because as I understand I send data to the RMT like this:
the line is 0 for 8us,
the line is 1 for 24us,
the line is 0 for 8us,
the line is 1 for 8us.
And I might want to stop the transmission in the middle of the data.
See the picture below: We want to transmit -8, 24, -8, 8 but on the input pin we need to detect at 8+16us (basically at the 3rd bit - remember I said one bit is 8us long) that the line went low in the meanwhile (someone else also started transmitting) so we drop the rest of the data to be transmitted (stop immediately)
- collision.jpg (20.79 KiB) Viewed 5524 times