Experimental Physics and
| |||||||||||||||
|
I have some trouble running an Raspberry Pi IOC with serial communication in parity-mode "even". I adapted an online example and got it running without problems as long as the asynsetOption parity in st.cmd is "none" asynSetOption("SERIALPORT",-1,"parity","none"). I checked the communication with an oszilloscope and it is fine. As soon as I change the parity to "even" (thats what I read from the ASYN4.38 manual) it fails. Base is R7.0.3.1 I tried ASYN 4-36 and 4-38 I tried "even" "EVEN" and "Even" st.cmd and log after ioc-start see below Do I have to change the parity somewhwer else? Or are other settings colliding? Thanks in advance, best regards, Jan st.cmd: (parity "none" is fine, "odd" is also failing) ################################# #!/home/pi/Apps/epics/helloWorldIOC/bin/linux-arm/helloWorldIOC #- You may have to change helloWorldIOC to something else #- everywhere it appears in this file < envPaths epicsEnvSet(STREAM_PROTOCOL_PATH,"/home/pi/Apps/epics/helloWorldIOC/helloWorldIOCApp/Db") cd "${TOP}" ## Register all support components dbLoadDatabase "/home/pi/Apps/epics/helloWorldIOC/dbd/helloWorldIOC.dbd" helloWorldIOC_registerRecordDeviceDriver pdbbase drvAsynSerialPortConfigure("SERIALPORT","/dev/ttyS0",0,0,0) asynSetOption("SERIALPORT",-1,"baud","19200") asynSetOption("SERIALPORT",-1,"bits","8") asynSetOption("SERIALPORT",-1,"parity","even") asynSetOption("SERIALPORT",-1,"stop","1") asynSetOption("SERIALPORT",-1,"clocal","Y") asynSetOption("SERIALPORT",-1,"crtscts","N") dbLoadRecords("/home/pi/Apps/epics/helloWorldIOC/db/arduino.db","PORT='SERIALPORT'") ## Load record instances #dbLoadRecords("db/xxx.db","user=pi") cd "${TOP}/iocBoot/${IOC}" iocInit ## Start any sequence programs #seq sncxxx,"user=pi" ############################### Log after starting the IOC - Failure in Line 14.: ############################### #!/home/pi/Apps/epics/helloWorldIOC/bin/linux-arm/helloWorldIOC < envPaths Can't open envPaths: No such file or directory epicsEnvSet(STREAM_PROTOCOL_PATH,"/home/pi/Apps/epics/helloWorldIOC/helloWorldIOCApp/Db") macLib: macro TOP is undefined (expanding string cd "${TOP}") ## Register all support components dbLoadDatabase "/home/pi/Apps/epics/helloWorldIOC/dbd/helloWorldIOC.dbd" helloWorldIOC_registerRecordDeviceDriver pdbbase drvAsynSerialPortConfigure("SERIALPORT","/dev/ttyS0",0,0,0) asynSetOption("SERIALPORT",-1,"baud","19200") asynSetOption("SERIALPORT",-1,"bits","8") asynSetOption("SERIALPORT",-1,"parity","even") setOption failed tcsetattr failed: Invalid argument asynSetOption("SERIALPORT",-1,"stop","1") asynSetOption("SERIALPORT",-1,"clocal","Y") asynSetOption("SERIALPORT",-1,"crtscts","N") dbLoadRecords("/home/pi/Apps/epics/helloWorldIOC/db/arduino.db","PORT='SERIALPORT'") ## Load record instances #dbLoadRecords("db/xxx.db","user=pi") macLib: macro TOP is undefined (expanding string cd "${TOP}/iocBoot/${IOC}") macLib: macro IOC is undefined (expanding string cd "${TOP}/iocBoot/${IOC}") iocInit Starting iocInit ############################################################################ ## EPICS R7.0.3.1 ## EPICS Base built May 13 2020 ############################################################################ iocRun: All initialization complete ## Start any sequence programs #seq sncxxx,"user=pi" epics> ###############################
| ||||||||||||||
ANJ, 05 Jun 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |