SWRU428 September   2015 CC2564MODA

 

  1.   Dual-Mode Bluetooth® Stack on STM32F4 MCUs
    1.     Trademarks
    2. Features
    3. Bluetooth Profiles
    4. Sample Application Overview
    5. CC256XSTBTBLESW Hardware and Software Requirements
    6. Setting Up the Hardware
    7. Setting Up the Software
    8. Building and Flashing the Bluetooth Code (STM3240G-EVAL)
      1. 7.1 Flashing the Bluetooth Code
    9. Applications
    10. Classic Bluetooth Sample Applications
    11. 10 Classic Bluetooth + Bluetooth low energy Applications
    12. 11 Bluetooth low energy Applications
  2.   Revision History

Building and Flashing the Bluetooth Code (STM3240G-EVAL)

Sample applications for FreeRTOS and NoOS are available for IAR and KEIL.

Perform the following instructions to set up applications on each IDE version.

IAR

  1. Navigate to C:\TI\Connectivity\CC256XBT\CC256xSTM32BluetopiaSDK\v4.0.2.1 to open the workspace.
  2. Select one of the following samples:
    • For NoOS, navigate to \NoOS\STM3240G-EVAL\Samples\ for a list of samples.
    • For FreeRTOS, navigate to \FreeRTOS\STM3240G-EVAL\Samples\ for a list of samples.
  3. Select the demonstration to load onto the device. (This example uses SPPDemo.)
  4. Navigate to NoOS.
  5. Navigate to EWARM.
  6. Select SPPDemo.eww.
  7. NOTE

    The IAR IDE opens.

  8. Select Debug. (See Figure 6.) or Release Configuration from the drop-down menu. (For this example, select Debug.)
  9. CC256x Debug_swru428.gifFigure 6. IAR Drop-down Menu
  10. Select Download and Debug from the Project drop-down menu or click the Play icon. (See Figure 7.)
  11. CC256x Download_and_Debug_swru428.gifFigure 7. Download and Debug

    NOTE

    The IDE debugs and loads the software onto the device. This may take 5 to 10 minutes.

  12. Click the red X in the IDE to stop debugging. (See Figure 8.)
  13. CC256x stop_debugging_swru428.gifFigure 8. Debugging Screen
  14. Disconnect the STM3240G-EVAL.
  15. Reconnect the STM3240G-EVAL.
  16. Press Reset on the STM3240G-EVAL device.
  17. Press the GO button in the IAR.
  18. CC256x GO_button_in_IAR_swru428.gifFigure 9. The GO Button

KEIL

  1. Navigate to C:\TI\Connectivity\CC256XBT\CC256xSTM32BluetopiaSDK\v4.0.2.1 to open the workspace.
  2. Select one of the following samples:
    • For NoOS, navigate to \NoOS\STM3240G-EVAL\Samples\ for a list of samples.
    • For FreeRTOS, navigate to \FreeRTOS\STM3240G-EVAL\Samples\ for a list of samples.
  3. Select the demonstration to load onto the device. (This example uses SPPDemo.)
  4. Navigate to NoOS.
  5. NOTE

    For RTOS, navigate to FreeRTOS.

  6. Navigate to RVMDK in the list.
  7. Click SPPDemo.uvproj.
  8. NOTE

    Keil µVision4 opens.

  9. Select Debug or Release Configuration from the drop-down menu. (For this example, select Debug [See Figure 10].)
  10. CC256x SPPDemo_Debug_swru428.gifFigure 10. Debug Dropdown Menu
  11. Right-click SPPDemo_Debug in the project sidebar.
  12. Select Build target to build the code. (See Figure 11.)
  13. NOTE

    Figure 12 shows the output when built correctly.

    CC256x Build_target_swru428.gifFigure 11. Building Target

    NOTE

    After a few minutes, the build process finishes and builds an .axf file. Each time you change the configuration, you must build a new .axf file.

    CC256x Build_Output_swru428.gifFigure 12. Build Output
  14. Choose Debug mode or Release and Debug modes.
    • For Debug mode only:
      1. Select Start/Stop Debug Session to start loading the profile on the STM32 device and to work in Debug mode. (See Figure 13.)
      2. CC256x Start_Stop_Debug_session_swru428.gifFigure 13. Debug Mode

        NOTE

        The loading process completes in a few minutes.

      3. Stop the debugging session from the Debug drop-down menu.
      4. NOTE

        The profile loads on the STM3240G-EVAL board.

      5. Unplug the device.
      6. Plug the device in again to start working with it.
    • For Release and Debug modes:
      1. Click LOAD to start loading the profile on the STM32 device. (See Figure 14.)
      2. NOTE

        It should complete in a few minutes.

        The profile loads on the STM3240G-EVAL board.

      3. Unplug the device.
      4. Plug the device in again to start working with it.
    • CC256x LOAD_button_swru428.gifFigure 14. Release and Debug Mode