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.

CCS/LAUNCHXL-CC2640R2: OAD Implementation Problem for Custom Designed Hardware

Part Number: LAUNCHXL-CC2640R2

Tool/software: Code Composer Studio

Hi,

I have a custom designed hardware that contains CC2640r2 MCU with 5x5 footprint. In that hardware, I can use the SimplePheripheral example successfully. I added custom board.h and board.c and other necessary files, hardware does not have 32KHz crystal and I also did its configuration, the hardware also has a different schematic for RF pins and I also did its configuration. In short, I can implement the SimplePheripheral project to my custom hardware without any problem and I can use whole pins of the MCU.

Now, I just want to add OAD feature to my design. To do that, I did not follow "Adding OAD to a project" instructions. Instead of that, I will change "OAD On-Chip" example for my application. Before that, I just wanted to try the "OAD On-Chip" example directly on launch board. To do that, I imported "OAD On-Chip" example from ResourceExplorer and I tried it over the launch board first and I can do it without any problem. Then I added "USE_RCOSC" predefine and did other necessary things, so I changed the code "Crystal-less mode and I tried it on my launch board and it worked also. Finally I changed the "CC2640R2_LAUNCHXL" predefine with mine, after that it did not work.

I can compile and link the project without any error, I embedded the code to hw, I saw its name on any BLE scanner application BUT I CANNOT CONNECT it. Because of that, I cannot update its firmware via BLE.

When I press the "connect" button, the "waiting" cursor is turning but I cannot connect to hw and I cannot see characteristics.

When I tried to debug the code, I cannot debug it. Why I cant debug it (maybe pressing directly to debug button in CCS corrupts "persistant" or "bim" app in the flash I dont know)

Thank you for your interest,

Dogus. 

  • Hi Dogus,
    Assigning an expert to follow up.
  • Hi,

    I can share my board source and header files with hardware schematic in private mode if it is necessary.

    Thanks,

    Dogus

  • Hi Dogus,

    Can you explain step by step what did for each one of the devices (launchpad and your custom board)?
    Please elaborate more specifically what succeeded and what failed.

    What SDK are you using?
    How are you attempting the OAD? BTool?
    If so, do you have BTool logs you can share?
    Do you have any sniffer logs you can post?

    Best Regards,
    Yuval
  • Hi,

    Thank you for your interest.

    CCS ver: Version: 8.3.0.00009
    SDK ver: 2.40.00.32

    I am starting from begging what I tried;

    Firstly, I have a custom designed card that has 5mmx5mm cc2640R2 and does not have a 32KHz crystal.

    To use this hardware with "Simple_pheripheral Example (basic one under the ti_resource_explorer>Examples>SimpleLink CC2640R2 SDK>Examples>blestack>simple_pheripheral)" example, I just imported the example directly in my CCS.
    After that, I follow this link: software-dl.ti.com/.../custom-hardware.html to make custom board configurations and crystal-less mode configurations and also RF schematic configuration (single-ended operation with external bias).

    I think I could do it because I can use my hardware just like I want. I can use I2C, GPIO, BLE stack, Internal Flash (to save some basic sensor configurations, etc), timer, power (standby and shutdown modes), BUT NOT SPI because I think my board's SPI flash schematic part is problematic.

    Then I just want to add OAD off-chip property to my custom board. I searched and learned that off-chip example (under ti_resource_explorer>Examples>SimpleLink CC2640R2 SDK>Examples>blestack) is very close to the normal simple_pheripheral example. So, I decided to import the example and add my algorithm over on it.

    To do that, I tried the example on my launch board first and I started from here: dev.ti.com/.../setting-up-environment.html

    I set up necessary things and I tried the examples (on chip and off chip both of them) and they worked on the launch board.

    After that, I tried to go forward step by step. First I configured the off-chip example for crystal-less mode and tried it on the lauch board and it worked again.

    Then I changed the predefined CC2640R2_LAUNCHXL symbol (under the project>properties>Build>ARM Compiler>PredefinedSymbols) to my custom board style.

    Then, I just removed "Display" related code parts from the project (I did nothing except this code change to the off-chip project) because custom board does not have UART output.

    I built the project without any error and I embedded the code to my custom board. At the beginning, there is no problem. I then tried to see the card's name in BLE search list (by using 3rd party application) and I can see it. It was broadcasting. Then I tried to connect to it (normally I can connect and see characteristics) but it failed. I cannot connect the board and because of that, of course, OAD is not working.

    Thank you for your interest.
    Dogus.
  • Hi Dogus,

    Thanks for answering.

    After the failed attempt to connect to your device via BLE, can you still see the device advertising?
    Do you have any way of debugging your HW? If so I can try to guide you on where to add a breakpoint and follow the code to see where the problem might be.

    Best Regards,
    Yuval
  • Hi,

    Sorry for my late response.

    Advertising was stopped after attempting to coınnect.

    I have no serial port output but I can debug it via CCS debug. As you know, Bluetooth connection is corrupted when the program stops on any breakpoint by the way.

    Thanks.

  • Hi Dogus,

    Can you specify which lines of code exactly you remove that were related to the display driver?

    Best Regards,
    Yuval

  • Hi,

    In the CCS, I pressed CRTL + H + FileSearch tab and I entered "display" without checking "case sensitive" checkbox and I comment out all result they are related with uart display in whole projects.

    For example, in persistant_app, in oad_persistant_app.c line 181. Or, in oad_onchip_app, simple_pheripheral_onchip.c line 988, 989 etc..

    Thanks,

    Dogus

  • Hi,

    To use TI Examples very effective, I changed my HW design to fit TI's launchBoard including external flash. In this way, we can consider this issue closed now because I have new problems, unfortunately. I will post new issues later so we can close this issue because this project is not going on for now.

    Thanks.

    Dogus.