Hi again,<br><br>Thank you once again for presenting the VME world to me :)<br><br>&gt;Looks like you&#39;re reading something. &nbsp;Address 0x10100000 is larger than<br>&gt;a 24 bit address. &nbsp;Perhaps you should be using A32 transfers instead of
<br>&gt;A24?<br><br>No, no, I need to do A16 access, thats the only way to read the control registers. Form here comes also my confusion - I thought that when I&#39;m reading CS/CSR register I need to do it in CSR address space. So no algorithms for geographical location of boards are needed in my case I guess.
<br>Actually the base address of CSR on the board is 0xA000 (10100000 is the first byte of the address selection in inary, shame on me :( ). But when I try to configure it with outWinCfgADC.zlatedAddrL = 0xA000, when I run the programm I get an errno 29 (Invalid argument) from ioctl(). In fact if I set the xlatedAddrL to some value smaller that 0x10000 I get this error. Here&#39;s my most recent configuration:
<br><br>&nbsp;&nbsp;&nbsp; outWinCfgADC.windowNbr&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; = 0;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.windowEnable&nbsp; &nbsp; &nbsp; = 1;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.wrPostEnable &nbsp;&nbsp; &nbsp; = 0;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.userAccessType&nbsp; = VME_SUPER;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.dataAccessType&nbsp; = VME_DATA;
<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.windowSizeL&nbsp; &nbsp; &nbsp;&nbsp; = 0x10000;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.xferProtocol&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = VME_SCT;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.addrSpace &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; = VME_A16;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.maxDataWidth &nbsp;&nbsp;&nbsp; = VME_D16;<br>&nbsp;&nbsp;&nbsp; outWinCfgADC.xlatedAddrL
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; = 0x10000000;<br><br>I think that 0x10000 for window size is big enough to encompass the whole A16 addressable space. With the 0x10000000 xlatedAddr I get no errors and read the desired registers when I increment this address to 0x1000A000. But nevertheless it seems strange to me that the device does not accept xlatedAddr lower that 0x10000. Maybe its due to the configuration of the VME controller?
<br><br>Best regards,<br>Konstantin<br>