Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Adafruit feather 32u4 FONA wakeup, no Serial.print #7600
    peak
    Participant

    “kind of working”? Nope. Working Excellently! Start a new thread

    in reply to: Serial.flush() and FONA #6963
    peak
    Participant

    LIM PHANG MOH,
    Again, thanks for your effort. Yes, I did call flush() before sleep and it crashed. Found this code:
    u16 flushOutput()
    {
    u16 count;
    while ((count = FifoByteCount()) != 0);
    return count; // Returns 0
    }
    u16 FifoByteCount()
    {
    return ((((u16)UEBCHX) << 8) | (UEBCLX));
    }

    It compiles ok but does not wait untill the output buffer is empty.

    Regarding delay() : I cannot estimate the number of characters waiting to be output. They come from various libraries with DEBUG_PRINT and the like.
    There must surely be a way to interrogate the output queue in the build-in UART in Atmel 32u4.

    in reply to: Adafruit feather 32u4 FONA wakeup, no Serial.print #6949
    peak
    Participant

    LIM PHANG MOH, thank you for an excellent explanation and a working solution.
    Regards
    Peter

Viewing 3 posts - 1 through 3 (of 3 total)