Knowledge Base

SX1261 TCXO example

We are migrating design from SX1276 towards SX1261 with TCXO.
On schematic level semtech provides the necessary info to implement this, but there
is a lack of example code to set up the SX1261 in TCXO mode.
As we found out in these fora, there are also some bugs and missing info in DS.
Each time we follow the (crystal based) examples we notice that our device has moved from TCXO mode into RC mode, thereby switching off again the TCXO.
We have not yet succeeded in sending data (LoRa SF12, 125kHz, 4/5 explicit) from the SX1261 to our existing SX1276 platform.
Can you provide a simple functional example of SX1261 with TCXO that performs the basic steps, including Calibrate, CalibrateImage?
Both for RX and TX

The main difference between the XTAL and the TCXO cases lies in the TCXO configuration.

At the very beginning, before you perform any RF operations, you shall configure the TCXO with the command "SetDIO3AsTcxoCtrl" (see SX126x datasheet v1.2 §13.3.6). With this command, you inform the chip that the external oscillator is a TCXO and the chip will drive it through DIO3 with the given parameters (voltage and startup gate time). Once this configuration is done, you have to perform a calibration with the command "Calibrate" (see SX126x datasheet v1.2 §13.1.12).

In the CAD example project available on the product page (see, you can find in the file "sx126x_cadexampleWeb\src\radio\sx126x\sx126x.c" the function "SX126xInit" that shows how to implement what I explained above.

Excellent info, unfortunately that example is inside a .rar file that
seems to be corrupt.
Have tried several programs to unrar this (and online).
Anyone having this example available?
Hi Greg,

I managed to unrar with "7-Zip", could you try?

Same problem, even as administrator with 7-zip.,
Can not open file as archive
Is this file available via another location? Semtech Github?
Or can you just post the relevant part of the code?

Problem I see on my board goes beyond the calibrate step.
I select the TCXO, with the correct voltage.
After that step, I see the TCXO voltage being applied and clock starting with good
clock after 250us.
But when I initiate a calibrate action, the SX1261 ends the calibration with STBY_RC, thus
disabling the TCXO?
Same with other commands, some keep the TCXO on, others disable the TCXO, even
when following the datasheet 1.2 suggested order of commands.
Would you please raise a support request using the "support" button on top of the page. We can privately send you what is needed


STBY_RC is the regular fallback mode of the chip. That's a normal behavior to go back to this mode after a calibration is performed. The chip runs on its internal RC 32M clock.

Since the TCXO is managed by the radio (through DIO3), the radio enables it when it is needed (transmission, reception, CAD). The radio automatically disables it as soon as it is not needed - mainly to save power - and switch to its internal RC32M clock.

If you call the command 'SetRxTxFallbackMode', you "defines into which mode the chip goes after a successful transmission or after a packet reception". By default, it is STBY_RC but can be changed to STBY_XOSC or Fs - modes in which the XTAL (a TCXO in you case) stays enabled.

Do not forget to call 'SetDIO3AsTCXOCtrl' at powerup and also after a reset or when the chip leaves sleep mode without retention.

Thanks, this explains what we observe.
We had a power dip at TX, causing the device to go back to its default settings -> disabling the TCXO.
Now the demo pingpong is running and two of our boards communicate.
However no comms yet between the SX126x systems and the SX1276 systems.
Need to dig deeper into that.
As a remark, it would make sense to have a document from Semtech that explains the differences between SX1261 and SX1276.
(e.g. sync word setting, but I assume there is more...)