Spi sensor connect problem

Firmware/software/electronics/mechanics
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Spi sensor connect problem

Post by tobias »

Could there be a possible connection problem? We recently tried flow v2, loco deck and multi-ranger with master branch FW and it worked fine so my bet is connection problem. Check this thread with similar problem. This might help how to fix it.
SH_Lee
Member
Posts: 51
Joined: Tue Feb 18, 2020 8:48 am

Re: Spi sensor connect problem

Post by SH_Lee »

In fact, we are already soldering and using it.
Lps soldering directly, and flow deck connected by wire and soldering.
I soldering uwb first to check the connection and performance, and connected the flow deck.
As a result, you can see that the well-connected uwb is not connected well and the flow deck is connected well.
That's why I think it's an internal problem, not a connection problem.
According to my research, the length of the wire in the spi communication affects communication.
This seems to cause an additional delay in communication.
I think we need to adjust the signal and response time for both sensors in spi communication.
Can you figure out the solution for this part?

I will show you the picture I connected and the output of the console again.
Based on the results of sequential connections and consoles, I'm sure it's not a connection issue.
Firmware is the latest firmware that was re-downloaded a week ago.

Code: Select all

SYS: ----------------------------
SYS: Crazyflie Bolt is up and running!
SYS: Build 41:9be95bc71756 (2020.09 +41) MODIFIED
SYS: I am 0x20373347344D500E001D0027 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 2 deck(s) found
DECK_CORE: Calling INIT on driver bcFlow2 for deck 0
ZR2: Z-down sensor [OK]
PMW: Motion chip id: 0x49:0xB6
DECK_CORE: Calling INIT on driver bcDWM1000 for deck 1
dwGEtDeviceID(dev) = 3729326409
0xdeca0130 = 3737780528
DWM: Failed to configure DW1000!
IMU: BMI088 Gyro SPI connection [OK].
IMU: BMI088 Accel SPI connection [OK]
IMU: BMP388 I2C connection [OK]
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushless motor driver
EEPROM: I2C connection [OK].
IMU: BMI088 gyro self-test [OK]
DECK_CORE: Deck 0 test [OK].
DWM: Error while initializing DWM1000
DECK_CORE: Deck 1 test [FAIL].
Attachments
d.JPG
SH_Lee
Member
Posts: 51
Joined: Tue Feb 18, 2020 8:48 am

Re: Spi sensor connect problem

Post by SH_Lee »

When pin IO_2 was removed, the other modules operated normally.
I'm currently working on three drones, all three of which were removed from pin IO_2, and the problem was solved.
We suspected damage to the sensor, but the same problem occurred when we connected the new sensor and solved it the same way.
Do you happen to know what the removal of pin IO_2 means?
Personally, I think it doesn't affect DECKS, but I don't think it does.
If you connect directly to the board, there was no problem with pin IO_2, but it seems to be a problem when connecting FLOW_DECK by wire.
I received a very stable and reliable value in the subsequent performance test.
Do you have any information related to this?
This is the sensor we used. The part that is not connected by a wire means that it is not connected to the board.
dddd.JPG
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Spi sensor connect problem

Post by tobias »

Strange...IO2 is not used on any of the Flow v2, Loco nor Multiranger decks. Possibly it adds capacitance or similar.

The length of the wires can definitely have an effect as the SPI communication is quite fast. I think 21Mhz for Loco and 2 Mhz for Flow. You could try and slow down the SPI communication speed. Flow in pmw3901.c and Loco in locodeck.c. Slowing it down to much might create other problems though but it is worth a try.
SH_Lee
Member
Posts: 51
Joined: Tue Feb 18, 2020 8:48 am

Re: Spi sensor connect problem

Post by SH_Lee »

.
Last edited by SH_Lee on Mon Oct 26, 2020 5:04 pm, edited 1 time in total.
SH_Lee
Member
Posts: 51
Joined: Tue Feb 18, 2020 8:48 am

Re: Spi sensor connect problem

Post by SH_Lee »

.
Last edited by SH_Lee on Mon Oct 26, 2020 5:04 pm, edited 1 time in total.
SH_Lee
Member
Posts: 51
Joined: Tue Feb 18, 2020 8:48 am

Re: Spi sensor connect problem

Post by SH_Lee »

Recognizing performance anomalies based on the length of the line, we have examined the values through various experiments, but there is no problem, so we don't need to change the code further.
And all problems were solved when pin io_2 was removed, and now both decks of lps and flow_deck are functioning normally.
My problem is solved now, but my question is the effect of io_2 pin.

Is it possible that pin io_2 on both decks is set to a pin with a different purpose?
If so, I think that the removal of the io_2 pin may be effective or applicable for the problems that have occurred if the flow_deck and other spi sensors that have been raised previously are combined.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Spi sensor connect problem

Post by tobias »

The IO2 has an optional function to where you can move the IRQ on the Loco deck and the RESET, MOTION, GPIO on Flow v2 deck. This requires to close the solder bridges which I guess you haven't done?
SH_Lee
Member
Posts: 51
Joined: Tue Feb 18, 2020 8:48 am

Re: Spi sensor connect problem

Post by SH_Lee »

We've never used the pin before, but we don't have to connect to do what we want to do now.
At first, we were not aware of the unused pins, but now we suspect that there is a code for the pins to operate according to the length of the spi communication line.
At first, we didn't recognize the unused pins, but now we think there might be a code on the pin that operates the output if there is a time delay along the length of the spi communication line.
Or, I think there may be a signal on the board that outputs to the io_2 pin.
We are investigating the part related to the output of the io_2 pin output.
Post Reply