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.

CC2340R5: Checking the standby mode

Part Number: CC2340R5
Other Parts Discussed in Thread: , LP-XDS110, ENERGYTRACE, UNIFLASH

Conditions
Board : CC2340R5 LaunchPad (LP-EM-CC2340R5 Rev.E3)
Debugger : LP-XDS110 (This can not use EnergyTrace)
SDK : SimpleLink Low Power F3 SDK 7.40.00.64
Kernel : FreeRTOS
Compiler : CCS - TI Arm Clang Compiler
Project : empty (Nothing changed)

Steps I have tried
1) Open file PowerCC23X0_freertos.c
2) Set breakpoint after "if (standbyAllowed)"
3) Push Debug button
4) Push Resume button

Result
It didn't stop at the breakpoint.
If set a breakpoint after "else if (idleAllowed)", it will stop there.

Question
Are the breakpoint locations ok?
How do I change the empty project code to go into standby mode?

  • Hi,

    The empty project is configured to enter standby.

    Standby cannot be entered if the device is in debug mode. To ensure debug more is exited, power cycle the device after flashing it.

    I hope this will help,

    Best regards,

  • Thank you for your reply.

    1) I changed the code as below to check the behavior.

    #include <ti/drivers/Power.h>
    Power_NotifyObj powerNotifyObject;
    static uint8_t PowerNotifyFunction(uint8_t eventType, uint32_t *eventArg, uint32_t *clientArg)
    {
      if (eventType == PowerLPF3_ENTERING_STANDBY)
      {
        GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_OFF);
      }
      else if (eventType == PowerLPF3_AWAKE_STANDBY)
      {
        GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_ON);
      }

      return Power_NOTIFYDONE;
    }

    void *mainThread(void *arg0)
    {
      uint32_t time = 1;
      GPIO_init();
      GPIO_setConfig(CONFIG_GPIO_LED_0, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
      GPIO_write(CONFIG_GPIO_LED_0, CONFIG_GPIO_LED_ON);
      Power_registerNotify(&powerNotifyObject, PowerLPF3_ENTERING_STANDBY | PowerLPF3_AWAKE_STANDBY, (Power_NotifyFxn)PowerNotifyFunction, 0);
      while (1)
      {
        sleep(time);
      }
    }


    2) After writing to the flash, I unplugged and plugged in the USB cable.
    3) I checked the GPIO pin with an oscilloscope, but it didn't change.
    What could be wrong?

    Best regards,

  • Hello Manabu Hashimoto,

    I hope you are doing well! I opened up an empty example project (7.40 SDK, as FREERTOS) and imported the code you provided above, and I do see the led blinking (indicating that the Power_registerNotify is indeed going off, I also confirmed this in debugging). 

    Could you try re-flashing the board, or trying another CC2340R5? 

    -I can also provide the .out file of the project on my side if you perfer.

    Thanks,
    Alex F

  • Thank you for your reply.

    I tried it with another CC2340R5 and it didn't work.
    Even writing with UNIFLASH didn't work.
    Even creating a new empty project didn't work.

    I'm sorry, but could I have the .out file?

    Best regards,

  • Hello Manabu Hashimoto,

    Here is my .out file. 

    empty_LP_EM_CC2340R5_freertos_ticlang.out

    Please see if you are able to flash and confirm the LED blinks! 

    Also the version of my CC2340R5 is "REV: A". 

    -Were both of the CC2340R5s you tested REV E3s? 

    Thanks,
    Alex F

  • Thank you for the .out file.

    But unfortunately the LED didn't blink.
    GPIO pin is always high.
    Just to be sure, I disconnected the LP-XDS110 and LP-EM-CC2340R5 and supplied 3V from the outside, but it didn't work.

    >Were both of the CC2340R5s you tested REV E3s?
    Yes. Both are Rev:E3.
    Is Rev:E3 older than Rev:A?
    Is it possible that it won't go into standby because it's old?

    Best regards,

      

  • Hello Manabu Hashimoto,

    Before we continue can we do a quick test? Open up SmartRF Studio 8 and open a CC2340R5 workspace and see if your board is detected; if your board is not detected then that would confirm its a PG1 board which is no longer supported. 

    -I just tested a Rev E1 board which is PG1 and is not detected by SmartRF Studio 8.

    -The PG1 boards will not "act" correctly when programmed with software meant for PG2. 

    You will likely need to purchase new CC2340R5 launchpads to resolve this issue. 

    Is Rev:E3 older than Rev:A?
    Is it possible that it won't go into standby because it's old?

    -Yes Rev: E3 is older than Rev: A

    -If the E3 device is PG1 then yes code meant for PG2 will not work on PG1 as PG1 is no longer supported. 

    Thanks,
    Alex F

  • Thank you for your reply.

    I don't know how to use SmartRF Studio, so please let me confirm.

    > Open up SmartRF Studio 8
    The following window was displayed.

    > open a CC2340R5 workspace
    There was no SmartRF Studio workspace file (*.srfswksp) in the existing Code Composer Studio Workspace folder.

    1) When I double-clicked "CC2340R5" in "DEVICE SELECTION", the following window was displayed.

    2) I pressed the refresh button to the right of "RF TEST #1".

    3) Nothing appeared in the "Target:" list.

    Does this mean it won't detect the board?

    Best regards,

  • Hello Manabu Hashimoto,

    Sorry for not clarifying the steps! Your point 3) was what I was trying to confirm in the previous reply, since SmartRF Studio 8 cannot detect (<NONE AVAILABLE) this means the device(s) you have are PG1, and are no longer supported software wise. 

    -We noticed that code meant for the newer devices (PG2) does not work well with the non-supported (PG1) devices, or at all. 

    The next steps should be acquiring a supported CC2340R5 LaunchPad, and re-doing the standby test. 

    Thanks,
    Alex F