I2C on Silabs EFR32BG1Bxxx/BGM121

I2C on Silabs EFR32BG1Bxxx/BGM121

Home Forums Real-Time Kernels I2C on Silabs EFR32BG1Bxxx/BGM121

Tagged: , ,

This topic contains 12 replies, has 5 voices, and was last updated by  Ernst-Jan Huijbers 1 year ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #24571

    Ernst-Jan Huijbers
    Participant

    Hi All,
    New to this forum so please bear with me if I post this at the wrong place :-).
    I am building a sensor product based on the above BT module and my preference is to have Micrium as the underlying OS instead of a super loop.
    The code I build reads data from a HAL sensor via I2C and sends it out via BT. In superloop mode, this works perfectly well. When I port this to a Silabs Micrium example (thermometer-rtos), it seems that the I2C does not communicate, and that the BT events are not passed tot the BT Event handler. Any breakpoints I set there are never touched.
    To sort this out, I start upfront.
    Are there any examples of implementing I2C on Micrium, preferably on the above module (alias BGM121), or something similar? I have tried the docs, no info, Google, no info, Silabs docs on Micrium, again, no info.
    Any help appreciated.
    Cheers
    Ernst

    #24575

    Janos Magasrevy
    Keymaster

    Hi Ernst,

    I believe you should post this on https://www.silabs.com/community

    #24625

    Ernst-Jan Huijbers
    Participant

    Hi Janos,

    Would you believe the guys on that forum sent me overhere?
    Well, they did :-).
    Seems this is a niche question.
    Somebody?
    Thanks
    Ernst

    #24626

    Janos Magasrevy
    Keymaster

    Hi Ernst,

    It’s odd that they have sent you back here, this forum is supposed to be for non-silicon labs hardware customers.

    Anyways, I will help you with your inquiry.

    Your best option would be to check the example called “soc-thermometer-rtos” which is part of the Bluetooth SDK. The example comes with Micrium OS, the temperature sensor (I2C), BLE, and the mobile app.

    Is that the same example project you are using as a reference? What is your version of the SDK?

    Also, what is the exact part number that you are using? I know the example “soc-thermometer-rtos” works on both the EFR32BG13 and EFR32MG13.

    Regards,
    Janos

    #24635

    Ernst-Jan Huijbers
    Participant

    Hi Janos,

    Thanks for responding, I really appreciate you picking up on this.
    I do know the example, but unfortunately it is partly a fake example. The temperature is not read from a real (I2C) sensor but just a sample calculated value:
    temperature_counter++;
    if (temperature_counter > 40) {
    temperature_counter = 20;
    }
    which figure is worked over to fit the required GATT format.

    Do you perhaps know other examples that might have more body?

    Cheers
    Ernst

    #24636

    Janos Magasrevy
    Keymaster

    Hi Ernst,

    Apparently what that example does is just simulate data from a sensor and not exercise any type of interrupts that you would use in an RTOS-based application. With that being said, unfortunately, I have to say that we currently don’t have an example that uses I2C (properly) with Micrium OS.

    I have informed our team of this situation so that in the future we can provide more meaningful examples.

    Regards,
    Janos

    #24641

    Ernst-Jan Huijbers
    Participant

    Hi Janos,

    Indeed. Simulate was the word I was looking for.

    Thanks for the support and I hope such an example could be made quickly

    Cheers
    Ernst

    #24695

    Mohamed BOUHLEL
    Participant

    Hi All,

    New to this forum so please bear with me if I post this at the wrong place.
    So,i have got a question about micrium OS.
    can we use I2C with Micrium OS ? (can we communicate a sensor with an MCU that work with micrium OS using the I2C?).

    Regards,
    Mohamed

    #24699

    Ernst-Jan Huijbers
    Participant

    Hi Mohammed,

    It is supposed to work but I was not able yet to get it running.

    Cheers
    Ernst

    #24721

    Mohamed BOUHLEL
    Participant

    Hi Ernst,

    thank’s for your reply.

    Cheers
    Mohamed

    #24860

    Farukh Chaudhry
    Participant

    Hello,

    Have you setup the RTOS correctly? Generate a simple RTOS I2C test program in which aa task reads the I2C received data. Are you using interrupts or polling?

    Regards,

    Farukh

    #25649

    Dell Pater
    Participant

    Hello…i think you need to check the example called soc-thermometer-rtos which is part of the Bluetooth SDK. The example comes with Micrium OS, the temperature sensor, BLE, and the mobile app.
    Is that the same example project you are using as a reference? What is your version of the SDK?

    #25650

    Ernst-Jan Huijbers
    Participant

    As you can read from post Aug 21st in the example you mention there is no I2C implementation, just a simulation of reading a sensor.
    I am still looking for an I2C example under RTOS…anyone?

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.

View the complete site map

x
Loading...