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.

RTOS/LAUNCHXL-CC2640R2: How to use ADC Driver in this Simple_peripheral example?

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640, CC2640R2F

Tool/software: TI-RTOS

Hello!

I'm studying CC2640R2.

I want to use Bluetooth BLE and operate ADC and I2C.

The example is used as simple_peripheral.

How do I use the ADC and I2C drivers in this example?

I think I can add ADC and I2C tasks but, I don't know how to try it.

I've tried other ADC examples but I did not have a BLE stack.T.T

What do I need to do with I2C communication with the ADC?

Thanks!

  • Thanks! It was helpful.
    But, I want to do is the ADC and I2C are constantly processing.

    For example, the ADC must operate continuously with 5 channels and 15 channels of I / O (High & Low).
    Performs the arithmetic process after the ADC.
    When I request data on my smartphone, I only get the calculated values.

    It is possible to receive data.

    I do not know how to continuously communicate with ADC and I2C in main().
    I tried to use the sensor controller, but I can not get enough I / O support.

    Do you have a guide for this?
    I tried the method you gave me.

    Please answer about my question. :3
    Thanks.
  • 1. About "the ADC must operate continuously with 5 channels and 15 channels of I / O (High & Low).Performs the arithmetic process after the ADC" and doing BLE at the same time, I think CC2640R2 might not be powerful enough to do so.
    2. ADC and I2C are two different peripherals. What do you mean you need to do with I2C communication with the ADC?
  • Thanks for your answer.

    In case of ADC, it is to see the analog value of the pressure sensor with 5x15 Matrix.

    and In the case of I2C, this is the communication between the CC2640 and the gyro acceleration sensor to be connected.

    In other words, you must collect 5x15 sensing data from the ADC and I2C communication with the gyro acceleration sensor.

    The ADC senses 75 sensors once every 50 ~100 ms.
    In this case, is it impossible with RTOS structure?

    Originally, I was using an external MCU separately.

    However, I thought that the internal structure of CC2640 was confirmed and powerful operation was possible.

    Therefore, we are trying to eliminate the external MCU and use only CC2640 to unify the sensing operation.

    If the BLE stack works on the CC2640, is it difficult to perform these functions?

    I think it will be possible because it is not the purpose of real-time sensing.

    If I can only have a sensing period of 50 ~ 100ms.

    If I add Task of TI-RTOS, can I know the repetition cycle for each task?

    Thank you in advance.
  • It's difficult to judge if CC2640R2F is powerful enough but I think it's critical. You have to test to know.
  • Thank you for answer.