I have been working on a Seeduino XIAO SAMD21 real easy build LoRa board. It does also work as a TTN node using the MCCI LoRaWAN LMIC Library. I have a simple OTAA sketch working that sends an ASCII payload consisting of the send count. The XIAO is supported by the Arduino lowpower library and putting the device into a timed sleep is easy enough with sleep current as low as 4uA.
The build is easy and the number of parts needed fairly minimal, see below;
You can wire, with the board shown, the LoRa devices DIO0, DIO1, DIO2 to separate IO pins on the XIAO or you can save two IO pins on the XIAO using some diodes to share DIO0, DIO1 and DIO2 onto one IO pin. Not tried the FSK functionality that needs DIO2. Thus the XIAO board working as a TTN node can have 5 spare IO pins that can also be used as I2C and Serial UART ports.
Anyway onto the question;
In sleep mode the internal timers on the XIAO are halted, apart from the RTC one used for the wakeup. Thus when the board wakes up the timings used by the sketch (and library code) probably do not realise the board has been asleep, potentially for days or weeks.
As an example, if the spreading factor is set to SF12 and the TX_INTERVAL is set for 5 seconds and the board put into a many minutes sleep, at wake up the sketch spends around 150 seconds in the powered state, waiting to send the payload, presumably it thinks its only just powered up and is imposing what it thinks is the duty cycle limit. Whilst its waiting to transmit the board uses around 14mA.
No functions in the library or the examples seems to suggest a simple way of stopping the duty cycle check.
So any ideas, how do you make the sketch not apply the duty cycle limit, after all its been asleep for ages, so no real duty cycle limit to apply.