I’m trying to connect LSM6DSR to my PX4, it’s running on fmu-v4, via SPI 4. How can I activate it? My module is based on the lsm303d imu from imu/st folder.
I set the define CONFIG_STM32_SPI4 and I performed debug tests with printf(because it’s not enough memory with debug flag set ) and I found that: the bus is 4, but I got: instantiate failed no device on bus 4 (devid 0x10000001). It is 1 because px4_spi_buses has only one external driver.
in the configuration file(rc.board_sensors) I have: lsm303d -s -b 4 -c 2 -R 6 start and at runtime lsm303d -S -c 2 start . I saw that there is a problem: if I do not set -b4 in the config file, the chip select does not match with the bus. It’ s that true?
Hello sir I have radio link pixhawk , and company say is it available LSM303D compass sensor but QGC also MP not show any compass on my pixhawk , any suggestions , please help me.
…no, it’s not working . The command “nameModule -S start” does not work. I have also an ADIS1647X external on SPI4 and I have the same problem. For what I understood, external means that my sensor is connected from outside the board -PixRacer R15, that means the command for running the module is: adis16475 -S -b 4 -c 1 start, where:
-S -> external device;
-b 4 -> on bus 4(SPI4) or should be -b 1 because on the SPI4 I have only one device connected?
-c 1 -> chip select; in my case devid is 0x10000000; that means, the first CS set in the SPI4 table is the CS located in the first row of the SPI table(see the first comment). It s that true? The module ID 0x00 will be connected to that SPI4, right?
Also, my SPI is configured as SPI 4 at the ESP8266 connector from the board(). Is this module ON when the board is powered or I need to configure it with the GUI menuconfig to deactivate it? I thought that with ADIS module will be more simple to get the data from the sensor but is not so simple because, I think, information is missing and I need to clarify it in order to understand what’s going on in the code. Thanks
.1.I m not sure how to disconnect the ESP8266, only the SYS_AUTOSTART says to me if the ESP is ON or OFF. When I run the command ps in the terminal, is not there. , when I check in the ls /dev ttyS0 is there. It should not be there after config. But SYS_AUTOSTART, in my case in 4250, I saw in the rc. board_mavlink.
2.Yes, I have the latest master.
3.Yes, the Cs is (on PBA , pin 8,) good but ADIS has DRDY PB, pin 4; this is the INT. Only this DRDY I set in the table
One question: how SPI4 know to communicate with ADIS16477/75 if it has another ID as an module? this 0x00 is calculated based on ADIS16477 ID, right? I saw something in the code and for the internal, this iD is the module sensor ID;
Another question: what about the voltage, should be on before or after I configure the sensor. I saw in another board spi config, fmu-v5, this comment:
‘’// initSPIBus(SPI: :SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
…good news I managed to connect my sensor ADIS16475 to my Pixracer and to get data . Over all, this project is very smart implemented with one exception, in my opinion , regarding the switch between the SPI4(external) and ESP8266: why Beat Kung used, in this logic implementation (of switching between SPI&ESP), the GPIO_8266_GPIO2 pin? In my oppinion, this is not healthy to use a GPIO to choose between the settings of the two devices. What was the logic here with this GPIO? Why this implementation based on GPIO_8266_GPIO2? !!!My problem was this GPIO . I used this GPIO as an INT for my sensor!!! Also, there is no documentation regarding this. Thanks