This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LAUNCHXL-CC1352R1: BMI160 sensor

Part Number: LAUNCHXL-CC1352R1
Other Parts Discussed in Thread: CC1352R, , CC3220S

Tool/software: TI C/C++ Compiler

Hi,

I have the next problem/question, I import to CCS Cloud the example of bmi160 located in:

TI Resource Explorer, Software -> SimpleLink SDK Plugins -> SimpleLink Sensor and Actuator Plugin (1.40.00.00) -> Examples -> Development Tools -> CC1352R Launchpad -> SAIL -> i2cbmi160-> TI-RTOS -> CCS Compiler -> i2cbmi160.


I'd like to know how I can toggle a led with a button interrupt (I tried using the example gpioInterrupt from the CC13x2 and CC26x2 SDK 3.20.00.68 but it didn't work)

I don't know why I can't make it with a button interruption, maybe because the "SAIL", but I don't know even what implic "SAIL".

My next step is to reset the sensor with the button interruption. So, if someone could explain to me what implic SAIL in my proyect or how could I create the button interruption to toggle a led or reset the sensor I'll be very thankfull.

  • Hi,

    I sent it to a concerned engineer. We will get back to you ASAP. Please bear with us.

    Thanks,

    PM

  • Hi Juan,

    The SAIL plugin is used with the BOOSTXL-SENSORS BoosterPack. More information on the plugin here. Also see here for the SAIL Plugin Quick Start Guide which provides instructions to help users in the initial setup and demonstration of running their first sample application.

    In the BMI160 datasheet, i see that a reset of the BMI160 is triggered by writing 0XB0 to a register. How do you plan on using a GPIO to do this? 

    Each project's Board.h, CC1352P1_LAUNCHXL.c, and CC1352P2_LAUNCHXL.h are different. These are the configuration code to use TI drivers, such as the GPIO. 

    BR,

    Seong

  • Hi,

    Then, the SAIL plugin is just to show people an example of some sensors of the BOOSTXL-SENSORS BoosterPack?

    I'd like to implement the example of the bmi160 sensor wrote in the SAIL module using the gpioInterrupt (for example) as a template. Is that possible?


    I'm trying to make something like when someone press a button, it resets the sensor. Using the SAIL exapmle, I tried copying the code from gpioInterrupt and changing the callback and writing to the register but I couldn't, I tried to toggle a led but I couldn't neither.

  • Juan,

    The SAIL plugin is the plugin to use with the BOOSTXL-SENSORS BoosterPack. The plugin includes code examples specifically for the CC1352R LaunchPad.

    Again, in the BMI160 datasheet, i see that a reset of the BMI160 is triggered by writing 0XB0 to a register. Is this correct? If so, how do you plan on using a GPIO to do this? 

    When testing the gpiointerrupt example, are you pulling the project from the CC1352R1 folder? 

    BR,

    Seong

  • Hi,

    Yes, I have to write 0xB0.

    The idea is, when you enter the buttoncallback (someone press the button), the buttoncallback write 0xB0 to the register.

    Yeah, I used the gpiointerrupt example from the CC1352R1 SDK.

  • Juan,

    The first step here would be to get the gpiointerrupt example to work on your LAUNCHXL-CC1352R1 development board. What version of the SDK are you working with? 

    From my side, I was able to get the gpiointerrupt example from the SDK version 3.20.00.68 working on a LAUNCHXL-CC1352R1 RevB board.

    BR,

    Seong

  • Hi,

    I get the gpioInterrupt example from the SDK version 3.20.00.68, I can run it without errors, it works.

    My problem comes when I try to copy-paste the code into the SAIL proyect and vice versa.

  • Hi Juan,

    You cannot copy and paste code from one project to another project and expect everything to work. You must do this systematically, one by one, ensuring that every piece of code you add compiles.. This way, you can easily identify any issues.

    The first thing I would do is check if all the necessary TI drivers are configured correctly. Projects must supply the needed TI Driver configuration in these source files -> Board.h, CC1352R1_LAUNCHXL.c, and CC1352R1_LAUNCHXL.h.

    BR,

    Seong

  • Hi,

    Then, I have to copy the conf files from one proyect to another to make sure that I can do it?

  • Juan,

    I am not able to provide further support as you're inquiring about general SW development.

    However, here is a thread that covers how GPIOs can be configured with the SimpleLink CC3220S device using similar source files, Board.h, CC3220S_LAUNCHXL.c, and CC3220S_LAUNCHXL.h. Although this is a different chip, our SimpleLink MCUs share the same TI drivers and the drivers are configured the same way as shown here. Other peripherals besides GPIOs can be configured the same way.

    I will be closing this thread. Please start a new one for any other queries.

    BR,

    Seong