mnsnoop / esp32Micronet

6 stars 3 forks source link

bWorkingBytes get randomly overwritten #6

Open dgeppert opened 2 years ago

dgeppert commented 2 years ago

problem:

solution:

mnsnoop commented 2 years ago

You are correct. This is a hack to decreases rx to tx switchover time for the CC1101.

When studying Micronet I captured the commands between the MCU and CC1000 in a hull transmitter and found the protocol demanded ~500us switch over time for the first device after the sync packet.

switchover (Small excerpt from the datasheet: The microcontroller uses 3 output pins for the configuration interface (PDATA, PCLK and PALE). PDATA should be a bidirectional pin for data read-back. A bidirectional pin is used for data (DIO) to be transmitted and data received. DCLK providing the data timing should be connected to a microcontroller input. https://www.ti.com/lit/ds/symlink/cc1000.pdf?ts=1662914250311&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FCC1000)

The CC1101 is slower then the CC1000 at this. If I tried fully idling the radio it'd miss the send window. Since Micronet needs very accurate timing I took that line out. The code still exists in the sender to honor the blocking and idle the radio before sending which is why adding it back worked.

It's a situational issue with no good solution. We either let the sender clobber receives when it needs or miss windows.

dgeppert commented 2 years ago

thanks for these details, makes it understand better ;-)

some weeks ago I was trying to make esp32Micronet talk to MicronetToNMEA because I had no Micronet devices available. it took me a weekend to figure out why bWorkingBytes was clobber, so the idea was to possibly point this out to others having the some problem.

this weekend I had the first occasion to test esp32Micronet with a real Micronet system, just works like a charm!

many thanks for sharing your work so others might profit and have some fun with it as well! ;-)