Size of RfDriver::preambleAndSync : Should it be 15 or 17 bytes? #96
Replies: 3 comments
-
Hi, I think this is just a mismatch between code & spec. The spec has been written after the first version of the code and the understanding of the protocol did not follow a straight path. The number of bytes of the preamble is especially difficult to define because the first bits of it are often "eaten" by analog stages of both transmitters and receivers, the time for the filters to stabilize. In the observation I made with a stl-sdr dongle, the first bytes were so attenuated that it was hard to count the number of bits. If you are porting MicronetToNMEA to ESP32, you can also use this project as an example. I'm not maintaining it anymore but it might help. Also note that I'm currently building my own PCB with EasyEDA for an ESP32-C3 based version of MicronetToNMEA. This is not yet ready and only at a very draft stage but, if you are interested, I can provide it to you. BR, Ronan. |
Beta Was this translation helpful? Give feedback.
-
I thought that might be the case that the preamble length didn't matter much. I see the C1101 datasheet section 15 recommends a 4 byte preamble. I also see in that section, which is about Packet Handling Hardware Support, that preamble n bytes long and sync word can be automatically sent before the data. C1101 has 2 sync bytes but the first of these bytes can be set to the preamble byte and the second to 0x99, if that is what the Micronet needs. |
Beta Was this translation helpful? Give feedback.
-
I'm using a ESP8266 not a ESP32. I think some of the constraints are similar, but I'm not familiar with the ESP32. The docs say: So all the routines down the chain should be marked with this attribute. I guess marking the top one with IRAM_ATTR and the rest with inline would also do the trick, but some of the routines being called are in libraries (e.g. SPI) ... As well, all variables that get changed in the ISR should also be marked as volatile. Then there is the paragraph that starts with: Long-running (>1ms) tasks in interrupts will cause instability or crashes. That is 80K clock cycles, so might be OK, but would have to be looked at carefully. I was wondering if the interrupt could be shortened or if a flag could be set in the interrupt saying the radio needed to be serviced in the main program or some sort of hybrid of these two ideas. In the Micronet.txt doc the guard time is shown as 1893ms , almost 2 seconds. Is this correct on a 1 sec transmission rate? I was thinking that with 2 seconds of wiggle room, then the transmission start time is not that critical, but that doesn't seem right. I suspect it is tighter and more mission critical. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
This is amazing work. I'm just trying to understand everything.
I have a custom PCB board designed and built up with an ESP8266, CC1101, ICM-20948 IMU, GPS and SD storage. My interest is to be able to use the CC1101 to capture the wind speed and direction and boat speed for performance monitoring. Live data will be sent to a tablet using wifi/webserver/websockets.
I noticed a difference in the Micronet.txt document that says:
part is 1771us
(17 bytes at 76800 baud)
while in your code RfDriver::preambleAndSync has a total length of 15, so that is 14 preamble and 1 sync.
I don't know if the 17 vs 15 bytes makes a difference, but the duration is shorter than the 1771us in your code.
Gord_W
Beta Was this translation helpful? Give feedback.
All reactions