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-CC26X2R1: Need to move the Power Manager Initialization from the Simple Peripheral Project to the BIM project

Part Number: LAUNCHXL-CC26X2R1

Tool/software: TI C/C++ Compiler

Hi,

I have LAUNCHXL-CC26X2R1 boards with CCS v9.1.0 and I am using the simplelink_cc13x2_26x2_sdk_3_10_01_11 SDK for project.

I am working on the Simple Peripheral application and have modified the project so it can supports the BIM. Right Now, I need Power Manager Initialization (Power_init()) in the BIM, not in the Simple Peripheral application. So, I have added required files( Board.h; CC26X2R1_LAUNCHXL_fxns.c; CC26X2R1_LAUNCHXL.c; CC26X2R1_LAUNCHXL.h) in the BIM project to support the Power Manager Initialization.

Power Manager API uses TI RTOS in the Simple Peripheral project but we do not want to add TI RTOS in the BIM and it is also not recommended. So, to resolve the
Power Manager symbols at linking time I have used the noRTOS file( kernel/nortos/llib/nortos_cc26x2.aem4f). But after adding those file it is exceeding the BIM code size, as shown below following error is generated:

So, Is there any other way that I can add Power Manager Initialization in the BIM project ?

Or this the only method, In which I have to increase the BIM size so it can support Power Manager.

Let me know what you think, how can I achieve the Power Manager Initialization in the BIM project. 

Regards,

Shiv

  • Hi Shiv,

    May I ask why you wish to put the power manager initialization inside of the BIM? Are you planning on using it in your application, or only in the BIM? Alternatively, would any of the power management or system control API's in DriverLib work for your application?

    If you still need to add power management initialization in the BIM, then I think the only way you can make it fit is by increasing the BIM size. Note that you may need to also adjust the linker file in the simple_peripheral application to account for the larger BIM size, and possibly adjust the address where NV storage is located as well. 

    Regards,
    Michael

  • Hi Michael,

    Thanks for the reply.

    "May I ask why you wish to put the power manager initialization inside of the BIM? "

    I need to turn off RCOSC_LF clock, calibrates the XOSC_LF clock and this needs to be done in the BIM for us. As to turn off RCOSC_LF clock in the BIM, I have to put the power manager initialization inside of the BIM. And then calibrates the XOSC_LF clock.

    "Are you planning on using it in your application, or only in the BIM?"

    Only the power manager initialization part, I need that to be in the BIM as explained above. After that I am going to use power manager in my application.

    There are still few doubts I have.

    • Right now, As suggested I have tried to increase the BIM size so that it can fit the program. I have observed from .map file, the code size is increased drastically. Earlier without those added files code size was 710 but now after adding the noRTOS file( kernel/nortos/llib/nortos_cc26x2.aem4f) at the linking time to resolve the Power Manager related symbols code size reaches to 8396( as shown below).  As explained above, I only need to turn off RCOSC_LF clock, so I have only enable the Power_inti() in the Board_init of the BIM. But then also code size reaches to the 8396. Can you suggest any way, in which this code size can be reduced? As I only required the Power Manager initialization in the BIM.

    • In the Simple Peripheral project, Power Manager uses the TI RTOS, but for BIM I have used noRTOS to initialize the Power Manager or to configure Power Manager. After initialization in the BIM as I am using the Power Manager in the Application project, Is that going to create conflicts?

    Let me know what you think or required any more details.

    Regards,

    Shiv

     

  • Hi,

    Gentle Reminder.

    Let me know what you think about the queries I mention.

    Regards,

    Shiv

  • Hi Shiv,

    I did a bit of investigation, and I believe this will help save some flash space:

    1. I believe by default BIM optimizations are at max, but I suggest confirming that optimizations are at level 4, and the speed vs size trade off is set to 0 (size)
    2. Remove the linked library to drivers_cc26x2.aem4f. You can find the list of linked libraries from Project properties -> Build -> ARM Linker -> File Search Path
    3. Add copies of the files PowerCC26X2.c, PowerCC26X2.h, and PowerCC26X2_calibrateRCOSC.c to your project. The files are located at "<SDK_DIR>\source\ti\drivers\power"

    Doing this will allow the compiler to better optimize the BIM project. Your results may vary, but you might be able to save a few hundred bytes, which may be just enough to fit everything in one flash page (8192 bytes). From the test project I did this on, it saved close to 350 bytes.

    In regards to your second question, I don't believe you will run into conflicts. The application might try to re-initialize the power manager in the TI-RTOS context, but I don't believe it should cause issues if you reconfigure it accordingly.

    Regards,
    Michael