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.

CC2640R2F: 32KHz Crystal Stops Oscillating When Power_Saving Predefined Symbol Is Set

Part Number: CC2640R2F

Tool/software:

Hi, 

I am working on a custom board that uses CC2640r2f  YFV DSBGA Package. Everything is working fine with Power_Saving predefined symbol is not set. Once I set the Power_Saving symbol. The 32KHz crystal stop oscillating and the program stops after powering up by a very short time ( almost immediatly ). 

In the attachments you can find the workspace. 

Thank you in advance!

Kind Regards

customboardadvtest10.zip

  • Hello Uthman,

    Based on the attachment it looks like you've tried using the RCOSC as well. Is that succesful?

    How have you determined that the 32KHz crystal started? Is AON_SYSCTL:RESETCTL.CLK_LOSS_EN set?

    It may be a hardware issue with your design for the 32KHz crystal, you can submit for a design review at https://www.ti.com/tool/SIMPLELINK-2-4GHZ-DESIGN-REVIEWS . Please make sure to reference this E2E thread in your request.

    Best Regards,

    Jake

  • Hello Jake, 

    Thank you for your quick answer. 

    unfortunately, RCOSC also didnt work when power_saving is set. 

    No, I used high end techtroniks probe to my oscilloscope. Here is the deal. first I did all the measurements on a launchpad first to have like a reference to compare to. then i moved to my custom board. I got the same waves from both launchpad and custom board in no power_saving mode. When i set the power_saving, launchpad is working fine but not the custom board. 

    if its a hardware problem, why it is working fine with not power_saving set ?

    Here is a video of measuring the 32KHz while power saving on the custom board. in the video i reset the board three times so you will see the starting three times CustomBoard_32KHz.rar

  • Hi Uthman,

    I suspected a hardware issue since if the 32kHz clock isn't available when going to standby I would expect to see a failure. Since the issue is still observed when using the internal RCOSC then perhaps there could be a software related issue?

    In your testing, is it the same software running on the LaunchPad as well as your custom board? Have you submitted for a hardware design review?

    BR,

    Jake

  • Hi Uthman,

    Can you please confirm that you've followed all Custom Hardware instructions for the BLE project of your board design?

    Regards,
    Ryan

  • Hi again Jake, 

    e. Since the issue is still observed when using the internal RCOSC then perhaps there could be a software related issue?

    Yes, the software running on the LaunchPad is the same as the one running on the custom board except the board files since there is not board files for this package (CC2640r2f  YFV DSBGA) provided by TI.

    How can I make sure that the issue is not software related? Is there any way to get a review or something?

    Have you submitted for a hardware design review?

    I did not submit for the hardware design review yet. 

  • Hi Ryan, 

    Thank you for joining and trying to help. I realy appreciate it.

    Can you please confirm that you've followed all Custom Hardware instructions for the BLE project of your board design?

    Yes I did, I dont think -and correct me if I am wrong- that the custom board will run properly with power_saving not set except if I did follow all the instructions. 

    The custom board is working fine with power_saving predefined symbol not set. 

  • Please help address my confusion at this time, since I am not sure whether you've changed your project since you've mentioned that you are using the same firmware for the LaunchPad (7x7 mm QFN) and custom DSBGA board (2.7 x 2.7 mm WCSP).

    Yes, the software running on the LaunchPad is the same as the one running on the custom board except the board files since there is not board files for this package (CC2640r2f  YFV DSBGA) provided by TI.

    Your custom project should be using the CC2640R2DK_CXS pre-define or similar instead of the CC2640R2_LAUNCHXL.

    The custom board is working fine with power_saving predefined symbol not set.

    This could be coincidental, at which point defining POWER_SAVING causes a device configuration which is not accounted for correctly by the software's device variant options or the hardware configuration.  Here is another E2E thread which may give some additional clues.

    Regards,
    Ryan

  • Please help address my confusion at this time, since I am not sure whether you've changed your project since you've mentioned that you are using the same firmware for the LaunchPad (7x7 mm QFN) and custom DSBGA board (2.7 x 2.7 mm WCSP).

    Dear Ryan, 

    Not exactly the same frimware, I adjusted the code (created board files for CC2640r2f  YFV DSBGA Package) accourding to Creating a Custom Board File — SimpleLinkTm CC2640R2 SDK BLE5-Stack User's Guide 1.01.09.00 documentation  but the functionality of the code is same in both LaunchPad and custom board. I even tried the bare Simpleprepheral example on both LaunchPad and my custom board and the issue is still the same. 

    Your custom project should be using the CC2640R2DK_CXS pre-define or similar instead of the CC2640R2_LAUNCHXL.

    I did this. I followed the instructions. together with this E2E thread which has much details about this: CC2640R2F: Peripheral connection timeout error with custom board - Bluetooth forum - Bluetooth®︎ - TI E2E support forums

    I uploaded my workspace in the form in the first post. I will be grateful if you can take a look.

    This could be coincidental, at which point defining POWER_SAVING causes a device configuration which is not accounted for correctly by the software's device variant options or the hardware configuration.

    How can I check if it does this, is there anyway to know? 

    Here is another E2E thread which may give some additional clues.

    I saw this. This is a different problem, it is because there is no load caps on the external crystal. I had this problem before in an old custom PCB and I solve it. 

  • Hi Uthman,

    Thank you for providing so much detail.  Your shared project shows that you've made the application changes that I've been recommending.  Have you been able to debug the exact location at which your project fails to initialize?  I'm specifically considering your main function and whether Board_initGeneral -> CC2640R2DK_CXS_initGeneral -> Power_init returns successfully.  Does your code reach SimplePeripheral_taskFxn and pass through SimplePeripheral_init?  Here are some Debugging tips and I will also ask additional TI experts to provide their thoughts.

    Regards,
    Ryan

  • Hi Ryan, 

    Actually thanks for you, you are the one who is helping me. 

    Have you been able to debug the exact location at which your project fails to initialize?

    I will debug and get back to you as soon as possible. 

    Does your code reach SimplePeripheral_taskFxn and pass through SimplePeripheral_init?

    Something important to mention here and maybe answer your question, when I power up the custom board, for a very short time (less than half of second) it does advertise, then the crystal stops as you saw in the video I provided and the advertise goes away.

    Also, right at the power up, in this short time the current consumption is around 3mA RMS. Then goes to 100uA RMS when the crystal and advertise stops. 

    An important question here before debugging.. will the debug put any constrains on the power consumption? becaues if it will, power constrains will probably cancel the effect of  predefined symbol "power_saving" which is causing the failure.

    Kind Regards,

    Uthman

  • Hi Uthman,

    Understood. Could you try pausing execution after the issue occurs? Also, which SDK version are you using for your project?

    Best Regards,

    Jan

  • Hi Jan, 

    Thank you for your help. 

    Understood. Could you try pausing execution after the issue occurs?

    I will try. I tried before actually and I remember that the issue does not happen while debugging. I mean if I start the debug, the advertise does not go away neither the oscillator stops. But I will try again just to be sure and we can go from there. Please give me a day or so to try it and I will get back to you as soon as I try it. 


    Also, which SDK version are you using for your project?

    I am using "simplelink_cc2640r2_sdk_5_30_00_03" with "Code Composer Studio Version: 12.7.1.00001"

    Note: you can find my workspace on the first post under this name " customboardadvtest10.zip " . Also, last thing I tried was the internal osc "RCOSC" and it didnt work also.

    Kind Regards, 

    Uthman

  • Hi Uthman,

    Understood. I would suggest then reproducing the issue with the debugger disconnect and then connecting to the device as a running target. The following guide mentions how to do this:

    https://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_5_30_00_03/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/debugging-index.html#connect-the-debugger-to-a-running-target

    Best Regards,

    Jan

  • Hi Jan,

    I would suggest then reproducing the issue with the debugger disconnect and then connecting to the device as a running target. The following guide mentions how to do this:

    I have followed the instructions in the link you provided, and when I tried to start the debug i got the following error:

    "Error connecting to the target:
    (Error -242 @ 0x0)
    A router subpath could not be accessed.
    The board configuration file is probably incorrect.
    (Emulation package 20.0.0.3178)"

    Here is a screen recording of the things i did. you can see the error also in the video. On the right side, I am using Power profile kit that measure the current consumption of the board. 

     

    Kind Regards, 

    Uthman

  • Hi Ryan, 

    I'm specifically considering your main function and whether Board_initGeneral -> CC2640R2DK_CXS_initGeneral -> Power_init returns successfully.  Does your code reach SimplePeripheral_taskFxn and pass through SimplePeripheral_init?

    Yes it did, but as I suspected, the debug some how disable the effect of "power_saving" Which make the custom board advertise and oscillator does not stop. 

    Here in the video you can see how I did the debug and the program goes into the functions you mentioned. 

    You can also see in the following video that once I reset the board after the debugging the problem happens and current concumption goes to 100uA AVG again. 

     

    Kind Regards,

    Uthman

  • I will try. I tried before actually and I remember that the issue does not happen while debugging

    This might be a 24 MHz HFXT recovery issue then.  I would recommend re-evaluating this HW design section and monitoring the XOSC_HF lines to determine whether they recover from standby mode.  Have you verified the custom board with the pin standby TI Driver example?  Here are other relevant E2E threads:

    https://e2e.ti.com/f/1/t/1290339 
    https://e2e.ti.com/f/1/t/1319564 

    Regards,
    Ryan

  • Hi Uthman,

    As Ryan mentioned (Thanks Ryan!), this may be a HW design issue. Please submit a design for review as Jake mentioned earlier to see if we can spot what may be going on.

    Best Regards,

    Jan

  • Hi Ryan, 

    I will check the 24 and try the standby driver. 

    thank you 

    Kind Regards,

    Uthman

  • Hi Jan, 

    I just want to make sure that HW is the issue. Is there anyway to turn off the RF core. If the problem is HW, there is a big chance to be because of the RF section. I want to use the MCU without the RF section to check if the problem is comming from RF interference or so. I dont have any fast signals on the custom board.  

    Would you guide me how to turn off the RF completely so I can check if there is an interference or not? 

    Thank you in advance!

    Kind Regards, 

    Uthman

  • Hi Uthman,

    There is no single API to turn off the RF core, but if no RF events are scheduled, then the RF core will not do anything. If you are using a BLE example, then turning off all advertising, scanning and terminating any connection will ensure the RF core is inactive.

    Best Regards,

    Jan