Can't get the examples for the M6E-Nano board running

Hi there!

I simply can’t get the examples running.

It seems the Arduino sketch just freezes.

If I modify the setup function to this:

void setup()
{
  Serial.begin(115200);
  
  while (!Serial); //Wait for the serial port to come online
  Serial.println(F("Startup..."));

I just get the first 3 or 4 characters to the terminal.

If I comment out the rest of the initialization code, it works as expected.

Any Idea?

BTW, I checked with a logic analyzer, the Modules sends its firmware version on startup and the soft-serial works as well (tested with the softserial example sketch).

I have Adruino 1.8.12 running on 64bit Manjaro Linux.

To verify this, I used chinese Arduino Nano and genuine Adafruit Metro boards.

Regards,

Johann

If SoftSerial is working, then how do you connect the Nano when it fails ?

Maybe you can share the example?

Hi!

I’m not sure if I understand you correctly.

I have my terminal running on the USB port (to RX,TX). SoftSerial uses D10/D11.

To check everything I used a logic analyzer. I checked at D10/D11 and directly on the M6E module to be sure that there’s no bad solder joint.

The problem is simply, that if I load the example sketch, the Arduino simply seems to freeze.

I can’t see any data from the Arduino to the module. Additionally, writing “Startup” to the PC stops after some bytes.

If i remove all the M6E init-code, the UART works.

If I load the soft-serial example sketch (modified to have the correct pins), I get data to the module.

Regards,

Johann

Understand the connection now.

Did you connect with loose wires from the serial connector on M6E ( GND/ 5V / TX and RX) to (GND/ 5V / D10/D11) or different?

How is the switch set?

Maybe try different pins for test?

The fact that you see the Module sending its firmware version on startup is interesting. It means it has received (and recognized) the command to sent the firmware version it. I have seen “freeze” in other programs, where the interrupt routine was causing a dead-lock.

Well no, the the module transmits its version on power-up (documented in the example sketches).

I can reproduce this by toggling the EN-pin.

The arduino is totally silent.

I made the connection D10/D11 to TX/RX. I verified that the signals get to the modules pins.

However, I tested with the mercury API (no windows here) and a usb/serial dongle.

The API demos time-out but I see at least communication in both directions on the lines.

I think there might be some kind of baudrate problem…

Regards.

by default it power-up in 115200 rate and works for me with the mercury API on Raspberry or Ubuntu without change to the demo application. I never use the enable-pin, leave it untouched.

Well I can trigger EN with my multimeter…

So that internal pullup is in the higher MegaOhm range.

I wouldn’t count on that…

On my ESD mat sometime I need to touch EN to get the module started.

The mercury API seems to use a wrong Baudrate but the module does responds with 115200baud.

Regards.

So, I got some code running in Qt. It seems there’s a problem with the module…

I attached some traces directly captured at the modules pins.

This is very wired…

The module does answer. But the “data” seems to be just random pin toggling…

Any ideas?

OK, so I tracked it down.

Seems it’s Sparkfun’s “fault”… but I don’t bother to get deeper into that rabbit hole…

Maybe the hardware-version down below helps to find the difference to the “golden” sample back when everything worked fine…

I converted a PL2303HX serial adapter to 3V3 and removed the TXB0104 and connected it here.

Now I get a nice resonse (see below) via the demo-apps of the mercuy-api and my Qt implementation.

Tomorrow, I’ll give a stm32 nucleo-board a try since these run on 3v3.

./readerInfo tmr:///dev/ttyUSB1 
/reader/version/hardware: 30.00.00.02
/reader/version/serial: 122000677030430P1+
/reader/version/model:  M6e Nano
/reader/version/software: 01.09.01.11-20.19.06.10-BL14.12.08.00
/reader/uri:  tmr:///dev/ttyUSB1
/reader/version/productID: 17
/reader/version/productGroupID: 0
/reader/version/productGroup: Embedded Reader
/reader/description not supported

I got hooked by the pull-up on the TX-line in the M6e reference schematic.

Then I looked into the datasheet of the TXB0104.

It seems, the “magic” involved with automatic direction selection does not work at least in my case.

High-frequency “noise” in my last screenshot seems so come from the undecided TXB…

Regards,

Johann