Community
cancel
Showing results for 
Search instead for 
Did you mean: 
GChiu2
Beginner
890 Views

Debug on uart2 stops working

Hi,

after uart1 (/dev/ttyMFD1) initialization using mraa library, the debug on uart2 stops working, also the echo command not working on /dev/ttyMFD2.

I'm using a Intel Edison board on a custom platform, based on Arduino board.

How can I solve it?

Thanks in advance

0 Kudos
3 Replies
idata
Community Manager
17 Views

Hi Sens_gen,

 

 

Thank you for contacting us.

 

 

I just tried to replicate the issue using my Intel® Edison Kit for Arduino, I tested UART1 and UART2 and I didn't have issues with them, could you try the following steps? I want to know if you have issues doing them:

 

 

1. Flash the Edison with the latest Image using the following guide: https://communities.intel.com/docs/DOC-25154 https://communities.intel.com/docs/DOC-25154.

 

2. Connect to your Edison to the serial port using PuTTY (In my case was: /dev/ttyMFD2), and configure the Edison using the command: configure_edison --setup

 

3. Once your Edison is configured, please install the latest version of MRAA: https://github.com/intel-iot-devkit/mraa.

 

4. Connect the Edison through SSH, and disable the serial terminal in the COM session typing these commands in the SSH session:

 

 

systemctl stop serial-getty@ttyMFD2.service  dmesg -n 1

 

 

5. After this, test a code that uses UART2, in my case I used this Arduino sketch:

 

 

void setup() {  Serial2.begin(115200);  Serial2.println("Hello World!!!");  }  void loop() { Serial2.println("Hello World!!!"); }

 

 

You can check that it works using PuTTY connecting to the same port that you were connected before.

 

 

6. In the SSH session, run the MRAA example code https://github.com/intel-iot-devkit/mraa/blob/master/examples/c%2B%2B/Uart-example.cpp, you have to use the serial port /dev/ttyMFD1.

 

 

After you have done all these steps, you will see that UART2 hasn't stop. Now, if you don't have issues with these steps, can you provide me the codes that you are using to test them?

 

 

I hope you find this helpful, and don't doubt to ask if you issues with the steps provided before.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.

 

GChiu2
Beginner
17 Views

Hi Leonardo R.,

I found the problem, the GP135 was initialized as a gpio and for this reason the uart stops working.

I don't understand why, withthe same application (with GP135 initialized as GPIO) on Arduino board UART2 worked fine.

Many Thanks

Regards.

idata
Community Manager
17 Views

Hi Sens_gen,

 

 

That's great, thanks for letting us know.

 

 

The reason that UART2 stops when you initialize GP135 as a GPIO is because it is the same pin that is used on UART2 (UART2 TX). You can check this information on the http://www.intel.com/content/www/us/en/support/boards-and-kits/000005808.html Intel® Edison Compute Module Hardware Guide.

 

 

Anyways, it is good to know that it is working now, feel free to contact us when you have issues.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.