[ZeROSEro7] First LoRa transmission

Last week I worked further on controlling the SX1276 from the nRF52. Once I could use the high level functions from Semtech, I tested it and checked if the registers were set as expected. To complete the implementation, I had to write the code to control the antenna switch, which is trvial on our schematic. I also had to link the handlers for the optional IRQ DIOs. Unfortunately, the SDK doesn’t support them being disconnected so I had to rewrite a small part of the SDK with a similar behavior but without the IRQs. It is possible to switch back to the previous code by defining a symbol for the preprocessor. This will reduce CPU execution time but is completly optionnal otherwise.

I had very few debuging options to finally transmit over LoRa. I knew my timing and SPI transfers were right, but the transmission wasn’t working. After further analysis of the SX12 datasheet and checking the state registers, I was able to make a first transmission !

Among other things, there was a very misleading naming for modes :

There was the continuous mode vs packet mode, which states wether the rx data goes in the fifo or to the DIO. I chose packet.

And the continuous mode as opposed to single-shot mode. In single-shot, the antenna only goes to rx mode for a few symbols of time so I couldn’t receive anything. So I had to choose this continuous mode.

Before I resolved this ambiguity, I ran into troubles because the receiver didn’t have the expected behavior and spent all his time in standby mode.

Aside from this, I helped reviewing the schematics and PCBs that Erwan and Vincent made.


For this week, I’ll try to finish the parrots on both LoRa and BLE to close those PSSCs in time. I’ll use the remaining time (if any) to help Erwan with the USB. Indeed, driving 2 USB bus in parallel will probably be a tough challenge and will require to dive into the drivers if we want to respect the timing constraints. I also hope that we will finish all our PCBs before next week.

3 comments to [ZeROSEro7] First LoRa transmission

  • Samuel Tardieu

    That’s great news. How did you test that the LoRa transmission went through?

  • Enguerrand

    Since I could see the txDone flag raised, I was pretty confident I was actually sending messages so I directly tried to communicate between my boards. It was easier than with the GPS emitter you gave me because I could control the parameters.
    I ran a program sending “abcd” every second and receiving otherwise on one board, and the same but with “ping” on the other (I wanted to make sure I wasn’t printing the message I was actually sending). I printed the contents of the rx fifo of one of the boards via RTT and saw the message from the other one. It is a very simple program with no power management and poor performances but it’s completely satisfying for a first transfer.

    • Samuel Tardieu

      Nice indeed.

      Be careful though: if the transmission takes more than 10ms (all included, preamble, data, etc.), then you are violating the 1% maximum transmission time on a particular ISM band.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>