Check RMT Rx level before RMT Tx?

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

Check RMT Rx level before RMT Tx?

Postby dmaxben » Tue Nov 23, 2021 5:58 pm

Im using the RMT peripheral to bitbang a mult-master single-wire databus that uses CSMA/NDA to control arbitration and prevent collisions if two nodes attempt to Tx simultaneously.

I have it working for Tx/Rx, but Im having trouble with how to setup bus idle verification.

The End-Of-Frame marker for a data message is a ~300uS low level on the data line. So if the bus line has been at a low level for >300uS, the bus is considered idle and any node is free to start transmitting.

Is it possible to setup some sort of high-resolution timer on the Rx GPIO of the RMT peripheral? So when my code wants to queue a message for transmitting, the driver first looks at the Rx GPIO, and if its "low", it starts a timer...then if >300uS has elapsed and the Rx GPIO is still registering "low", it knows the bus is idle and then it can immediately begin the RMT Tx process.

Any ideas?

Who is online

Users browsing this forum: No registered users and 172 guests