Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Driver Wizard and Masked R/W - wrong behaviour?

Hello,

 

I'm developing a VISA driver and have an issue with the interrupt removal sequence I've defined for my device.

 

The "Masked R/W" doesn't seem to work as explained in the context help. Has anyone else had this issue?

 

The expected behaviour (understood from the context help) is the following:

 

1. Read the contents of a register on the specified address and mask them with the mask entered in the "Compare mask" field

2. Write the results of the masking back to the original register on the device

3. Not take the contents of the "write/Compare value" field into consideration

 

The "surprising/errorneous" behaviour I am getting is:

1. if the "write/compare value" field is empty, all zeros are written to the target register, no matter what is the original content of the register or of the "Compare mask" field.

2. If something is written in the "Compare mask" field and in the "write/compare value", the result of an AND operation between these two values is written to the target register, no matter its initial content.

 

My goal is to read the contents of a register and only set specific bits to 0, leaving the others as they were.

 

Is this a bug or am I missing something? I can do without the "Masked R/W" and only use a "Write" step, but it will result in a much less elegant solution.

 

Cheers, 

 

Rok Tavčar

Hardware developer

Cosylab

0 Kudos
Message 1 of 2
(7,458 Views)

Hi Tavčar,

 

Did you ever find an answer to this question?  I have the same requirement you described below but I don't see an answer to your question.

 

The Compare Mask context help reads, "This field is only valid when a Compare access type is specified."  I wonder if it's supposed to do anything with Masked R/W access?

 

Thanks,

 

Steve K

0 Kudos
Message 2 of 2
(6,437 Views)