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.

CC2564C: CC2464C

Part Number: CC2564C
Other Parts Discussed in Thread: CC256XSTBTBLESW, CC2564

I have a board with MAX32560(Maxim microcontroler)  and  CC2564C.

MAX32560 use eclipse GNU GCC tools.

TI bluetooth software developmente kit  CC256XSTBTBLESW use only keil and IAR.

How can I compile bluetooth stack and configure pins: nShutdown, RTS, CTS, TXD, RXD and UART ?

Which software stack you suggest to use?

Thanks, Eng Jose Carlos

  • Hi Eng Jose Carlos,

    There exists a gcc-built version of the Bluetopia stack, at CC256x STM32 Bluetopia SDK/v4.2.1.1/NoOS/Bluetopia/lib/gcc

    You can link the appropriate library depending on your platform to your GCC build.

    As for configuring the various pins needed, you will need to make a set of HAL files that implements those needed functions. See HAL.c/.h and HALCFG.h in CC256x STM32 Bluetopia SDK/v4.2.1.1/NoOS/STM3240G-EVAL/Platform/ for an example of what you need to implement and how to implement them.

    Let me know if you need more clarification or have further questions.

    Regards,

    Michael

  • Hi Michael

    I download CC256x STM32 Bluetopia SDK  ( CC256XSTBTBLESW )  but actual  version is 4.0.2.2

    Can you send a link to version v4.2.1.1 you tell me above?

    HALCFG.h  has a text:

    /* The following definitions define the UART/USART to be used by the */
    /* HCI transport and the pins that will be used by the UART. Please */
    /* consult the processor's documentation to determine what pins are */
    /* available for the desired UART. */
    /* * NOTE * The TXD and RXD pins MUST be map-able to the selected */
    /* UART. Additionally, if hardware flow control is desired,*/
    /* the RTS and CTS pins must also be map-able to the */
    /* selected UART. If software managed flow is used, RTS may*/
    /* be any available GPIO but CTS must be a GPIO that can be */
    /* mapped to an available EXTI line. The RESET pin may be */
    /* any available GPIO. */
    #define CONSOLE_UART 3

    #define CONSOLE_TXD_PORT C
    #define CONSOLE_TXD_PIN 10

    #define CONSOLE_RXD_PORT C
    #define CONSOLE_RXD_PIN 11

    #define HAL_LED_PORT G
    #define HAL_LED_PIN 6

    I am using CC2564C. It has nShutDown pin.  I opened  HAL.c/.h and HALCFG.h and not found any command or reference to nShutDown pin (maybe named RESET pin).

    A think the Bluetooth stack must do it high before send/receive data. In CC2564C datasheet tell to do nShut pin high and after 100ms HCI_RTS go low to show CC2564C get ready.

    The stack work with nShutDown pin ?

    Can you tell me where this pin is activated/deactivated in the stack?

    ____________________________________________________

    Debuging my board BSC_Initialize() returned -4. I think the problem must to be the nShutDown pin. I need to know where I configure it in stack.

          1) /* Initialize the application.                                       */
           if((Result = InitializeApplication(&HCI_DriverInformation, &BTPS_Initialization)) > 0)  // => retornou (-1001)   => #define APPLICATION_ERROR_UNABLE_TO_OPEN_STACK     (-1001)

            2) static int OpenStack(HCI_DriverInformation_t *HCI_DriverInformation, BTPS_Initialization_t *BTPS_Initialization)  // retorna -7 (UNABLE_TO_INITIALIZE_STACK ) 

            3) /* Initialize the Stack                                        */

             Result = BSC_Initialize(HCI_DriverInformation, 0);  //Result = -4   (BTPS_ERROR_HCI_INITIALIZATION_ERROR) 

    Best Regards, José Carlos

  • Hi José Carlos,

    The latest version of the Bluetopia stack for the CC2564C can be found here:

    http://www.ti.com/tool/CC2564CSTBTBLESW

    Yes, the RESET pin is the same as the nShutdown pin. 

    You will need to determine how best to use your platform APIs to toggle that nShutdown pin in the HAL_ConfigureHardware() setup function. For the STM32 platform porting code, it appears that HAL_LED_GPIO_AHB_BIT is used to set that nShutdown signal. You can take a look at the porting files of a few of the other MCU-based platforms such as the MSP432 if you need more examples of how the hardware setup is performed. A full listing of the Bluetopia stack ports can be found here: https://processors.wiki.ti.com/index.php/CC256x_TI's_Bluetooth_Stack

    Let me know if you have further questions on porting the CC2564 bluetopia stack to your platform

    Regards,

    Michael

  • Hi Michael

    I found in STM32 stack, in HCITRANS.c :

    #define ClearReset() GPIO_SetBits(HCITR_RESET_GPIO_PORT, (1 << HCITR_RESET_PIN))
    #define SetReset() GPIO_ResetBits(HCITR_RESET_GPIO_PORT, (1 << HCITR_RESET_PIN))

    /* Configure the GPIO. */
    ConfigureGPIO(HCITR_RESET_GPIO_PORT, HCITR_RESET_PIN, GPIO_Mode_OUT);
    SetReset();

    ClearReset() and SetReset() are used only in 

    int BTPSAPI HCITR_COMOpen(HCI_COMMDriverInformation_t *COMMDriverInformation, HCITR_COMDataCallback_t COMDataCallback, unsigned long CallbackParameter)

    and

    void BTPSAPI HCITR_COMClose(unsigned int HCITransportID)

    I still geting -4(BTPS_ERROR_HCI_INITIALIZATION_ERROR) in  BSC_Initialize(HCI_DriverInformation, 0); 

    Do you think stack library code use ClearReset() and SetReset() ?

    Best regards, José Carlos