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.

MSP-EXP430FR6989: with CC3100 email example

Part Number: MSP-EXP430FR6989
Other Parts Discussed in Thread: CC3100, MSP-EXP430F5529LP, MSP-EXP430FR5969, MSP430FR5969, MSP430FR6989

I have been posting and dialogging with Michael in the CC3100 forum. He suggested I also try this forum.

To Date I have not been able to successfully get the CC3100 to work with the FR6989 launch pad
- Again, my Ultimate goal: Add CC3100 WiFi to my FR6989 products
- Unbelievable that TI or some user does not have a working example.
- I am sure many people would be extremely grateful to have a posted working "WiFi email with CC3100 - FR6989

CC3100_sdk_1.3.0, CCS_8.2.0, Compiler TIv18.1.3.LTS
- Working perfectly with F5529 examples
- I successfully ported my F5529 product to the latest sdk, CCS, and compiler, Working perfectly with my F5529 products

- Working perfectly with FR5969 examples
- To Date I have not been able to successfully port it to have CC3100 work with the FR6989 launch pad

- I have used the FR6989 Out of the Box example (so very simple application to start with) and have tried to add CC3100 WiFi simplelink to it by adding files from the FR5969 example
- As outlined in the documentation in the sdk download: CC3100_sdk porting guide can be found at cc3100-sdk/docs/simplelink_api/html/index.html:
  - Per the instructions I have created my own local copy of user.h (not linked to the CC3100_sdk library or since it is a linked file it will change the base file and break all other examples and projects)
  - I copied all of the body from the original user.h but then had to change my copy to link to my new copies of 1) board, 2) cli_uart, 3)spi
  - The pins and instance of the uarts and spi are different for each of the launch pads (see table below)
 - I created boardFR6989.C and .h, cli_uartFR6989.c and .h, spiFr6989.c and .h
 - In these files I changed pin numbers and Interrupt vectors to match the FR6989

- To date: I have a clean compile, it runs, I can single step and see it writing to the Back Channel uart buffer by watching the registers, but no characters are displayed on the back channel Uart and the WiFi does not work

This posting provides a link to wiki page which provides working UARTs for these launch pad.
The FR6989 UART works and the code is very well written and documented
https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/465550?help-MSP430FR6989-launchpad-deverlopment-UART
http://processors.wiki.ti.com/index.php/MSP_UART

myUART_05_example.zip …for the FR6989
myUART_5529.zip myUART_5529.zip (MSP-EXP430F5529LP LaunchPad)
myUART_5529.zip myUART_5969.zip (MSP-EXP430FR5969 LaunchPad)

My next step is going to take the working myUART_05_example.zip for the FR6989 and now try to add simplelink to it as at least the back channel UART is proven to work.

I will post my cli_uartFR6989.c code that I modified from the FR5969 CC3100 example….in case someone can spot an easy obvious error

- For the benefit other users this is the mapping of each of the CC3100 WiFi pins to the respective launch pad pin number
- I used tabs, so I hope this is still formatted OK once it is posted


CC3100            CC3100             FR5969            FR6989            F5529
Booster              Left Side           Left Side           Left Side           Left Side
Pack                 Outer Row         Outer Row         Outer Row        Outer Row

VCC 3.3V          P1.1                 3.3V                 3.3V                 3.3V
Unused             P1.2                                                                 
UART1_TX        P1.3                 P2.6 Rx            P4.3 Rx            P3.4 Rx
                                                eUSI_A1           USCI_A0           USCI_A0
UART1_RX        P1.4                 P2.5 Tx             P4.2 Tx             P3.3 Tx
                                                eUSI_A1           USCI_A0           USCI_A0
nHIB                 P1.5                 P4.3                 P3.2                 P1.6
Unused             P1.6                                                                 
SPI CLK            P1.7                 P2.2                 P1.4                 P3.2
                                                eUSCI_B0         eUSCI_B0         eUSCI_B0        
Unused             P1.8                                                                 
Unused             P1.9                                                                 
Unused             P1.10
                                                                         
CC3100             CC3100            FR5969           FR6989             F5529
Booster             Left Side           Left Side           Left Side           Left Side
Pack                 Inner Row          No Header        Inner Row          Inner Row
Pack                 Inner Row          No Header        Circuit Side       Circuit Side
5V                    P3.1                 No Header        5V                    5V
GND                 P3.2                 No Header        GND                 GND
Unused             P3.3                                                                 
Unused             P3.4                                                                 
Unused             P3.5                                                                 
Unused             P3.6                                                                 
Unused             P3.7                                                                 
Unused             P3.8                                                                 
Unused             P3.9                                                                 
Unused             P3.10

CC3100            CC3100             FR5969             FR6989            F5529
Booster             Right Side         Right Side         Right Side         Right Side
Pack                 Outer Row         Outer Row        Outer Row         Outer Row
GND                 P2.1                 GND                 GND                 GND
IRQ                   P2.2                 P1.2                 P2.1                 P2.0
SPI CS             P2.3                 P3.0                 P1.5                 P2.2
Unused             P2.4                                                                 
nRST                P2.5                 RST                  RST                  RST
SPI_MOSI         P2.6                 P1.6                 P1.6                 P3.0
                                                eUSCI_B0         eUSCI_B0         eUSCI_B0
SPI_MISO         P2.7                 P1.7                 P1.7                 P3.1
                                                eUSCI_B0         eUSCI_B0         eUSCI_B0

Unused             P2.8                                                                 
Unused             P2.9                                                                 
Unused             P2.10

CC3100            CC3100             FR5969            FR6989              F5529
Booster             Right Side         Right Side         Right Side         Right Side
Pack                 Inner Row          No Header        Inner Row          Inner Row
Pack                 Inner Row          No Header        Circuit Side       Circuit Side
Unused             P4.1                                                                 
Unused             P4.2                                                                 
Unused             P4.3                                                                 
UART1_CTS      P4.4                 No Header                    P3.6                 P1.4
UART1_RTS      P4.5                 No Header                    P3.7                 P1.3
Unused             P4.6                                                                 
NWP_Log_TX   P4.7                 No Header                    P1.3                 P4.3
NWP_Log_TX   P4.8                 No Header                    P3.0                 P4.0
Unused             P4.9                                                                 
Unused             P4.10

Launch              Pad                  FR5969                      FR6989             F5529
                                                                         
Lnch Pad Bck-ch-Uart Rx           P2.0                             P3.4                 P4.4
                                                eUSCI_A0                     USCI_A1           USCI_A1
Lnch Pad Bck-ch-Uart Tx           P2.1                             P3.5                 P4.5
                                                eUSCI_A0                     USCI_A1           USCI_A1
Lnch Pad Bck-ch-Uart RTS         P4.1                             P3.1                 P6.7
Lnch Pad Bck-ch-Uart CTS         P4.0                             P3.0                 P1.7


//LH 10-11-2018 this is the cli-uart I got from TI Michael Reymond in reply to my post
// I am using it as a base to try and create a working version for the FR6989
// To date this code compiles clean, runs, but does not write to the back channel com port
/*
 * cli_uart.c - msp430fr5969 launchpad application uart interface implementation
 *


//*****************************************************************************
//
//! \addtogroup CLI_UART
//! @{
//
//*****************************************************************************

#include <cli_uart/cli_uartFR6989LH.h>
#include <string.h>
#include <msp430.h>


//FR5969 use UCA0 but FR6989 uses UCA1
//#define UCA0_OS   1    /* 1 = oversampling mode, 0 = low-freq mode */
//#define UCA0_BR0  17   /* Value of UCA0BR0 register */
//#define UCA0_BR1  0    /* Value of UCA0BR1 register */
//#define UCA0_BRS  0    /* Value of UCBRS field in UCA0MCTL register */
//#define UCA0_BRF  6    /* Value of UCBRF field in UCA0MCTL register */

#define UCA1_OS   1    /* 1 = oversampling mode, 0 = low-freq mode */
#define UCA1_BR0  17   /* Value of UCA1BR0 register */ //Baud rate zero
#define UCA1_BR1  0    /* Value of UCA1BR1 register */  //Baud rate 1
#define UCA1_BRS  0    /* Value of UCBRS field in UCA1MCTL register */
#define UCA1_BRF  6    /* Value of UCBRF field in UCA1MCTL register */

#define ASCII_ENTER     0x0D

//LH 10-16-2018 added this next line as it appears to not be defined, as code skips over it
#define _USE_CLI_     1

#ifdef _USE_CLI_
unsigned char *g_ucUARTBuffer;
int cli_have_cmd = 0;
#endif /* _USE_CLI_ */

/*!
    \brief          Application Uart interrupt handler

    \param[in]      none

    \return         none

    \note

    \warning
*/

//TI help posting myUART_05-FR6989 show P2.0 P2.1 are for EUSCI_A0_BASE
 //Looking at the launch pad see that it is using P3.4 and P3.5 so EUSCI_A1
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
//#pragma vector=USCI_A0_VECTOR
//__interrupt
//#elif defined(__GNUC__)
//__attribute__((interrupt(USCI_A0_VECTOR)))
//#endif
//void UART_ISR(void)
//{
//    switch(__even_in_range(UCA0IV,0x08))
//    {
//        case 0:break;                             /* Vector 0 - no interrupt */
//        case 2:                                   /* Vector 2 - RXIFG */
//#ifdef _USE_CLI_
//            *g_ucUARTBuffer = UCA0RXBUF;
//            if (*g_ucUARTBuffer == ASCII_ENTER)
//            {
//                cli_have_cmd = 1;
//                *g_ucUARTBuffer = 0x00;
//                __bic_SR_register_on_exit(LPM0_bits);
//            }
//            g_ucUARTBuffer++;
//#endif /* _USE_CLI_ */
//            __no_operation();
//            break;
//        case 4:break;                             /* Vector 4 - TXIFG */
//        default: break;
//    }
//}

//LH 10-16-2018 to use A1 vector
#pragma vector=USCI_A1_VECTOR
__interrupt
#elif defined(__GNUC__)
__attribute__((interrupt(USCI_A1_VECTOR)))
#endif
void UART_ISR(void)
{
    switch(__even_in_range(UCA1IV,0x08))
    {
        case 0:break;                             /* Vector 0 - no interrupt */
        case 2:                                   /* Vector 2 - RXIFG */
#ifdef _USE_CLI_
            *g_ucUARTBuffer = UCA1RXBUF;
            if (*g_ucUARTBuffer == ASCII_ENTER)
            {
                cli_have_cmd = 1;
                *g_ucUARTBuffer = 0x00;
                __bic_SR_register_on_exit(LPM0_bits);
            }
            g_ucUARTBuffer++;
#endif /* _USE_CLI_ */
            __no_operation();
            break;
        case 4:break;                             /* Vector 4 - TXIFG */
        default: break;
    }
}

int
CLI_Read(unsigned char *pBuff)
{
    if(pBuff == NULL)
        return -1;

#ifdef _USE_CLI_
    cli_have_cmd = 0;
    g_ucUARTBuffer = pBuff;
    //FR5969 use UCA0 but FR6989 uses UCA1
//    UCA0IE |= UCRXIE;
    UCA1IE |= UCRXIE;

    __bis_SR_register(LPM0_bits + GIE);

    while(cli_have_cmd == 0)
        ;
    //FR5969 use UCA0 but FR6989 uses UCA1
//    UCA0IE &= ~UCRXIE;
    UCA1IE &= ~UCRXIE;
    return strlen((const char *)pBuff);
#else /* _USE_CLI_ */
    return 0;
#endif /* _USE_CLI_ */
}

int
CLI_Write(unsigned char *inBuff)
{
    if(inBuff == NULL)
        return -1;

#ifdef _USE_CLI_  //LH10-15-2018 it was just skipping this so comment out so must do the code when called
    unsigned short ret,usLength = strlen((const char *)inBuff);
    ret = usLength;
    while (usLength)
    {
        //FR5969 use UCA0 but FR6989 uses UCA1
//        while (!(UCA0IFG & UCTXIFG)) ;
//        UCA0TXBUF = *inBuff;
        while (!(UCA1IFG & UCTXIFG)) ;
        UCA1TXBUF = *inBuff;
        usLength--;
        inBuff++;
    }
    return (int)ret;
//#else /* _USE_CLI_ */
//    return 0;
#endif /* _USE_CLI_ */
}

void
CLI_Configure(void)
{
#ifdef _USE_CLI_ //LH 10-15-2018 5:23PM when main calls config it just skips over this, why?? so comment out the if
    PM5CTL0 &= ~LOCKLPM5;           /* Disable the GPIO power-on default high-impedance mode
                                       to activate previously configured port settings */
//FR5969 Uart Pins P2.0 = Tx, P2.1 = RX
    //TI help posting myUART_05-FR6989 show P2.0 P2.1 are for EUSCI_A0_BASE
    //So let me try these pins as the Interrupt vector above is for EUSCI_A0
    //Looking at the launch pad see that it is using P3.4 and P3.5 so EUSCI_A1
//    P2SEL1 |=   (BIT0 + BIT1);      /* P2.0,1 = USCI_A0 TXD/RXD
//                                       (Setting UART pins on P2.0 and P2.1 )            */
//    P2SEL0 &=   ~(BIT0 + BIT1);

//    UCA0CTLW0 |= UCSWRST;           /* Put state machine in reset */
//    UCA0CTL0 = 0x00;
//
//    UCA0CTLW0 = UCSSEL__SMCLK + UCSWRST;    /* Use SMCLK, keep RESET */
//                                            /* 8MHz/115200 =0x45 (see User's Guide) */
//    UCA0BRW = 0x341;                        /* 8MHz/9600= 833 =0x341 (see User's Guide) */
//
//    UCA0MCTLW = 0;
//
//    UCA0CTLW0 &= ~UCSWRST;                  /* Initialize USCI state machine */

//FR6989 Uart Pins P3.4 = Tx, P3.5 = RX
    //TI help posting myUART_05-FR6989 show P3.4 P3.5 are for EUSCI_A1_BASE
    P3SEL1 |=   (BIT4 + BIT5);      /* P2.0,1 = USCI_A0 TXD/RXD
                                       (Setting UART pins on P2.0 and P2.1 )            */
    P3SEL0 &=   ~(BIT4 + BIT5);

    UCA1CTLW0 |= UCSWRST;           /* Put state machine in reset */
    UCA1CTL0 = 0x00;

    UCA1CTLW0 = UCSSEL__SMCLK + UCSWRST;    /* Use SMCLK, keep RESET */
                                            /* 8MHz/115200 =0x45 (see User's Guide) */
    UCA1BRW = 0x341;                        /* 8MHz/9600= 833 =0x341 (see User's Guide) */

    UCA1MCTLW = 0;

    UCA1CTLW0 &= ~UCSWRST;                  /* Initialize USCI state machine */

    /* Disable RX Interrupt on UART */
    //FR5969 use UCA0 but FR6989 uses UCA1
//    UCA0IFG &= ~ (UCRXIFG | UCRXIFG);
//    UCA0IE &= ~UCRXIE;
    UCA1IFG &= ~ (UCRXIFG | UCRXIFG);
    UCA1IE &= ~UCRXIE;
#endif /* _USE_CLI_ */
}

Lorne

  • Hi Lorne,
    As a conclusion, your main issue is the MSP430FR6989 UART communication failure with the CC3100. Is it right?
    If it is the UART failure, there are several things you can check.
    1. check the UART output function on FR6989
    2. check CC3100's command sequence

    Best regards,
    Cash Hao
  • How to solve the Linking undefined symbol MPUSEG, _mpusam, _mpuseg?

    Here is the context
    - My Ultimate goal: Add CC3100 WiFi to my FR6989 products
    - CC3100_sdk_1.3.0, CCS_8.2.0, Compiler TIv18.1.3.LTS

    Approach since no TI "email on the FR6989 example" exists: Merge two working projects:
    I took a working copy of "myUART_05_example.zip …for the FR6989" and added in the working files from the F5529 -CC3100 email example

    - Per the instructions I have created my own local copy of user.h (not linked to the CC3100_sdk library or since it is a linked file it will change the base file and break all other examples and projects)
    - I copied all of the body from the original user.h but then had to change my copy to link to my new copies of 1) board, 2) cli_uart, 3)spi
    - The pins and instance of the uarts and spi are different for each of the launch pads (see table in yesterdays posting)
    - I created boardFR6989.C and .h, cli_uartFR6989.c and .h, spiFr6989.c and .h, and uart_FR6989_CC3100.c and .h
    - So these are all local files ONLY to the project and NOT linked back to the "CC3100_sdk_1.3.0 F5529 email example" as otherwise the example files would all get changed

    - It compiles OK….no files marked RED with errors but I get this LINK error
    Building target: "myUART_05-FR6989_WiFi-email-10-18-2018.out"

    Invoking: MSP430 Linker
    <Linking>

    ***I truncated the console output as it does 10's of line successfully………

    Here are the last 3 lines before the error
    "./simplelink/source/netapp.obj" "./simplelink/source/netcfg.obj" "./simplelink/source/nonos.obj" "./simplelink/source/socket.obj" "./simplelink/source/spawn.obj" "./simplelink/source/wlan.obj" "./spi/spiFR6989LH.obj" "./uart_CC3100/uart_FR6989_CC3100.obj" "../lnk_msp430fr6989.cmd"  -llibc.a -llibmpu_init.a -llibmath.a  
     undefined first referenced                                                                                                          
      symbol       in file                                                                                                              
     --------- ----------------                                                                                                          
     MPUSEG    C:\ti\Code-Com-Stud-8-2-10-2-2018\ccsv8\tools\compiler\ti-cgt-msp430_18.1.3.LTS\lib\rts430x_lc_rd_eabi.lib<mpu_init.c.obj>
     __mpusam  C:\ti\Code-Com-Stud-8-2-10-2-2018\ccsv8\tools\compiler\ti-cgt-msp430_18.1.3.LTS\lib\rts430x_lc_rd_eabi.lib<mpu_init.c.obj>
     __mpuseg  C:\ti\Code-Com-Stud-8-2-10-2-2018\ccsv8\tools\compiler\ti-cgt-msp430_18.1.3.LTS\lib\rts430x_lc_rd_eabi.lib<mpu_init.c.obj>
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "myUART_05-FR6989_WiFi-email-10-18-2018.out" not built



    This posting provides a link to wiki page which provides working UARTs for these launch pad.
    The FR6989 UART works and the code is very well written and documented
    https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/465550?help-MSP430FR6989-launchpad-deverlopment-UART
    http://processors.wiki.ti.com/index.php/MSP_UART

    myUART_05_example.zip …for the FR6989


    Thanks for your help,
    With your help some day all user will have access to a working example of "FR6989 - CC3100 - WiFi email" as I will post the solution once we jointly create this solution.
    (Or even better, TI post a working solution!)

    Lorne

  • Hi Lorne,
    Any updates on this post? Is the linking undefined symbol MPUSEG, _mpusam, _mpuseg still a problem?

    Best regards,
    Cash Hao
  • Hi Cash,

         We understand that the "MPUSEG, _mpusam, _mpuseg" has to do with the memory protection unit in the FR6989. We spent several days researching what may be causing the problem, but we were unable to solve the problem.

         Due to time pressure to get the product released before Thanksgiving, and other higher priority projects we need to complete, we have temporality put Wi-Fi functionality with this FR6989 product on hold.

       We have advised early customers that we have CC3100 Wi-Fi on other products, but at this time we have not been able to get it to work with the TI FR6989. We have advised them that we have been in contact with TI, but to date TI has not been able to provide a working example of the FR6989 working with the CC3100 Wi-FI module to doing any sort of Wi-Fi example or send an email. We have advised them that we hope to provide this in a future release in 2019, or sooner should TI be able to provide a solution.

       Cash if anyone in TI could provide a working archieved CCS example of the FR6989 working with the CC3100 we would be very grateful as would our customers.

    PS We like working with TI products so help keep us as a loyal customer.

    Lorne

**Attention** This is a public forum