Jump to content
  • 0

SPI transfer failure using JTAG-SMT2


adambro

Question

I'm attempting to communicate with a digital potentiometer IC via SPI. 

On one of my Linux PCs, using the Adept 2 runtime, I can successfully read from the IC. However, when I move this onto another Linux PC, this doesn't work and I get zeros returned from the DspiPut function.

I've added a call to the DmgrGetLastError function following the call to DspiPut and this returns no error.

Looking at the electrical SPI signals, I cannot see any difference between the PC that works and those that don't.

So I'm struggling to see what is going wrong here. 

Is there anything I can try to investigate and resolve this?

Thanks.

 

The previously mentioned error code 1031 "The transfer is in progress or pending" error doesn't appear when calling DmgrGetLastError after the DspiPut call but actaully after the DspiDisable function. This may still be related but the association with the DspiPut call is less clear than I first thought.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Many thanks for your response Michael. 

I have now managed to resolve this problem. What I was missing was a call to the DmgrGetTransResult function after the DspiPut to allow sufficient time for the data to be returned from the device. It is an overlapped transfer operation.

I should have really realised this earlier. The error code did point in this direction but I just wasn't able to quite work out how to use DmgrGetTransResult properly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...