NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide

From Texas Instruments Wiki
Jump to: navigation, search

Overview[edit]

This will document will show the process of porting to the EZ430-256x from the MSP430F5529 Experimenter Board to serve as a guideline for porting to other hardware platforms.

Creating the Starting Point[edit]

The TI's Bluetooth stack uses the functions exposed in HCITRANS.c to communicate with the Bluetooth chip. The HCITRANS.c contains a UART driver that relies on C macros to configure the UART correctly to communicate with the Bluetooth chip. These macros are contained in HRDWCFG. We will use the 5438 Experimenter Boardplatform files as the starting point for porting to the EZ430-RF256x 5529 Experimenter Board. First under the “MSP430_Experimenter\Hardware” directory we will create a new folder called “ez430”. Then copy the three files under the “MSP430_Experimenter\Hardware\MSP430_EXP5529” into the directory that was just created. The “ez430” will look like the following:


ez430/[edit]

  • HAL.c This is used for setting up the system clocks of the MSP430, for configuring the debug UART and for setting up the processor pins to a default configuration (to ensure no I/Os are left floating).
  • HAL.h This contains the protoypes of the functions that are exposed in HAL.c
  • HRDWCFG.h This contains the macros that are used to configure the system.

Modifications[edit]

HAL.c[edit]

1) In ConfigureBoardDefaults change the following,

PEDIR  = 0xFFFF;

Remove the content from /* Shutdown the Microphone Amplifier (P6.4 = 0) and shutdown the     */ comment till the end of the function.

2) In the end for #pragma vector=BT_UART_CTS_IV for the case switch(BT_UART_CTS_IVR) add an extra case and the following content

case P1IV_P1IFG2:
         /* This is the accelerometer interrupt pin on the ez430 so just*/
         /* exit LPM3 if this interrupt occurs.                         */
         LPM3_EXIT;
         break;


HRDWCFG.h[edit]

We change the following # defines here. There are some commenting changes as well.

1) BT_DEBUG_UART_BASE

#define BT_DEBUG_UART_BASE             ((unsigned int)&UCA3CTLW0)

2) BT_DEBUG_UART_IV

#define BT_DEBUG_UART_IV               (USCI_A3_VECTOR)

3) BT_DEBUG_UART_IVR

#define BT_DEBUG_UART_IVR              (UCA3IV)

4) BT_DEBUG_UART_PIN_BASE

#define BT_DEBUG_UART_PIN_BASE         (&P10IN)

5) BT_DEBUG_UART_PIN_TX_MASK

#define BT_DEBUG_UART_PIN_TX_MASK      (BIT4)

6) BT_DEBUG_UART_PIN_RX_MASK

#define BT_DEBUG_UART_PIN_RX_MASK      (BIT5)

7) BT_SLOW_CLOCK_PORT_BASE

#define BT_SLOW_CLOCK_PORT_BASE        ((unsigned int)&P2IN)

8) BT_SLOW_CLOCK_PORT_PIN

#define BT_SLOW_CLOCK_PORT_PIN         (BIT6)

9) BT_DEVICE_RESET_PORT_BASE

#define BT_DEVICE_RESET_PORT_BASE      ((unsigned int)&P2IN)

10)BT_DEVICE_RESET_PORT_PIN

#define BT_DEVICE_RESET_PORT_PIN       (BIT7)

11)BT_UART_RTS_PIN

#define BT_UART_RTS_PIN                (BIT3)

12)BT_UART_CTS_PIN

#define BT_UART_CTS_PIN                (BIT4)

13)BT_UART_CTS_INT_NUM

/* The Bluetooth CTS Interrupt Number.  This should be in the form   */
/* PXIV_PXIFGY where X is the Port Number (1 in this case) and Y is  */
/* the Pin Number on the corresponding port (4 in this case).        */
#define BT_UART_CTS_INT_NUM            (P1IV_P1IFG4)
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article CC256x MSP430 TI's Bluetooth Stack Hardware Porting Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity