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.

CCS/CC2652RB: GPIO Access / Configuration using Code Composer Studio

Part Number: CC2652RB
Other Parts Discussed in Thread: CC2652R

Tool/software: Code Composer Studio

Hi,

I want to write my application specific code for reading sensor data via SPI/I2C in CC2652R Board fa cing issue in the same:

1> Shall I use the base codes provide in the SDK by importing CCS Project ?

2> How about Writing C/C++ code . in this case will I be able to include the header files provided in the sdk.

3> Is it a good Idea to develop everything from scratch ?

Thanks!

  • Hi Pawnesh, 

    Assigning an expert to follow-up on your questions. 

    Thanks, 
    Elin

  • Hi Pawnesh,

    1) It is recommended to use the drivers provided by TI for interfacing with the peripherals on the device.

    2) It is expected that you at least write in C, C++ could be used to some extent but I would recommend C unless you need to do C++. All source, including headers, that is used by TI in the examples is part of the SDK.

    3) Typically, no. Unless there is really good reason to do it yourself, you should really use what is provided to you for free in the SDK. These drivers etc. is well tested and widely used. They are also actively maintained by TI so that you can expect bug fixes when needed. They also ensure that you interface with the peripherals in a way that ensures the lowest power consumption (among other things).

  • Hi M-W,

    Thanks for your kind response to my previous querries.

    Following the same I have come acrossed few more query.

    1. As the SDK ( CC2652R1) provide API based code , Do we need to flash whole code after making customized changes in the code as per the application, Objective is to reduce the code size 

    2.I am facing issues withe data types and code structure. Please suggest any reading module to get better understanding of the code. Document provided in the code are helpful to get their use case.

    3. Do the SDK source code is MISRA compliant as, my application  is for automotive.

    Any help on the code naming convention of data types and variable part will be a great help .

    Thanks

    Pawnesh 

  • Hi Pawnesh,

    1) Normally yes, Any change could result in the compiler/linker re-arranging bigger parts of the application. I do not see how this related to your objective of reducing code size, at some point the complete application need to be put into flash no matter how small change you do?

    2) Could you elaborate on exactly what your issues/concerns is here? Most of the TI code uses "normal" C data types (such as those found in stdint.h and stdbool.h) where possible. You are free to follow which ever coding convention you feel suit your project, you do not need to follow the SDK style.

    3) The SDK as such is not MISRA complaint while we do our best to write safe code. 

    Best regards,

    Max