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.

UART issue using POWER_SAVING mode on BLE projects (CC26XX)

Other Parts Discussed in Thread: CC2650

Hello,

I have an issue whilst I am attempting to implement UART interface within Texas Instruments SimpleLink™

Bluetooth® low energy CC2640 wireless MCU software development kit (ver. ble_cc26xx_2_01_00_44423)

over TI RTOS (ver. 2_13_00_06) with CCS IDE  Version: 6.1.0.00104.

The issue is related to the POWER_SAVING mode. Currently I am able to work friendly without this option.

It means that I cannot work in power saving energy mode whilst the device is waiting UART interrupts.

Currently I am using the TL module that is based on NPI protocol. Whilst it works friendly without POWER_SAVING

option it does not work as expected in low energy mode. From my last test it starting exchanging few bytes and then

cannot receive data from remote host (e.g. PC).

The original TL TI source code gives issue with the POWER_SAVING option. So, whilst I need to use a custom

handshaking I realized that the TL module use the saving mode to handle MRDY and SRDY for handshaking purpose

as explained in Adding Serial Communication to a BLE Project. Then I changed the POWER_SAVING option to

POWER_SAVING_UART just to do not use the handshaking functionality. So, after this change now in saving mode

(i.e. using POWER_SAVING predefined flag) I can receive bytes through the UART without activate any SRDY/MRDY control

BUT whilst I transmit first byte to the host then after I cannot receive anymore data from there.

This behaviour looks like original issue in different way. No solution?


How to work with the UART including POWER_SAVING mode? This is equivalent to say, could I work with BLE project

in low power mode without using:

    Power_setConstraint(Power_SB_DISALLOW);
    Power_setConstraint(Power_IDLE_PD_DISALLOW);

Whilst I gave a look through E2E forum I found that this issue is reported many times

from users.

Here two TI projects available on wiki that confirm the issue:

1) CC2640 NPI UART ECHO EXAMPLE

"Also make sure POWER_SAVINGS is disabled in preprocessor to communicate with the PC terminal."

It means that NPI do not works in low power mode?

2) CC2640 UART to BLE Bridge

I gave a look to this TI proposal. So, I downloaded the source code (Software patch: http://www.ti.com/lit/zip/tidcac1) and

imported in CCS. I checked the POWER_SAVING as expected in the project properties and I found only the option "xPOWER_SAVING".

This means that this proposal has the same issue in low power mode. The xPOWER_SAVING predefined option is there only to skip the

UART issue in POWER SAVING mode?

 

Welcome any TI proposal.


Thanks


Alex

 

 

  • If you define POWER_SAVING and you are using UART, then you need to use the MRDY / SRDY handshaking.

    The projects you mention that don't define POWER_SAVING do this because the other side (i.e. PC terminal) is not capable of using MRDY / SRDY.

  • Thanks for your fast reply.

    As I described I changed the flag POWER_SAVING to "POWER_SAVING_UART" just to skip the MRDY/SRDY management.

    I am managing CTS/RTS from PC and I almost reached this target but as explained there are still issues.

    So, the question now is if I can use UART in POWER_SAVING mode or I cannot definitively as it appears from other TI projects?

    Thanks

    Alex
  • You can use it in POWER_SAVING but not without the MRDY / SRDY lines. So if you removed this functionality by changing the surrounding defines to POWER_SAVING_UART, it won't work.
  • I already trid to use the MRDY/SRDY handshaking in POWER_SAVING mode with issues. So, whilst I need to use a different handshaking
    which is the TI proposal?

    Is this the only TI project available to work in POWER_SAVING mode?

    Welcome any TI advice.

    Thanks

    Alex
  • All projects work with POWER_SAVING. This project requires additional functionality (MRDY/SRDY) when POWER_SAVINGS is defined.

    My suggestion is to use MRDY / SRDY and to fix the issues you were seeing. You're likely just not performing handshaking correctly.
  • Thanks for your fast reply.

    Could you provide a TI BLE project that works with the UART in low power mode?

    Currently the requirement of the project need different handshaking. So, I have to
    manage TWO handhsaking?

    Is there any other solution? What about the issue that I found whilst I disabled the
    MRDY/SRDY handshaking?

    Thanks

    Alex
  • Take a look at simpleBLEPeripheral included with the installer.

    I'm not sure what you mean by different handshaking. The MRDY / SRDY handshaking is defined here: processors.wiki.ti.com/.../NPI
    If you want to use the driver with POWER_SAVINGS, you need to follow this.

    Is the issue that UART doesn't work when you enable POWER_SAVINGS but disable MRDY / SRDY? I wouldn't expect this to work. How would you wake up the chip then?
  • Hello Tim,


    I am using an handshaking that enable the slave to send data to the master.

    Anyway I am attempting to use another interrupt to wake-up the CC2650

    and enable it to work with the UART.

    So, the device start in POWER_SAVING and I am testing switching between

    set and release power manager through another external line:

    1) /* Set constraints for Standby, powerdown and idle mode */
        Power_setConstraint(Power_SB_DISALLOW);
        Power_setConstraint(Power_IDLE_PD_DISALLOW);

    2)  /* Release constraints for Standby and idle mode */
        Power_releaseConstraint(Power_SB_DISALLOW);
        Power_releaseConstraint(Power_IDLE_PD_DISALLOW);


    It works only one time. After I release the power constraints the

    UART do not exchange data.

    P.S. I am implmenting a BLE project based on simpleBLECentral and I would like to use the UART driver in power saving mode.

    Welcome your advices.

    Thanks

    Alex

  • See here for an example using software handshaking: processors.wiki.ti.com/.../NPI_Two_Wire_UART_with_PM
  • Hi Tim,

    thanks for your fast reply.

    I will see how works the NPI Two Wire UART with PM.

    I have an external line control to wake-up the CC2650. So, I need only to manage properly
    switching between standby and active status.

    Alex
  • Hi Alex,

    I'd like to add a word of warning here:
    "So, the device start in POWER_SAVING and I am testing switching between

    set and release power manager through another external line:

    1) /* Set constraints for Standby, powerdown and idle mode */
    Power_setConstraint(Power_SB_DISALLOW);
    Power_setConstraint(Power_IDLE_PD_DISALLOW);

    2) /* Release constraints for Standby and idle mode */
    Power_releaseConstraint(Power_SB_DISALLOW);
    Power_releaseConstraint(Power_IDLE_PD_DISALLOW);
    "

    The power saving define in the application affects many things. This is a compile time option and if you have compiled with power saving then you should never try to configure it dynamically. This is not tested.
  • Hello Sean,

    Thanks for your consideration about TI power saving management. 

    I do not understand your thought about dynamic use of the power saving management. You say:

    The power saving define in the application affects many things. This is a compile time option and if you have compiled with power saving then you should never try to configure it dynamically. This is not tested.


    I tried to configure dynamically the power saving constraints (using the POWER_SAVING option at compile time) because I saw the same

    approach within the Transportation Layer driver. Please give a look into the TL driver component "sdi_tl.c" where are implemented two functions

    that set and release the power saving constraints: SDITL_setPM() and SDITL_relPM(). These two functions are essentially macro for

    Power_setConstraint() and Power_releaseConstraint()..

    So, the TL driver already use dynamically the power saving management without issue. Is it correct?

    So, which is the best way to manage the TI power saving constraints?

    Please let me know about it.

    Thanks

    Alex

  • Alex,

    I am aware that the TL layer makes power savings calls. It is designed to do so. This is why I was recommending that you avoid modifying/ adding your power power savings calls as they may interfere with the design of the TL.
  • Hello Sean,


    asap I will see in detail how to use software handshaking: processors.wiki.ti.com/.../NPI_Two_Wire_UART_with_PM as Tim

    already proposed.

    Currently I am using temporary the TL module without POWER_SAVING stuff and in the last days I tried to remove

    the SRDY/MRDY management to do my own power management as discussed.

    So, I will see if the software handshaking fix the issue on my project...

    Welcome TI advices.

    Thanks

    Alex