02-15-2023 07:08 PM
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.
Solved! Go to Solution.
02-15-2023 10:37 PM - edited 02-15-2023 10:43 PM
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.
02-16-2023 12:35 AM - edited 02-16-2023 12:59 AM
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
02-16-2023 02:18 AM
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.
02-16-2023 05:36 PM
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
02-16-2023 07:38 PM - edited 02-16-2023 07:42 PM
@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.