Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL Flight
  4. How to enable BLSP9 for SPI usage over J7?

How to enable BLSP9 for SPI usage over J7?

Scheduled Pinned Locked Moved VOXL Flight
3 Posts 2 Posters 492 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jrestifo
    wrote on last edited by
    #1

    I have modified apq8096-imu-server to add another IMU, which is going to be connected to J7, using SPI (BLSP9). However, when I try and talk to this device in my code, I can see on my scope no activity. Is there something additional I need to do?
    I've modified:
    common/voxl_imu_server.h - updated N_IMUS, added my IMU as IMU4
    server/src/imu_interface.c - Added my IMU to imu_ic_t , added it to switch statements, etc
    server/src/config_file.c - added IMU4 config entries

    And of course implemented my code as per the existing IMUs. I am passing it as bus 9, as I believe this is supposed to map to BLSP9. But I cannot see anything being clocked, chip selects changing, etc...

    1 Reply Last reply
    0
    • Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #2

      Hello @jrestifo,

      apq8096-imu-server (formerly voxl-imu-server) already had support for SPI imu on J7 (SPI9). That is IMU2 (where IMU0 and IMU1 are IMUs on VOXL itself). I plugged in MPU9250 into J7 via SPI, see below output:

      / # voxl-imu-server -b -i 2
      enabling basic read instead of FIFO
      Forcing imu2 on
      loading calibration file
      ...
      ...
      =================================================================
      loading config file
      =================================================================
      imu0_enable:                     1
      imu0_bus:                        10
      imu0_sample_rate_hz:             1000.0
      imu0_lp_cutoff_freq_hz:          92.0
      imu0_rotate_common_frame         1
      imu0_read_every_n_samples:       10
      
      imu1_enable:                     1
      imu1_bus:                        1
      imu1_sample_rate_hz:             1000.0
      imu1_lp_cutoff_freq_hz:          92.0
      imu1_rotate_common_frame         1
      imu1_read_every_n_samples:       10
      
      aux_imu2_enable:                 0
      aux_imu2_spi_bus:                9
      aux_imu2_sample_rate_hz:         1000.0
      aux_imu2_lp_cutoff_freq_hz:      92.0
      aux_imu2_read_every_n_samples:   10
      
      aux_imu2_enable:                 0
      aux_imu2_spi_bus:                11
      aux_imu2_sample_rate_hz:         1000.0
      aux_imu2_lp_cutoff_freq_hz:      92.0
      aux_imu2_read_every_n_samples:   10
      =================================================================
      Initializing IMU0
      detected ICM42688 on spi bus[id] 10
      using ODR=1000.00hz which is the nearest the icm42688 can get to 1000.0
      Initializing IMU1
      detected ICM20948 on spi bus[id] 1
      using ODR=1125.00hz which is the nearest the icm20948 can get to 1000.0
      Initializing IMU2
      detected MPU9250 on spi bus[id] 9
      using ODR=1000.00hz which is the nearest the mpu9250 can get to 1000.0
      

      By the way, it looks like aux_imu2_* is mentioned twice in the config file printout, it is a bug..

      to print out raw imu data...

      voxl-imu-server -b -i 2 -p | grep imu2
      

      Please try it out..

      J 1 Reply Last reply
      0
      • Alex KushleyevA Alex Kushleyev

        Hello @jrestifo,

        apq8096-imu-server (formerly voxl-imu-server) already had support for SPI imu on J7 (SPI9). That is IMU2 (where IMU0 and IMU1 are IMUs on VOXL itself). I plugged in MPU9250 into J7 via SPI, see below output:

        / # voxl-imu-server -b -i 2
        enabling basic read instead of FIFO
        Forcing imu2 on
        loading calibration file
        ...
        ...
        =================================================================
        loading config file
        =================================================================
        imu0_enable:                     1
        imu0_bus:                        10
        imu0_sample_rate_hz:             1000.0
        imu0_lp_cutoff_freq_hz:          92.0
        imu0_rotate_common_frame         1
        imu0_read_every_n_samples:       10
        
        imu1_enable:                     1
        imu1_bus:                        1
        imu1_sample_rate_hz:             1000.0
        imu1_lp_cutoff_freq_hz:          92.0
        imu1_rotate_common_frame         1
        imu1_read_every_n_samples:       10
        
        aux_imu2_enable:                 0
        aux_imu2_spi_bus:                9
        aux_imu2_sample_rate_hz:         1000.0
        aux_imu2_lp_cutoff_freq_hz:      92.0
        aux_imu2_read_every_n_samples:   10
        
        aux_imu2_enable:                 0
        aux_imu2_spi_bus:                11
        aux_imu2_sample_rate_hz:         1000.0
        aux_imu2_lp_cutoff_freq_hz:      92.0
        aux_imu2_read_every_n_samples:   10
        =================================================================
        Initializing IMU0
        detected ICM42688 on spi bus[id] 10
        using ODR=1000.00hz which is the nearest the icm42688 can get to 1000.0
        Initializing IMU1
        detected ICM20948 on spi bus[id] 1
        using ODR=1125.00hz which is the nearest the icm20948 can get to 1000.0
        Initializing IMU2
        detected MPU9250 on spi bus[id] 9
        using ODR=1000.00hz which is the nearest the mpu9250 can get to 1000.0
        

        By the way, it looks like aux_imu2_* is mentioned twice in the config file printout, it is a bug..

        to print out raw imu data...

        voxl-imu-server -b -i 2 -p | grep imu2
        

        Please try it out..

        J Offline
        J Offline
        jrestifo
        wrote on last edited by jrestifo
        #3

        @Alex-Kushleyev

        So I have a BMI088 plugged in there, so I was adding IMU4 to not lose support for MPU as well. However, I did as you suggest as a sanity check, and yes I can see it trying to clock. I must have a problem somewhere else, thank you this was very helpful.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        ModalAI
        Categories Recent Tags ModalAI.com Docs
        © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups