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.

LAUNCHXL-CC2640R2: 32kHz Crystal-less Configuration for OAD Example

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F, UNIFLASH, CC2642R

Hi,

I cannot solve the problem that I mentioned in the related issue. In short, I cannot make the OAD example work on a 32kHz crystal-less custom-designed card.

I could not answer my previoıus issue and the issue was closed by TI. In the meantime, I tried to add 32kHz crystal on my custom-designed board that has normally does not have and I finally add 32kHz crystal externally. I tried OAD example (not doing 32kHz crystal-less mode configuration of course) on my custom-designed card which has 32kHz crystal and it worked.

But I cannot make OAD example work with 32kHz crystal-less mode configuration on 32kHz crystal-less custom-designed card.

Please look at my previous issues.

https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/838780

https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/838001

These issues have much information about my problem but in short, I cannot make OAD example work on my custom-designed card that has no 32kHz crystal.

If you want to try my problem, PLEASE MAKE SURE YOUR CARD HAS NO 32KHZ CRYSTAL, IT IS IMPORTANT THAT THE CRYSTAL MUST NOT BE ON THE CARD AS HARDWARE because you may think you did the right configuration for 32kHz crystal-less mode and your code works but actually you cannot do right configuration actually and your code works because of the 32kHz crystal that exists on your board. I experienced it.

Anyway, I need the right configuration steps to make OAD example work in 32kHz crystal-mode. 

I have 100 custom-designed cards produced and I cannot update their firmware because they do not have OAD property. I need to go to my customers and update their firmware manually. It is really bad. I am trying to establish an informatics company. I am really in a bad situation and I was ashamed day by day.

Please help me with this issue.

Dogus.

  • Hi Dogus,

    I am not sure if it helps, but try this:

    1. Import the Simple Peripheral example (without OAD)
    2. Set the NO_RCOSC symbol in the predefined symbols
    3. Run this project in DEBUG mode
    4. Use your phone + SimpleLink Starter app to connect to the Simple Peripheral device

    If it works this far, try now flashing your own OAD project. It might just work. This was the fix for me in the crystal-less design.

    HOWEVER, this fix seems to be only temporary. I suspect that the OAD example is based on an older Simple Peripheral project, and the calibration in that older project is not right yet. So after a few days, your device will need re-calibration.
    Perhaps TI can weigh in on this, or you could port the OAD profile and bootloader from the OAD project to the working Simple Peripheral project.

    Good luck!

  • Hi,

    Thank you for your reply.

    I already use my custom-designed cards with Simple Peripheral without OAD example now but I needed to give these cards to my demo-users to collect some sensor data. I had to do that because my project has an ML side.

    I reported this issue almost 3 months ago but I could not get any reply that solves my problem. I waited patiently and did some extra tests but I could not solve the problem, unfortunately. Now, there is a bug in my firmware and I need to update the firmware of the boards they belong to my potential customers now.

    Actually, they have an Android AP that is ready to update the firmware via OAD but they could not because my board cannot support OAD property without  32kHz crystal and now, I have to stop by to them and update their firmware manually.

    This is impossible in the real world. Do I have to use 32kHz crystal on my board, really? I removed it because of BOM cost. Anyway since I am a startup, I cannot produce new boards because of cost, I need to solve almost all bugs now and then I need to produce the second HW phase. 

    Please help me with that issue and share the correct steps to customize OAD example.

    Dogus

  • Hi Dogus,

    I (another customer, just like you) am experiencing the same problem. As far as I know, TI has so far not resolved it, and I have not had the time to manually compare the Simple Peripheral (without OAD, which works without crystal) with the not-working crystal-less Simple Peripheral with OAD.

    We will need to wait for someone from TI to weigh in on this issue, as I do not have a solution that does not involve changing the firmware manually at this time.

  • Thank you for your reply.

    Let us wait for TI response for a while.

    Dogus

  • Hi Dogus,

    Can  you reproduce the issue if you use a CC2640R2 LaunchPad with the 32kHz crystal removed (e.g. desoldered)?

    If you can confirm that the issue is reproducible there, then TI can attempt to reproduce it and support you, however we need to use the LaunchPad as we do not have your H/W

  • Hi, Since I have one board that I used it for debug purpose, I will supply another one and I will do the test you said. I will reply the post, please do not close the issue in the meantime.
  • Hi,

    The system will close the thread after 30 days of inactivity. If it will take a longer than that to get another board, then just reply to this comment to keep it alive.

  • Hi,

    I tried what you said and the result was failed as I expected.

    I tried the blestack/OAD_OffChip example directly with the last SDK and I observed the same problem.

    Please see video at the first post on the issue below;

    https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/838001

    As I mentioned before, when I tried to configure the device to work without 32kHz crystal just like in the document below;

    http://dev.ti.com/tirex/explore/content/simplelink_cc2640r2_sdk_3_30_00_20/docs/blestack/ble_user_guide/html/ble-stack-3.x/custom-hardware.html#using-32-khz-crystal-less-mode

    I can compile the code without any error but I got the same error. I figured the problem out in custom HW. Because I worked with the launch board before and I followed the configuration steps, I could compile and it works and I assumed I can accomplish BUT that was wrong. When there is no 32kHz crystal on the launch board, the same problem exists.

    Please help me with that and share configuration steps for OAD examples.

  • Hi,

    I added the videos. The problem can be seen clearly. The device does not accept my connection and breakdown the link unexpectedly.

  • The problem is the same as before. 

    I tried it now with Android app. Because of that console output does not toggle between "connected" and "not connected" states.

    My first problematic video tried with IOS app.

    Please see video at the first post on the issue below;

    https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/838001

    I have also a new video tried with ios and it is clear the problem is the same but the video is too big to upload here. 

    In short, I tried the test case you mentioned and the problem still exists. When I tried to connect to device, the link breakdown with "Timed Out" console log in 32KHZ CRYSTAL-LESS HARDWARE

    Please help me about that.

  • Hi Sean,

    Is there any update on this issue?

  • Hi, Is there any update? Did you try the case?
  • Hi Sean,

    Could you please inform me about the process?

    Are you trying to reproduce the situation or do you put the issue on your working-queue? 

    What is the situation? I need your feedback.

  • Hi Dogus,

    Most of TI has been on vacation for the past two weeks for the holidays, my apologies for the delay.

    We don't have any progress to report yet, but we will attempt your steps and get back to you.

    By the way, the "Timed Out" error code usually refers to a case where the peripheral went into the connection mode but never met the master.

    If you disable power saving by removing the POWER_SAVING define from the project's preprocessor symbols and re-run the test, does the issue still occur?

  • Hi dogus,

    I gave you solution for this have you not tried it? If I have time I will give you hex file for 32kHz crystal less Simple Peripheral Off-Chip OAD.

    -kel

  • Hi Sean,

    I totally forget your holidays, sorry.

    I tried what you said, removing POWER_SAVING define and the problem still exists.

  • Hi Markel,

    You talked about the last answer you gave in my previous issue right? If so, unfortunately, it did not solve my problem.

     My previous issue was stuck and I created this one. Of course, I tried all the suggestions. Since the problem still exists, I created this issue.

    In order to be sure, I will walk through again all the suggestions in my previous issue but actually I am pretty sure that I tried and failed.

    If I get positive progress while walking through the previous issue again, I will inform you guys I promise but I think we should re-focus the problem on this issue and Sean should try and see the problem on his side. This takes us to the solution very quickly I believe.

  • Hi dogus,

    Okay, let's try and make the 32khz crystal less work first with your launchpad. I will give you hex file for test tomorrow, if it works then my solution works. 

    TI has a technical document guide for converting the simple peripheral stack library to work with 32khz crystal less. But the simple peripheral off-chip oad is not stack library, that is why I am not entirely certain the procedure will work.

    -kel

  • Hi Dogus,

    I tested this Simple Peripheral Off-Chip OAD with 32kHz crystal less implementation at CC2640R2F Launchpad and it works. But my Launchpad has 32kHz crystal. Test this with your CC2640R2F Launchpad with 32kHz crystal removed.

    The download link above contains a CCS workspace CC2640R2Fv330_Test that contains the modified Simple Peripheral Off-Chip OAD example. CCSv920 is required for the workspace. Also you need CC2640R2F SDKv3.30.

    Using SmartRF Flash Programmer 2 do exactly this below.

    1. Browse for BIM hex file, STACK hex file, and APP bin file.
    2. Deselect APP bin file.
    3. Program BIM hex file and STACK hex file.
    4. Deselect BIM hex file and STACK hex file.
    5. Select APP bin file and program.

    Make sure your SmartRF Flash Programmer is set to Action Erase -> Pages in Image, Program -> Entire Source File.

    Let me know if you are able to see the Simple Peripheral Off-Chip OAD example advertise and able to connect to it.

    -kel

  • Hi Markel,

    Thank you for your support.

    I tried your project. There is no hex file in the workspace (am I right?) so I compile them in the order stack, app, bim respectively.

    The only difference between your way and my way is that I used UniFlash, not Flash Programmer because Flash Programmer gave some error unexpected. But I consider ALL flashing configuration you wrote above while flashing the app and I follow exactly your steps.

    RESULT, exactly the same ERROR, unfortunately.

  • Hi Dogus,

    There is hex file and bin within the CCS projects. Please use SmartRF Flash Programmer 2 to flash the hex files and bin. Then let me know what the error is.

    If you do not not flash the hex files and bin file the right way it will not advertise.

    -kel

  • Hi Markel,

    You are right, the archive folder contains hex files, I just looked for "unsecure" folder because I use this configuration.

    Anyway, I tried just like you explained in detail by using directly your hexs and bin files and the result is the same.

    I tried on 32kHz crystal-exist launch board and it works, on without-crystal-launch board, it does not work.

  • Hi Dogus,

    Thanks for the feedback. TI Engineers should come up with a procedure for this.

    -kel

  • Hi Sean,

    Is there any update on this issue?

  • Hi Sean,

    Did you reproduce the problem?

  • Hello Dogus,

    I apologize if it's been asked and answered, but can you confirm that the SCLK option in your BIM hex file is actually configured to support the RCOSC clock source? To be specific, this is the SCLK_LF_OPTION setting in the MODE_CONF section of the CCFG (Offset = FB4h in the last page of flash: 31). If this param value is not 0x3, then you will not be configured to use the internal RCOSC. Using the ccfg_app_ble_rcosc.c should enable this correctly, but if there's a build error or something of the sort in your BIM, then problems will ensue. You can also dump and post the last 88 bytes of your BIM flash image (with addresses), that will also confirm the setting. You can read the flash using SmartRF Flash Programmer 2.

    In you BIM and in the simple_peripheral_oad_offchip app start up, call the following from source\ti\devices\cc26x0r2\driverlib\osc.h

    extern uint32_t OSCClockSourceGet(uint32_t ui32SrcClk);

    with source set to OSC_SRC_CLK_LF. The return param should be OSC_RCOSC_LF (0x02) indicating that the RCOSC is in use. If for any reason it's not the expected value, stop/trap since your LF clock will not be configured correctly.

    Please try this out on your modified LaunchPad (sans 32 kHz crystal), followed by your custom HW.

    Edit: The MODE_CONF register is defined in the TRM (SWCU117 rev H), Ch 9 CCFG, Sec 9.1.1.4 MODE_CONF Register.

    Best wishes 

  • Hi,

    Thank you for your reply.

    I will do all the things you mentioned and I will share my results asap.

  • Hi,

    Since I decided to use CC2642R because of memory concerns and the CC2642 is configurable to work without crystal by default for OAD-Offchip example, I think we can close this issue. 

    Thank you all for your help.