PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Trouble with NI6570 and BME280

Hi NI Forum,

 

I've recently purchased the NI 6570 and have taken the digital pattern instrument class associated with it. I'm new to the world of digital logic and the class was a huge help. 

To further my progress I've purchased a sensor, the BME280, here's its datasheet: 

https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf

 

I've linked the datasheet for anyone's review but all I'm trying to do is read a static value from the DUT. The process should be to send 0xD0 and I should get back 0x60. 

I tried to bit-bang this using only 1s and 0s in the pattern (left image) as well as use the template to do a read command (right image), but neither yielded 0x60.

Digital Scope Bit Bang.pngDigital Scope Source and Capture.png

 

If I make the number of steps higher I can see that the clock has the potential for an issue:

First stage: 

Chris_NI_1-1647473209808.png

 

Zooming in to the falling edge of the clock, where there's a second rise that might be seen by the device. (the datasheet says the sensor can work work at 10MHz so I fear this really could be a potential issue):

Chris_NI_2-1647473265626.png

 

 

Another potentially linked problem is that I can't do TDR calibration. The 6750 is connected to an SHC68-68-EPM cable (2m lenghth) and from there a SCB-68A break out box which is for sure in direct feed mode. But when I try to short the respective pins to ground for TDR it complains that things aren't actually hooked up to ground. I'm sure physically things are okay, and even when I choose the open option it still complains!

 

 I've been working at this for days tweaking parameters and checking grounds, but I can't understand what's causing this to happen. I'm able to get this working with an Arduino, so I know the sensor is fine.

I really do appreciate anyone's time or advice. Best,

Chris 

 

 

0 Kudos
Message 1 of 8
(1,381 Views)

Waveforms look good and you're using CPOL = CPHA = 0 which is supported by the DUT.

santo_13_0-1647475237053.png

 

 

I would recommend trying the CPOL = CPHA = 1 shown in the datasheet,

santo_13_2-1647475422858.png

 

 

 

TDR would not make a significant impact at the slow speeds you're operating (100kHz).

 

 

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 8
(1,374 Views)

Thank you Santhosh,

Especially for looking over the datasheet. 

Here's my latest attempt at mode 3, pretty much the same output:

Chris_NI_0-1647478431273.png

 

0 Kudos
Message 3 of 8
(1,363 Views)

At least from the pattern side, the implementation is good.

 

Few questions,

  • Why do you drive the signal between -0.5V and 3.8V for CS, SCL and MOSI? this exceeds the VIO levels supported by the DUT
    santo_13_0-1647485014737.png
  • How are you powering up the DUT? at what levels?
  • What is the exact circuit connections?
  • Please share the order of steps you're following to run this pattern
    • Like, power up VDD at 3.6V, then VIO at 3.6V, then run the pattern etc.,
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 8
(1,356 Views)

I would recommend giving SDC Addon a try, it provides out of the box functionality for many common protocols using 657x.

https://www.ni.com/en-us/shop/electronic-test-instrumentation/add-ons-for-electronic-test-and-instru...

 

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 5 of 8
(1,353 Views)

Ah, you caught me with some debugging parameters in place. 

 

Like I showed with the picture, I was worried about there being an extra rising edge and was hoping to avoid those oscillations with a bigger separation between high and low. I run this device at a VCC of 3.3V. I know I keep mentioning oscillations but when I use 3.3V and 0V as the high and low. Here's the pattern I get, so increasing the separation seemed to be a step in the right direction:

Chris_NI_0-1647487443590.png

The Arduino actually has a high of 5V and a low of 0V. For the same Clock, MOSI, and Chip Select pins. 

 

The sensor datasheet was only used for the SPI information. The sensor is actually on a board provided by waveshare: https://www.waveshare.com/wiki/BME280_Environmental_Sensor

 

Currently, the board is powered up via an NI 4144 SMU to 3.3V, it's also controlled by the digital pattern editor. 

 

There are 5 connections of the board:

  • 1 - VCC - Connects to the NI SMU, I have an adapter board on the SMU to connect to BNC and a BNC cable that connects to jumper wires.
  • 2/3/4 -Chip Select/MISO/MOSI/CLOCK - Connects directly to a terminal on the SCB-68A breakout box
  • 5 - Ground Connects to the SMU Ground and shorted to the SCB-68A as to connect to the ground with the 6570. I've tried a bunch of configurations with this including the special sense ground or not shorting it to the SCB-68A at all. 

 

 

0 Kudos
Message 6 of 8
(1,327 Views)

Thank you, I'll poke around with this program..

0 Kudos
Message 7 of 8
(1,326 Views)

Thanks Santhosh,

I thought I replied to this last night so I'll try to rewrite it now. (It's weird because even the images appear in my profile but the posts don't show up here)

 

I had forgotten the settings I had left the program in because I've been debugging. There's some important information in why I drive with that as well. If I drive with 3.3V and 0V I get the following:

Chris_NI_0-1647521085073.png

So I thought increasing the voltage between high and low would help with the false clock reading I mentioned before. And it seemed to help, after all, I get something that seems better as shown in my original post, and I had been going with that. What's more, is the Arduino uses 5V for these pins with a 3.3V supply. Even though it's not best practice to go higher than rail.

 

In this case, the DUT is not only the sensor but also includes the board the sensor lives on, which is made by waveshare: 

https://www.waveshare.com/wiki/BME280_Environmental_Sensor

 

That being said I'm not powering the component but the board on which the sensor sits, but I am powering it with a 3.3V suppy from an NI 4144 SMU.

 

The board has 6 connections, all with female jumper cables:

  1. VCC - I have a PXI chassis where an NI 4144 sits. The SMU has an adapter board that gives me access to a channel in the form of a BNC connection. And I have a BNC to jumper adapter. The supply portion of the jumper goes to VCC with +3.3V 
  2. MOSI - Goes to its own dedicated terminal on the SCB-68A I mentioned earlier
  3. MISO - Goes to its own dedicated terminal on the SCB-68A I mentioned earlier
  4. Clock - Goes to its own dedicated terminal on the SCB-68A I mentioned earlier
  5. CS - Goes to its own dedicated terminal on the SCB-68A I mentioned earlier
  6. Ground - I connect the ground to the ground of the BNC jumper mentioned in the VCC connection, it's also shorted to a ground on the SCB-68A
    1. Besides connecting to the many grounds, I've also tried to connect to the special DGS ground, but it didn't change anything.

I can provide pictures but really all I do is turn the SMU on to 3.3V and try to send patterns, I've tried to do the reset command right before as well, with no luck.

 

Best,

Chris

0 Kudos
Message 8 of 8
(1,330 Views)