EPICS Home

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  2019  2020  2021  <20222023  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  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Re: Re: Re: RTEMS 5 Cannot Read Event Generator
From: chengsn via Tech-talk <tech-talk at aps.anl.gov>
To: "hamadyk, paul (dlsltd,ral,lsci)" <paul.hamadyk at diamond.ac.uk>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 22 Aug 2022 11:09:33 +0800 (GMT+08:00)
It's helpful. Thanks for your help!

After changing 
EgEnableMuxSeq (pEg, menuSeqRam1, menuNO);  /* Disable Mux triggering of sequence ...
EgEnableMuxSeq (pEg, menuSeqRam2, menuNO);  /* Disable Mux triggering of sequence ...

to
 
EgEnableMuxSeq (pCard, menuSeqRam1, menuNO);  /* Disable Mux triggering of ... 
EgEnableMuxSeq (pCard, menuSeqRam2, menuNO);  /* Disable Mux triggering of ...

in mrfApp/src/drvMrfEg.c, RTEMS 5 can read EVG. And I can observe through the oscilloscope that the output signal of the EVG is normal. It seems that the EVG works well.

But, when I run EVG and EVR at same time in one crate, RTEMS crashes after iocshell starts, and I do not anything else.

Do you have any advices?

Anyway, thanks a lot for your help.

chengsn
IHEP

> -----Original Messages-----
> From: "Hamadyk, Paul (DLSLtd,RAL,LSCI)" <paul.hamadyk at diamond.ac.uk>
> Sent Time: 2022-08-21 22:56:47 (Sunday)
> To: "chengsn at ihep.ac.cn" <chengsn at ihep.ac.cn>
> Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
> Subject: Re: Re: Re: RTEMS 5 Cannot Read Event Generator
> 
> I have one change to the mrfTiming driver that wasn't in my notes. In mrfApp/src/drvMrfEg.c, about line 4660 change
> 
> EgEnableMuxSeq (pEg, menuSeqRam1, menuNO);  /* Disable Mux triggering of sequence ...
> EgEnableMuxSeq (pEg, menuSeqRam2, menuNO);  /* Disable Mux triggering of sequence ...
> 
> to
> 
> EgEnableMuxSeq (pCard, menuSeqRam1, menuNO);  /* Disable Mux triggering of ... 
> EgEnableMuxSeq (pCard, menuSeqRam2, menuNO);  /* Disable Mux triggering of ...
>  
> Does that help?
> 
> ________________________________________
> From: chengsn at ihep.ac.cn <chengsn at ihep.ac.cn>
> Sent: 19 August 2022 02:44
> To: Hamadyk, Paul (DLSLtd,RAL,LSCI)
> Cc: tech-talk at aps.anl.gov
> Subject: Re: Re: Re: RTEMS 5 Cannot Read Event Generator
> 
> I put only MVME5500 and EVR(in slot 4) in the crate, and set ErConfigureVME(0, 4, 0x0, 0x62, 4). The IOC works well.
> 
> Then I put only MVME5500 and EVG(in slot 4) in the crate, and set EgConfigure(0, 4, 0x0). After iocInit and EPICS log, the RTEMS exception will appear, just like before.
> 
> It seems to be an RTEMS exception during IOC initialization, which only occurs after configuring EVG.
> 
> 
> chengsn
> IHEP
> 
> > -----Original Messages-----
> > From: "Hamadyk, Paul (DLSLtd,RAL,LSCI)" <paul.hamadyk at diamond.ac.uk>
> > Sent Time: 2022-08-18 18:58:37 (Thursday)
> > To: "chengsn at ihep.ac.cn" <chengsn at ihep.ac.cn>
> > Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
> > Subject: Re: Re: RTEMS 5 Cannot Read Event Generator
> >
> > You can use powerpc-rtems5-addr2line or powerpc-rtems5-objdump -d -S on the RTEMS/IOC image file to find the location of the fault but I don't remember seeing an RTEMS exception. Maybe I didn't test the EVG and EVR in the crate at the same time.
> >
> > The mrfTiming driver configures the base address of the card so could you try 0x000000 as the base address of your EVR?
> >
> > ________________________________________
> > From: chengsn at ihep.ac.cn <chengsn at ihep.ac.cn>
> > Sent: 18 August 2022 10:58
> > To: Hamadyk, Paul (DLSLtd,RAL,LSCI)
> > Cc: tech-talk at aps.anl.gov
> > Subject: Re: Re: RTEMS 5 Cannot Read Event Generator
> >
> > Thanks for your help!
> >
> > I set the MRF_CONFIG_SITE like this:
> > EPICS_SUPPORTS_CRCSR = YES
> > BSP_SUPPORTS_CRCSR = YES
> > ADDRESS_MODE = USER
> >
> > Now, I change it to be the same as you set:
> > EPICS_SUPPORTS_CRCSR = YES
> > BSP_SUPPORTS_CRCSR = YES
> > ADDRESS_MODE = SUPERVISOR
> >
> > Then, I recompile the driver and run it.
> > The configure of st.cmd file is:
> > ErConfigureVME(0, 5, 0x280000, 0x62, 4)
> > EgConfigure(0, 3, 0x180000)
> >
> > or
> >
> > ErConfigureVME(0, 5, 0x0, 0x62, 4)
> > EgConfigure(0, 3, 0x10000)
> >
> > The EgConfigure() no longer gives an error message, and the return value is 0.
> > But some new error messages appear:
> >
> > ...
> > EgConfigure(0, 3, 0x10000)
> > Evg status:0
> > #EgConfigTimeStamp(0, "NORMAL")
> > #ErConfigTimeStamp(0,"DBUS","","",0,0)
> > #var mySubDebug 1
> > #traceIocInit
> > iocInit
> > Starting iocInit
> > ############################################################################
> > ## EPICS R7.0.6.1
> > ## Rev. 2022-07-13T16:31+0800
> > ############################################################fatal source: RTEMS_
> > FATAL_SOURCE_EXCEPTION
> > exception vector 3 (0x3)
> >   next PC or address of fault = 0x00008240
> >   saved MSR = 0x0200b032
> >   context = task, ISR nest level = 0
> >   thread dispatch disable level = 0
> >   R0  = 0x00008220 R1  = 0x00563210 R2  = 0x00000000 R3  = 0x00d560f0
> >   R4  = 0x00000000 R5  = 0x00000000 R6  = 0x80808080 R7  = 0x63616c63
> >   R8  = 0x00000001 R9  = 0x00000000 R10 = 0x00000016 R11 = 0x7446756e
> >   R12 = 0x00000010 R13 = 0x00510a08 R14 = 0x00000000 R15 = 0x00000001
> >   R16 = 0x0044594c R17 = 0x00450828 R18 = 0xffffffff R19 = 0x00450810
> >   R20 = 0x00000007 R21 = 0x00000000 R22 = 0x00510000 R23 = 0x00000000
> >   R24 = 0x00ccb6f8 R25 = 0x004509ec R26 = 0x00000000 R27 = 0x00438be0
> >   R28 = 0x00000001 R29 = 0x00000000 R30 = 0x9f010000 R31 = 0x00d560f0
> >   CR  = 0x42422482
> >   CTR = 0x000083b0
> >   XER = 0x20000000
> >   LR  = 0x00008220
> >   DAR = 0x0000002a
> >   executing thread ID = 0x0b010001, name =
> > Stack Trace:
> >   IP: 0x00008240, LR: 0x00008220
> > --^ 0x00008548--^ 0x0025a330--^ 0x00215700--^ 0x00215d68--^ 0x00215f60
> > --^ 0x0021bc10--^ 0x00259428--^ 0x00003e88--^ 0x00279e38--^ 0x00293c20
> > --^ 0x00292ca8--^ 0x00292bf8
> > bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad so I reset the
> >  card
> > Printing a stack trace for your convenience :-)
> >
> > 0x04122656--> 0x04122652--> 0x02711444--> 0x02712016--> 0x04150996
> > 0x04106868--> 0x00033312--> 0x00034120--> 0x02466608--> 0x02184960
> > 0x02186600--> 0x02187104--> 0x02210832--> 0x02462760--> 0x00016008
> > 0x02596408--> 0x02702368--> 0x02698408--> 0x02698232
> >
> >
> > Its the RTEMS EXCEPTION.
> >
> > When I modify the st.cmd file as follows, the IOC can work well:
> > ErConfigureVME(0, 5, 0x280000, 0x62, 4)
> > #EgConfigure(0, 3, 0x180000)
> >
> > I change the slot for EVG or use another crate, and the result do not change.
> >
> > Should I do some special configuration for EVG?
> >
> > chengsn
> > IHEP
> >
> > > -----Original Messages-----
> > > From: "Hamadyk, Paul (DLSLtd,RAL,LSCI)" <paul.hamadyk at diamond.ac.uk>
> > > Sent Time: 2022-08-18 15:23:24 (Thursday)
> > > To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "chengsn at ihep.ac.cn" <chengsn at ihep.ac.cn>
> > > Cc:
> > > Subject: Re: RTEMS 5 Cannot Read Event Generator
> > >
> > > I have performed some basic tests with the EVG using the mrfTiming driver with RTEMS 5 and EPICS 7 on an mvme5500. Look at MRF_CONFIG_SITE in mrfApp/src. It says this:
> > >
> > > # If you don't know which address modifier your BSP uses for the A24 window,
> > > # then just select one of the answers below (you have a 50% chance of being
> > > # right).  Load the software onto an IOC that contains an Event Generator or
> > > # an Event Recevier card and call either the "EgConfigure" or "ErConfigure"
> > > # routine.  If the routine fails with a message of the form:
> > > #    "Unable to read Event Generator/Receiver Card x (Slot y) at VME/A24
> > > #     address ......",
> > > # then you chose the wrong option.
> > >
> > > I created the config file MRF_CONFIG_SITE_RTEMS-beatnik and set these options:
> > > EPICS_SUPPORTS_CRCSR = YES
> > > BSP_SUPPORTS_CRCSR = YES
> > > ADDRESS_MODE = SUPERVISOR
> > >
> > > Do you have the same settings? My base address was set to 0x10000 for the EVG and 0x0 for the EVR, both in the same crate. Here is my A24 address configuration, which should be the default:
> > >
> > > Universe Master Ports:
> > > Port  VME-Addr   Size       PCI-Adrs   Mode:
> > > 1:    0x00000000 0x00ff0000 0x9f000000 A24, D64 [MBLT], Dat, Sup
> > >
> > > Paul.
> > > ________________________________________
> > > From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of chengsn via Tech-talk <tech-talk at aps.anl.gov>
> > > Sent: 17 August 2022 10:03
> > > To: tech-talk at aps.anl.gov
> > > Subject: RTEMS 5 Cannot Read Event Generator
> > >
> > > Hello all,
> > >
> > > I try to running the mrfEventSystem driver with EPICS 7 on RTEMS 5. After modifying part of the code, the driver can read the EVR(EVent Reciever) Card, and it works well. But when I run the driver and use the EVG(EVent Generator), I get this error: EgConfigure: Unable to read Event Generator Card 0 (slot 3) at VME/A24 address 0x1800000.
> > >
> > > In st.cmd file, the configuration for the EVG is EgConfigure(0, 3, 0x1800000). When I change the OS from RTEMS to vxWorks(on MVME6100 and MVME5500), the driver can read the EVG.
> > >
> > >
> > > Here is the hardware I am using:
> > >
> > >  EVG: VME-EVG-230.
> > >
> > >  EVR: VME-EVG-230-RF.
> > >
> > >  Single board computer: MVME6100 and MVME5500.
> > >
> > > The software:
> > >
> > >  mrfEventSystem Driver Version: MRF Series 200 Event System Software Release V2-4.
> > >
> > >  EPICS Version: 7.0.6.1
> > >
> > >  RTEMS Version: 5
> > >
> > >
> > > I also compared the difference between the return value of EVG and EVR in the process of calling the function devReadProbe()(devReadProbe(sizeof(epicsUInt16), pEg, &Junk) and devReadProbe(sizeof(epicsUInt16), pEr, &Junk)).The source of the difference in the return value of devReadProbe() is that the return value of the RTEMS function _BSP_clear_hostbridge_errors() is different. The function as follows:
> > >
> > >
> > > unsigned long
> > > _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
> > > {
> > > unsigned long rval;
> > >
> > > /* MCP is not connected */
> > > if ( enableMCP )
> > > return -1;
> > >
> > > rval  = (clear_hose_errors(0, quiet) & PCI_ERR_BITS)>>8;
> > > rval |= clear_hose_errors(BSP_pci_hose1_bus_base, quiet) & PCI_ERR_BITS;
> > >
> > > /* Tsi148 doesn't propagate VME bus errors to PCI status reg. */
> > > if ( _BSP_clear_vmebridge_errors )
> > > rval |= _BSP_clear_vmebridge_errors(quiet)<<16;
> > >
> > > return rval;
> > > }
> > >
> > > (ret = _BSP_clear_hostbridge_errors(0,1); )
> > >
> > > The ret is return value of the bspExtMemProbe().
> > >
> > > The value of ret: EVR returns 0; EVG returns 0x88FD0000 (in vxWorks and RTEMS, sizeof(long) = 8).
> > >
> > > Do you have any suggestions?
> > >
> > >
> > > Thank you!
> > >
> > > chengsn
> > >
> > > IHEP
> > >
> > > --
> > > This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
> > > Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
> > > Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
> > > Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

Replies:
Re: Re: Re: Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) via Tech-talk
References:
RTEMS 5 Cannot Read Event Generator chengsn via Tech-talk
Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) via Tech-talk
Re: Re: RTEMS 5 Cannot Read Event Generator chengsn via Tech-talk
Re: Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) via Tech-talk
Re: Re: Re: RTEMS 5 Cannot Read Event Generator chengsn via Tech-talk
Re: Re: Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) via Tech-talk

Navigate by Date:
Prev: Re: make release freezes terminal in synApps installation Mark Rivers via Tech-talk
Next: Re: Re: Re: Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) 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  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: Re: Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) via Tech-talk
Next: Re: Re: Re: Re: RTEMS 5 Cannot Read Event Generator Hamadyk, Paul (DLSLtd, RAL, LSCI) 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  2019  2020  2021  <20222023  2024