Serial communication between Nicla Vision and Uno not working

I'm not sure if serial communication between the Nicla Vision and an Uno is possible, but I tried connecting the TX pin of the Nicla to the RX of the Uno and the RX of the Nicla to the TX of the Uno, and the GNDs of both boards together (as shown in diagram).

To keep things super simple, I wrote 2 very simple programs that I tested on 2 Arduino Unos (one as transmitter and one as receiver) and it worked well, but did not work with the Nicla as the transmitter and Uno as the receiver.

Code on Nicla (Transmitter):

void setup() {   
    Serial.begin(9600);
}

void loop() {
    Serial.println("hello");
}

Code for Uno (Receiver):

char msg[10];
void setup() {
       Serial.begin(9600);
  }
  
  void loop() {
      Serial.readBytes(msg,5);
      Serial.println(msg); 
      delay(1000);
  }

Any ideas why it is not working (Uno is not receiving)?

Did you check the overall system logic voltage level used?

A logic level converter is required to connect 5V and 3.3V devices, or you will damage one or both. I recommend something like this one: https://www.sparkfun.com/products/12009

Dont know about Nicla, but on Uno, Rx is in fact Tx and Tx is Rx. (look at the arrows on the Uno rx /tx pins). As previously noted, if you dont have logic level converter, use 2 resistor attenuator for Nicla Rx pin.

Hello,
I did some tests and I see that with Serial.begin() you init the SerialUSB device, that send serial data to the emulated serial via USB, visibile as a COM# on your PC.
The physical serial port conneted to pins UART_TX/UART_RX should be Serial1.

Serial1.begin() and Serial1.print() works on my PortentaH7 that has the same MBED sw and same chip (STM32H7xx) as Nicla Vision.

But for Nicla Vision, I can compile a sketch with eg. Serial1.begin(9600) and Serial1.println("Hello"), but it doesn't work: there is no transmission from UART_TX pin 3, I'm monitoring it with a logic analyzer.

Any suggestion on how to make it working?

Than you!
Maurizio

I have tested it. It doesn't work :disappointed:

I don't think there is any logic issue (voltage), because I am testing it with oscilloscope. No signal from that pin.

Hello,

Please use a Baud rate ā‰„ 19200.

Best,

I am trying to communicate a Nicla SENSE ME with an Arduino Uno through SPI, I2C, and UART, and in none of the cases has it been possible. The Nicla Sense seems to have a different encoding for each standard (it is supposed to be standard but it is not for the Nicla Sense - it seems that Bosch complicates everything and they do not respond in their forums). For this reason, I want to know if someone has already solved this problem, or how to file a formal complaint. I tried to Baud rate ā‰„ 19200 and it is not run.

Hi @darwindubay ,

Please take a look here: Communication problem - #10 by hamza_pro.

Using Baud rate ā‰„ 19200 is for UART communication on Nicla Vision.

Best,

I am having the same exact UART communication issue but with the Nicla Voice. I have tried the recommendations on this forum with no luck. I was able to receive data via the RX pin, but I am unable to transmit data. Seems like an issue with TX pin. Here is the code I am using to transmit data:

#include "Nicla_System.h"
#include "NDP.h"
#include <Arduino.h>

void setup() {
  nicla::begin();
  nicla::leds.begin();
  Serial1.begin(57600); // Initialize Serial1 for communication
}

void loop() {
  Serial1.write("Hello World");

  nicla::leds.setColor(green);
  delay(200);
  nicla::leds.setColor(off);

  // Wait for 5 seconds before sending the next message
  delay(5000);
}

Has anyone been able to get this working with a Nicla product? Is there a chance the board is defective?

I was able to get it working (had same problem as the OP) and wanted to provide the solution.

I had an oversight in my circuit - I was using 2 different power sources for my receiver device (TTL Bridge) and transmitting device (Nicla Voice). I started receiving garbage data after adding a couple pull-up resistors which made me realize the UART RX/TX pins were floating. From there, I connected the TTL Bridge to the VDDIO_EXT (3V3) of the Nicla Voice and everything now works flawlessly.

Woah, such a niche note. I made an account just to say thank you! I was having issue connecting my Nano to my Nicla and I had no idea baud rate was a factor.
<3 <3 <3

1 Like

You are welcome @pepperpeeno :slight_smile:
Iā€™m really glad you found this helpful!
Many thanks!

1 Like