8 months ago.

Serial port Tx problem.

Just got this kit along with MAX32620FTHR kit and found that the separate DAP programmer boards are also usable, very impressed!

I want to connect a serial Wi-Fi module ESP8266. I have a full functioning ESP8266 driver library that includes a buffered serial driver :

https://os.mbed.com/users/sam_grove/code/BufferedSerial/

This works faultless (I'm using Mbed 2) with all my ST and NXP and Si-Labs boards but won't work with either of these boards. ( I have set the pin Vcc's to 3.3v).

Trying various code examples I find Serial Tx and Rx is working with some Oled displays and GPS modules, however when I try Serial Attach IRQ functions it goes wrong. Sometimes it will run for a while and I get Rx and Tx data then it stops and finally I get MCU lock out. I get nothing using the Buffered Serial code.

Could you guys advise please.

Thank you

Paul

Question relating to:

MAX32630 Rapid Development Platform
Comment on this question

1 Answer

1 week, 4 days ago.

If you receive for a while with your Rx IRQ and then you get MCU lock out, I would suspect that you aren't reading the incoming stream fast enough and you are letting the receive buffer overflow.

void rxirq () {                      // UART Receive IRQ
    char c;
    while (uart.readable()) {
        rLED = !rLED;          // Toggle LED so we can see the action
        c = uart.getc();
        ... Do something with char; put it in your buffer, etc.
        ... Process the buffer somewhere else, like a thread.
    }
}

Unfortunately its a bit more involved.

Maxim appear not to be supporting their products on Mbed, there are currently 239 warnings during compiling using the latest Mbed-os.

Running SerialPassthrough :

https://os.mbed.com/users/sarahmarshy/code/SerialPassthrough/file/2a3a62ee17fa/main.cpp/

will only work up to 115200, just, and that is with VIO_3V3 set.

SerialPassthrough works up to 921600 on all my other platforms. There's a problem with the Serial API on Maxims platforms, the MAX32620FTHR and MAX32625PICO have exactly the same issue.

posted by Paul Staron 05 Oct 2019

You need to log in to post a question