SX1262 DIO1 as an output

The SX1262 describes DIO1 as multi purpose digital IO. I’d like to use it as a software controlled output in a system that transmits a LoRa packet once a second.

I’ve found an example where DIO3 is used as an output by using the DIO3 output voltage control. DIO1 does not have a similar output voltage control register. I’ve found the DIOx control registers x580, x583, x584 and x585 but no documentation. In the example DIO3 used bit 1<<3 which suggested DIO1 might use 1<<1 (I have tried many combinations in the hope of affecting the output). I’ve tried using the pull-up and pull-down control registers to change the output on DIO1 without success (using an oscilloscope to see the output on the pin).

I have found that every transmit brings the DIO1 output high for about 10 microseconds, so the scope is connected but something else is controlling the pin.

Are there any examples of software controlling the DIO1 output or further documentation for the pin’s control?

DIO1 is often set in software to go high when transmit is finished.

And also often set to go high when a packet is received.

Yes, I remember reading that once but wasn’t able to find it again in the datasheet.

I’ve double checked and even setting all the DIO and IRQ masks in SetDioIrqParams to zero still causes DIO1 to pulse high after each transmit (and direct control of the output through the registers doesn’t change the pin output)

Hi @colin.s.grant,

Can you please share the place where you found this code?

It took me an age to find again " SX126x - Set DIO3 as output"
the link is

The lack of response suggests that there aren’t examples or documentation for treating DIO1 as a simple output or preventing DIO1 pulsing high at the end of each transmit.

Describing how DIO1 (or 3, actually) is not documented - normally. The fact that this is publicly available - at least through the link you shared - changes the context a bit. For your information, DIO1 and DIO3 are not built the same way - DIO3 is capable of driving a TCXO - so the method to drive them is also slightly different.

Before going that way, I’d like to understand 2 things.

That’s not something I can reproduce on my side. Can you please share the whole configuration (packet and modulation parameters, timeout used in the SetTx command, etc.)?

Is the IRQ signal related to the “TX done” event not what you are looking for?

We were hoping to use DIO1 as a regular I/O pin to control some hardware.
I’ve abandoned that.

Sorry for the delay replying.