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.

CC2640: How to config CC2640 with 4x4 HW?

Other Parts Discussed in Thread: CC2640, CC2650

How to configure project to run on 4x4 HW?

Verify sample project SimpleBLEPeripheral on SmarfRF06 board with 7x7 HW and workable.

And then I try to modify the project include options file to link to my new board.c and board.h. 

"${TI_RTOS_DRIVERS_BASE}/ti/boards/NEWBOARD/CC2650EM_4XS"

In board.c

PIN_Config BoardGpioInitTable[] = {

Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
Board_LED2 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
Board_LED3 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
Board_LED4 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
PIN_TERMINATE /* Terminate list */
};

In board.h

#define Board_LED1 IOID_0
#define Board_LED2 IOID_9
#define Board_LED3 IOID_8
#define Board_LED4 IOID_7

Don't know what parameters else I need to change to support 4x4 HW. Any information is welcome. Thanks!

  • Hi Jerry,

    You also need to change the frontend setting for the BLE stack as the default is 7ID.
    See main.c/bleUserConfig.h. You probably need to change from CC2650EM_7ID to CC2650EM_4XS as a compiler define.

    .:Svend
  • Hi Svend,

    There is #define CC2650EM_4XS in board.h but not work.

    Jerry

  • Hy Jerry,


    did you finally get it running? Having the same issues at the moment.

    > There is #define CC2650EM_4XS in board.h but not work.

    You probably need to define the symbol in project settings rather than typing a define to the header:

    But I don't have it running yet, either.

    Regards

    Harald

  • Harald,

    There are 3 things that should be necessary here to modify in SimpleBLEPeripheral

    1: Modify compiler search path to ensure #include <board.h> will find your custom board.h. This is done in the application properties under Build->ARM Compiler->Include Options->"${TI_RTOS_DRIVERS_BASE}/ti/boards/SRF06EB/CC2650EM_7ID"
    2: Ensure CC2650EM_4XS is defined either in your board.h file or as a predefined symbol. In main.c this file is included before bleUserConfig.h which builds up the RF configuration for the stack.
    3: Remove the compiler preprocessor symbols TI_DRIVERS_SPI_DMA_INCLUDED and TI_DRIVERS_LCD_INCLUDED. The 4x4 EM does not have enough pins available to use the LCD.

    Once you have re-built the project:
    - Check that the correct Board.h file is included in main.c by right-clicking "Board.h" and select "Open declaration"
    - Open bleUserConfig.h and find the structure BLE_USER_CFG. Do the same with the symbol RF_FE_MODE_AND_BIAS to check it has compiled in the version for CC2650EM_4XS.

    .:svend
  • Issue has been resolved.

    My current BSP version is "ble_cc26xx_2_00_00_42893".
    Please makesure Resource->Linked Resources->CC26XXWARE with below setting

    C:\ti\tirtos_simplelink_2_11_01_09\products\cc26xxware_2_00_06_14829\startup_files\ccfg.c
  • Jerry,

    CC26XXWARE should only be changed from C:\ti\tirtos_simplelink_2_11_01_09\products\cc26xxware_2_20_06_14829 to C:\ti\tirtos_simplelink_2_11_01_09\products\cc26xxware_2_00_06_14829 if you are using older device revision (<rev 2.2).

    Note that support for older revisions will be removed in the next release of TI RTOS and the BLE stack so you should upgrade if you are still using these.

    Regards,

    Svend

  • Hi Svend,

    My current board chipset is 2.1,will move to latest version once I got rev2.2 board.
    Thanks for the information!

    Jerry
  • Hy,

    thanks for the good help, I was trapped in the backdoor mechanism.

    After disabling backdoor by

    Boot.checkBackdoor = false;
    in appBLE.cfg

    everything seems fine.

    So, now it's up and running!

    Cheers

    Harald

  • Hi Svend,
    Thanks for the post, that got the 4x4 CC2640 up and running! However, I ran into a strange error. I have another board with a 5x5 CC2640, and I flashed it with the 4x4 code without thinking. It actually broadcasted as SimpleBLEPeripheral, and I was able to connect to it with a smartphone. However, the JTAG pins were no longer recognized, so it could not be re-programmed until I ran the Flash Programmer 2 and erased the memory contents.

    Now I've been trying to program the 5x5 the correct way, by modifying the compiler search path to the CC2650EM_5XD folder, and re-including the preprocessor symbol TI_DRIVERS_SPI_DMA_INCLUDED. If I include the TI_DRIVERS_LCD_INCLUDED symbol, there is an error in compiling, so I left it out.

    The chip has been unresponsive. Is there another setting that I would need to change for the 5x5 CC2640?

    thanks!
  • Yoo,

    Not sure what might be wrong, "unresponsive" is a very vague description :)

    Regards,
    Svend
  • Hey Svend,
    Sorry for vague description. By "unresponsive" I meant I couldn't see the PAEN or EN lines toggle, no 2.4GHz signal on a spectrum analyzer, and then of course no "SimpleBLEPeripheral" via the LightBlue app on an iPad.

    It was actually a stupid mistake in the end -- the first error was in not bringout out the Reset line -- JTAG can program the chip the first time without a reset line, but subsequently it can't find the chip if it can't reset it. The second error was that after I erased the memory using the "forced mass erase", I forgot that I needed to re-flash the CC2640 Stack first.

    thanks for your help!
  • I am trying to do the similar thing: to port SimpleBLEPeripheral into 5x5 CC2640 with customized HW. Followed all the suggested steps but getting this error message: No source available for "0x1001bbd6 when debugging the HW using XDS110 debugger.

    Any helpful on that would be appreciated. Also, since those BLE example projects are referencing to CC2650, can they be ported to CC2640 without any problem if only BLE function is used.
  • Hi Charlotte,

    All the voltages and connections are fine. I could also flash the "SimpleBLEPeripheral" sample program into my CC2640 5x5 board using XDS110 debugger. However, the program seems cannot run as the debugger halts at the hSbpPins line after the Pin_Init function:

    PIN_init(BoardGpioInitTable);
    hSbpPins = PIN_open(&sbpPins, SBP_configTable);

    I then used the same program and flashed into a SensorTag device and it works fine. The SensorTag is using CC2650 7x7. I then used a spectrum analyzer to pick up the clock signal of both devices. The SensorTag seems using internal clock at 48MHz and then divides it by 4 to run the main code at 12MHz as I could observe a distinctive 12MHz signal. I also observe the internal clock of 48MHz from my CC2640 5x5 board but the clock signal spreads out from 48MHz to 60MHz. There is no 12MHz signal observed. Just do not know why they behave differently for the same program. They are supposed to be the same in terms of hardware and software except the extra communication protocol in CC2650, right? Do you know where we could check the settings for the clock selection on the "SimpleBLEPeripheral" sample program.

    Thanks a lot,

    Henry
  • Hi Henry,

    Can you check that the return value of PIN_init == PIN_SUCCESS?
    If not the PIN_open call will fail and cause an exception. If so, this happens probably because BoardGpioInitTable contains IO's not existing on the 5x5 package.

    Regards,
    Svend
  • Hi Svend,

    Following your suggestion, it was found that the pins were not properly initiated as the pin numbers were not set correctly. Once the pin numbers are set correctly, the program are running fine.

    Your suggestion really helps.

    Thanks a lot,

    Henry

  • Hi,

          I want to develop a model using capsense technology which communicates with android devices via Bluetooth cc2640.

    for this i have followed the following method,

    Now do i need to code separately for my device  or modify the present code in simple ble peripheral Stack..

    how to proceed for the coding ??

  • Svend,
    I have implemented everything discussed on this thread in setting up our 2640 custom board.
    2650EM-4XS is in the include options and predefined symbol in SimpleBLEPeripheral, I also
    added it as a predefined symbol to SimpleBLEPeripheralStack, I matched the PIN numbering
    on the board.h file with our schematic (we use GPIOs for PAEN, HGM, EN, SPI and UART only),
    the CC2640 is set up for RF front end differential with internal bias, checkBackdoor is FALSE etc.

    IOCPortConfigureSet commands for PAEN and EN pins are showing no change on the scope.

    I have no luck running SimpleBLEPeripheral yet. I have BLE stack 2.1.1.44627, TI RTOS 2.13.00.06,
    CC26XXWARE = C:\ti\tirtos_simplelink_2_13_00_06\products\cc26xxware_2_21_01_15600. Is the
    correct CC26XXWARE? If not what should I use?

    I appreciate you letting me know what else I may have missed.

    Thanks,
    Priya
  • Priya,

    Let's continue the discussion on your original post: e2e.ti.com/.../494888

    Best wishes
  • Hello, svend.

        I also meet this the problem. I have followed  your steps as above.But I can understand how to check the  BLE_USER_CFG. Could you please tell me how to do it?

    Thank you very much.

  • Expand SimpleBLEPeripheral in CCS. Expand Startup. Expand main.c Right click bleUserConfig.h select open. In main.c this file will be highlighted. Right click and open declaration, it will open the file in CCS for editing.