EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: FW: [Non-DoD Source] Re: Serial port bus connection issue on arm platform
From: Mark Rivers via Tech-talk <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 7 Nov 2019 15:23:22 +0000
Forgot to CC tech-talk.

-----Original Message-----
From: Mark Rivers 
Sent: Thursday, November 7, 2019 9:22 AM
To: 'Seeberger, John T CIV USN NAS PAX MD (USA)' <[email protected]>; [email protected]
Subject: RE: [Non-DoD Source] Re: Serial port bus connection issue on arm platform

Hi Thad,

Those errors are coming from stream.  You need to figure out if you can communicate with the port outside of stream.  The simplest way is using the asyn record and your OPI GUI client.  If that works then we need to find why stream is having problems.

Mark


-----Original Message-----
From: Tech-talk <[email protected]> On Behalf Of Seeberger, John T CIV USN NAS PAX MD (USA) via Tech-talk
Sent: Thursday, November 7, 2019 9:13 AM
To: [email protected]; [email protected]
Subject: RE: [Non-DoD Source] Re: Serial port bus connection issue on arm platform

yes its via a pl2303 usb serial convertor presently. 
The port is recognized by the async driver as far as I can tell.

epics> asynReport(10,SERIALPORT)
SERIALPORT multiDevice:No canBlock:Yes autoConnect:Yes
    enabled:Yes connected:Yes numberConnects 1
    nDevices 0 nQueued 0 blocked:No
    asynManagerLock:No synchronousLock:No
    exceptionActive:No exceptionUsers 1 exceptionNotifys 0
    traceMask:0x1 traceIOMask:0x0 traceInfoMask:0x1
    interposeInterfaceList
        asynOctet pinterface 0xb6d6ba88 drvPvt 0x37c80
    interfaceList
        asynCommon pinterface 0xb6d6a55c drvPvt 0x36090
        asynOption pinterface 0xb6d6a568 drvPvt 0x36090
        asynOctet pinterface 0xb6d6b768 drvPvt 0x36090 Serial line /dev/ttyUSB0: Connected
                    fd: 3
    Characters written: 0
       Characters read: 0

But when starting:
 ############################################################################
> 2019/10/31 21:26:01.810631 _main_ Cannot find a bus named 'SERIALPORT' for 'aoa'
> 2019/10/31 21:26:01.810770 _main_ aoa: Can't attach to bus SERIALPORT
> -1
> 2019/10/31 21:26:01.810834 _main_ aoa: Record initialization failed

Thad

________________________________________
From: Peter Milne [[email protected]] on behalf of Peter Milne [[email protected]]
Sent: Thursday, November 07, 2019 10:08 AM
To: [email protected]
Cc: Seeberger, John T CIV USN NAS PAX MD (USA)
Subject: [Non-DoD Source] Re: Serial port bus connection issue on arm platform

Hi John

The IOC is running on the Zynq and uses one of the two Zynq tty ports?.
If so, they are usually called /dev/ttyPS0, /dev/ttyPS1

If you actually have a USB->tty converter connected and the port _is_ in fact /dev/ttyUSB0, please ignore this comment.

Cheers

Peter

On 07/11/2019 14:54, Seeberger, John T CIV USN NAS PAX MD (USA) via Tech-talk wrote:
> Good day. I have a database with 7 PV's that drive an aviation six pack. I have successfully built and run on Xilinx ultrascale dev board, Epics base-3.15.5, synApps_6_0 compiled with aarch64. The ioc runs fine under petalinux on zcu106. The simulator uses /dev/ttyUSB0 to talk to a labview application that feeds the data. The example is based upon  an arduino example I found on the web. Very simple.
>
> Now I want to target gnueabihf Xilinx zynq 7000 and run on zc706 and NAII board. Database unchanged. I recompiled epics base and syncapps with 32 bit arm compiler, rebuild petalinux. Now when I run I'm getting errors with the serial port. Here is what I think are relevant snippits.
>
>
> The aoa record:
> record(ai, aoa) {
>      field(DESC, "Angle of Atack Sensor")
>      field(DTYP, "stream")
>      field(INP, "@aoa.proto get_analog() $(PORT)")
>      field(SCAN, ".1 second")
>      field(HOPR, "360")
>      field(LOPR, "0")
>      field(PREC, "2")
>      field(FLNK, "speed")
> }
>
>
>
> I limit the error message to first PV, but all records have same errors.
>
> The serial port is there, functional, permissions fine. The same database and startup works fine when built with aarch64 compiler and run on zcu106.
>
> I would like to get working under the 32 bit arm zynq, so the database run on a North Atlantic Industries VPX, or VME  board.

>
>
> Startup:
> epicsEnvSet(STREAM_PROTOCOL_PATH,"helloWorldIOCApp/Db")
> dbLoadDatabase("dbd/helloWorldIOC.dbd")
> helloWorldIOC_registerRecordDeviceDriver(pdbbase)
> drvAsynSerialPortConfigure("SERIALPORT","/dev/ttyUSB0",0,0,0)
> asynSetOption("SERIALPORT",-1,"baud","115200")
> asynSetOption("SERIALPORT",-1,"bits","8")
> asynSetOption("SERIALPORT",-1,"parity","none")
> asynSetOption("SERIALPORT",-1,"stop","1")
> asynSetOption("SERIALPORT",-1,"clocal","Y")
> asynSetOption("SERIALPORT",-1,"crtscts","N")
> dbLoadRecords("db/arduino.db","PORT='SERIALPORT'"
> iocInit()
> Starting iocInit
> ######################################################################
> ######
> ## EPICS R3.15.5
> ## EPICS Base built Oct 24 2019
> ######################################################################
> ######
> 2019/10/31 21:26:01.810631 _main_ Cannot find a bus named 'SERIALPORT' for 'aoa'
> 2019/10/31 21:26:01.810770 _main_ aoa: Can't attach to bus SERIALPORT
> -1
> 2019/10/31 21:26:01.810834 _main_ aoa: Record initialization failed
>
> Warning: RSRV has empty beacon address list
> iocRun: All initialization complete
> ## Start any sequence programs
> #seq snchelloWorldIOC,"user=johnseebergerlin"
> 2019/10/31 21:26:02.413981 scan-0.1 aoa: Record not initialised 
> correctly
>
> dbior
> Driver: stream
>    StreamDevice 2.7.7 built Oct 24 2019 13:43:29
>    registered bus interfaces:
>      DebugInterface
>      DummyInterface
> Driver: drvAsyn
> SERIALPORT multiDevice:No canBlock:Yes autoConnect:Yes Serial line
> /dev/ttyUSB0: Connected
>
> dbior "stream"
> Driver: stream
>    StreamDevice 2.7.7 built Oct 24 2019 13:43:29
>    registered bus interfaces:
>      DebugInterface
>      DummyInterface
>
> found this relevant tech-talk post:
> If AsynDriverInterface is not listed, have you accidentally commented out the bus interface in CONFIG_STREAM?
> Unfortunately, with asyn 4-5, you still have to specify ASYN_VERS=4-3 
> in CONFIG_STREAM (I will fix that later).
>
> What is this refering to, where is this?
>
> How can I further debug?
>
> thx
> Thad
>


--
Peter Milne
Director of Sales
www.d-tacq.com

References:
Serial port bus connection issue on arm platform Seeberger, John T CIV USN NAS PAX MD (USA) via Tech-talk
Re: Serial port bus connection issue on arm platform Peter Milne via Tech-talk
RE: [Non-DoD Source] Re: Serial port bus connection issue on arm platform Seeberger, John T CIV USN NAS PAX MD (USA) via Tech-talk

Navigate by Date:
Prev: FW: Serial port bus connection issue on arm platform Mark Rivers via Tech-talk
Next: Re: Serial port bus connection issue on arm platform Johnson, Andrew N. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: [Non-DoD Source] Re: Serial port bus connection issue on arm platform Seeberger, John T CIV USN NAS PAX MD (USA) via Tech-talk
Next: FW: Serial port bus connection issue on arm platform Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 07 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·