PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXIe-6570 Use both I2C and SPI in the same application/test

Solved!
Go to solution

My project involves in testing through I2C and SPI by using one PXIe-6570. I2C and SPI are using different pins of 6570 but both of them will be used in the same test. What is the best way to handle both I2C and SPI with one 6570?

 

Thanks.  

0 Kudos
Message 1 of 6
(1,324 Views)

Yeah, create I2C and SPI patterns with respective pins included in them, and use it just like any other pattern along with source pattern and capture pattern.

 

What do you mean exactly by "both of them will be used in the same test"? - use simultaneously or switch between protocols?

 

But, things get complicated when you need to use both simultaneously.

  1. There is only one pattern engine on 6571 - this is the ASIC on HW that understands the pattern and drives IO signals, so only one pattern can run at any time
  2. If you want both I2C and SPI run at the same time, create a combined pattern that does both I2C and SPI at the same time, adds complexity to source and capture part, they become synchronous, and different clock rates are difficult
  3. If you want to run both SPI and I2C simultaneously at different clock rates, the only option is to get another 6570 card, dedicate each card for each protocol implementation
Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(1,296 Views)

Hi Santhosh,

 

Thanks a lot for answering my question.

 

At this moment we develop a workaround.

1. Load I2C spec/timing/level/pattern and run the test requiring I2C. 

2. Unload I2C spec/pattern

3. Load SPI spec/timing/level/pattern and run the test requiring SPI.

3. Unload SPI spec/pattern

 

This solution works ok so far. But when I run the program to test the second unit. The software crashed (python code) and it complained I2C level/timing already exist. My understanding is that I only unloaded I2C spec/pattern in the previous run and do not have niDigital command to unload timing/level. But load spec/timing/level is one niDigital command and I can't just load spec without reload timing/level. So now I have to close/restart the program after every run in order to test next unit. Do you have any experience on this situation?

 

Thanks.

-Calvin

0 Kudos
Message 3 of 6
(1,280 Views)
Solution
Accepted by topic author CY2000

You don't need to load and unload every time, just apply different levels and timing sheets as needed during the execution.

 

Create separate timing sheet, levels sheet, patterns, source waveform, capture waveform for I2C and SPI, load them to the instrument right after initialize. During the test, apply the respective levels and timing sheet before calling the pattern to execute.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 6
(1,265 Views)

Hi Santhosh,

 

Thanks for the comments. It works after I followed your suggestion. Really appreciate your help.

 

Just out of curiosity, why applying different level/timing can enable different communication protocols?

 

Thanks.

-Calvin

0 Kudos
Message 5 of 6
(1,242 Views)

@CY2000 wrote:

Hi Santhosh,

 

Thanks for the comments. It works after I followed your suggestion. Really appreciate your help.

 

Just out of curiosity, why applying different level/timing can enable different communication protocols?

 

Thanks.

-Calvin


The basic rule is that you need levels and timing applied for the timesets used in the pattern to translate them into edges. You can keep them in the same timing and levels sheet as well, but you should ensure that the timesets are different between each protocol so as not to mismatch the edges. Given you're a beginner I suggested keeping things separate so you don't mess up stuff.

 

To the 6570, it is just another pattern, it doesn't care what the pattern does, it does what it was designed to do. Just abide by the rules of the instrument's capability and functionality, and everything is good.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 6
(1,231 Views)