From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

VXI 32 bit addressing problem

I am designing a simple static addressed register based VXI card usign a PIC32 that needs to have A16/32 bit capability and am testing the design with a VXI USB controller. I am using a modified Labview example program to communicate with the board. If I program the Address Space bits to A16 only, Resman finds the board and I an read and write all registers with no problem.

When I set the Address Space bits to A16/32 After setting up as a 16 bit device Resman fails with a "VXI A32 Address Allocation Error On Bus 0".

Ther is obviously something I am missing here about 32 bit addressing.

I am using the 4 most significant bits of the 32 bit addresss to set the units address in 32 bit mode, and have set the Required memory field in the device type register to 0100.

If I understand the addressing modes correctly 16 & 32 bit address modes are controlled by the address modifiers and that the A24/32/64 bit inthe status & control registeris is only used if there are more than 64 registers that need to be acessed during set up.

 I have programmed my board to respond if it detects a valid 16 bit address with adress modifiers of 29 or 2D or if it detects the same 16 bit address and the 32 bit adress bits set to the value read from its 32 bit address switch with adress modifiers of  09, 0A, 0D or 0E.

I've not been able to find any descriptions of what the controller does when setting up a system so am having to grope around in the dark on this one.

Any one got any ideas as to what I'm doing wrong or not doing that I should be doing and am not.

Thanks in advance

Peter

 

0 Kudos
Message 1 of 3
(6,946 Views)

Hi Peter,

 

Given that it operates well within the 16 bit Address Space, I would imagine that the software is behaving as expected and this issue could rely on the 32 bit addressing implementation on board the PIC32. Do you receive the error after mapping the address or only after you try to read (Peek) from a specified register?

 

How does the PIC respond during this process? Is there any form of output that notifies you that the 32 bit address has been successfully acquired?

 

Kind Regards,


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 2 of 3
(6,942 Views)

Hi Alex

Thanks for the reply. I have just now got the board basically working and returned to my desk to see that a reply had come in around lunch time.  There were a couple of problems with it, one of which was caused by adding some debugging code that had a silly syntax error. This caused the unit to responding on all 16 bit addresses and being dynamically configured to all addresses. My unfamilliarity with VXI and the USB-VXI controller lead me to beleive that this was normal. Since the system thought that it had 255 devices plugged in it ran out of 32 bit memory space to allocate; I'm using a 4 bit address selector for hte 32 bit address.

Having sorted that out and getting the unit to respond to only one address Resman only showed one uit and allocated some space in A32. After  few more battle with the code it fianlly gave in and started responding to 32 bit adresses.

 

I have been asked to provide a switch for selecting the 32 bit address, but all that I have read says that the resource manager allocates 32 bit addresses. Is there a way of statically seting the 32 bit address. Also when the A32 bit has been set can the unit still resond in A16 or should it switch to A32 only until set back to A16?

 

Like many of these problems the solution was very simple once seeb it just needed that little extra knowledge. spotting the extra  semicolon that crept into the C code helped too.

 

Thanks Peter

0 Kudos
Message 3 of 3
(6,937 Views)