Page 1 of 1

revpi core usb-to-serial ftdi uart /dev/ttyUSB0 recognize and read, but can't write

Posted: 21 May 2021, 03:14
by richard.vezina
Hi,

I am trying to access renesas v3m board from usb-to-serial ftdi adapter that I plug in the one of the 2 usb port of revpi core (100102).

I have configure minicom :

Serial Device : /dev/ttyUSB0
Lockfile Location : /var/lock
Bps/Par/Bits : 115200 8N1
Hardware Flow Control : No
Software Flow Control : No

pi user is member of dialout group : pi adm dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi

Until here :

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 02:48:16

Press CTRL-A Z for help on special keys

ÿÿÿ SCIF Download mode (w/o verification)
(C) Renesas Electronics Corp.

-- Load Program to SystemRAM ---------------
please send !


Everythings fine!!

But when I send file it transferts properly :

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 02:48:16
+------------[ascii upload - Press CTRL-C to quit]------------+
Press CTR|ASCII upload of "AArch64_Gen3_V3M_Scif_MiniMon_EAGLE_V0.12.sr|
|ec" |
ÿÿÿ SCIF | |
(C) Rene|374.1 Kbytes transferred at 11607 CPS... Done. |
| |
-- Load P| READY: press any key to continue... |
please se| |
+-------------------------------------------------------------+

Sorry it doesn't render well...

The problem I have is that the board does not receive the data as it never prompt what it usually does while pressing enter after the file transfert completed...

I have search and read a lot of howto

Usually with other linux box (no raspberry) the only issue with minicom is the hardware flow that need to be set to NO, otherwise it works as expected.

One of the best source of information : https://elinux.org/RPi_Serial_Connection

I try this : "NOTE FOR RASPBERRY PI 3: The Raspberry pi 3 has changed things a bit and you might need to add the option enable_uart=1 at the end of /boot/config.txt (see this post by a Pi Engineer)"

Didn't help

And here : https://github.com/lurch/rpi-serial-console

They mention that : " Disabling the serial console is required if you want to use the Raspberry Pi's serial port (UART) to talk to other devices e.g. microcontrollers (see http://elinux.org/RPi_Serial_Connection for more information)."

I try with "sudo raspi-config", but there was not : "advanced options -> serial" the serial entry in the menu...

Didn't help neither and anyway, it seems to apply to /dev/ttyAMA0 which in case of revpi core seems reserved to revpi core.

I read a couple of thread :
viewtopic.php?t=199
viewtopic.php?t=859
https://revolution.kunbus.com/forum/viewtopic.php?t=539
viewtopic.php?t=1863
viewtopic.php?t=639&start=10

Nothing stand out but that maybe the revpi core would need an industrial usb hub : https://revolution.kunbus.de/shop/en/in ... hub-4-port

Which would be sad, as revpi core as 2 usb interfaces and seems to detect the device we want to attach.

Otherwise the only documentation I found relating to serial device is about revpi flat that would have an RS485-1 : https://revolution.kunbus.com/tutorials ... ssen-flat/

So I wonder if what I am trying to do is prevented some how?

Thanks for you help

Re: revpi core usb-to-serial ftdi uart /dev/ttyUSB0 recognize and read, but can't write

Posted: 21 May 2021, 10:14
by p.rosenberger
Hi richard.vezina,

the FTDI USB-serial adapter should work out of the box. Have you tested the Adapter with any other Linux system? All the quirks and workarounds on RPi apply only to the internal UARTs or if you want to run a console of the UART. Which you obviously don't want.

Are you sure, no dat is transmitted? Or might the data be corrupted and the Renesas board just doesn't like it?

Best Regards,
Philipp

Re: revpi core usb-to-serial ftdi uart /dev/ttyUSB0 recognize and read, but can't write

Posted: 21 May 2021, 14:46
by richard.vezina
Hi,

You reassure me that my goal can be reach...

Yes I have test on other linux systems. I know that system shall be ground properly or garbage is uploaded. It does not appear to be the issue.

I am really puzzled what else I can look for to work around the issue.

Also, power supply ground is attached to the relay to allow the relay activation from the output pin of the DO module to work properly, the renesas board shall be properly ground. This is validated by the fact that the jig we use to program our board when used with other linux system (laptop computer not properly ground) work correctly as the plc setup (plc and the relay and power supply) is mounted on that jig and the renesas board is attached to the jig too.

Thanks

Re: revpi core usb-to-serial ftdi uart /dev/ttyUSB0 recognize and read, but can't write

Posted: 21 May 2021, 15:48
by richard.vezina
Hi,

Finally, I believe I solved!!

Plug the micro hdmi to a screen, since hdmi has ground shield and the monitor is properly ground. For some reason the PLC setup was not ground correctly.

I am assessing if I can attach power supply earth green wire to the x4 "functional earth" (https://revolution.kunbus.com/tutorials ... er-supply/)