AdaFruit Feather M0, stuck between EV_TXSTART and EV_TXCOMPLETE?

Hi,

I had a sketch running for about 6 days testing my standby code, and found it seemingly stuck between the EV_TXSTART and EV_TXCOMPLETE events.

I’m wondering what might cause that to happen.

This sketch is running with my mod to use a 32768 Hz TCC register as the source for LMIC ticks. It had wrapped at least once in the time the sketch is running so I don’t think that was the cause.

My loop() function looks like this:

void loop() {

    os_runloop_once();

    // If LMIC hasn't joined yet, or is in a TX/RX state,
    // let LMIC process and return without doing anything else.
    if ( ! (joined && timeOk)) {
        return;
    }

    // No point doing anything if LMIC is busy in an uplink/downlink.
    if (LMIC.opmode & OP_TXRXPEND) {
        return;
    }

    // Now my logic to check the job queue and maybe go to standby mode.
    ...
}

The sketch was in a state where joined and timeOK were both true.

I am attempting to let LMIC tight-loop os_runloop_once() while it is in an uplink/downlink state, and only go on to see if it can go to standby when LMIC has not scheduled any jobs for the next few seconds.

I have log messages that should have been written if the checks above did not cause an early return from loop(). The log messages are coming from Serial1 (although, it seems Serial now works when coming out of standby mode when it didn’t used to).

The sketch sent an uplink every hour, plus whatever uplinks were required to handle MAC commands from TTN.

Any idea what could cause LMIC to fail to get to a state where it issues EV_TXCOMPLETE?

I’ve now modified the sketch to use the WDT when it’s not in standby mode, removed the first if statement in loop(), and replaced the second one with

if ( ! LMIC_queryTxReady()) {
        return;
    }

But I’m wondering if anyone has seen this on a Feather?

Regards, David.

I am currently having the same problem on a Feather. If you have any workaround do let me know

It may have been because I forgot to connect DIO0 with pin 6 or whatever you need to do.

The weird thing was that join would work and it was the 2nd or 3rd message that would get hung up, which is why the problem with the wire didn’t occur to me.

That was a terrible design fault on the Feather - so easy to forget to do it unless you were making a board to plug the Feather into.

This was exactly the problem that I was having and adding the jumper between pin 6 and io1 fixed it. I think that it’s a bit unfair to say that Adafruit messed up the design. The board is designed for “LoRa” and not “LoRaWAN”. The LMIC library requires the extra pin to be connected, but not all LoRaWAN libraries do. And for those who want to use the board for its actual design purpose then having the extra pin available for other purposes is a nice-to-have