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.

Reg Support for MSP430FR2633 Programming

Other Parts Discussed in Thread: MSP430FR2633, TIDM-CAPTIVATE-64-BUTTON

Dear team,

We have plan to upgrade our cap sence touch key pad to capTIvate (MSP430FR2633)   technology. Now we are using MSP-EXP430G2 launch pad for programming the MSP430FR2633 controller thru spy by wire but it is not working as intended. Kindly suggest to proceed further.

Regards,

Hemantha

  • Hi Hemantha,

    Please refer to  document 

    Regards,

    Ling

  • G2 LP is with old and not updatable eZ-FET on board, that is limited to some of 2xx flash family members. To support all TI SBW devices shoud be used any new LP with eZ-FET Lite on board, for example 5529 LP, or LP that have on board target device similar to one that you are using.
  • Hi Ling and Soli,

    Thanks for your support on previous conversation.

    Now we loaded the MSP430FR2633 conroller for test blinkled. Now we are try to load the capTivate touch basic demo source code from ti sites and its flashed but it is not working as intended the controller restarts Internally after initalization of clock(BSP_configureMCU(void) ). so please support for this issues on touch control of msp430 ASAP.

    Regards,

    Hemantha Kumara
  • Thanks for your help .
  • Hi Hemantha,

    What demo source code are you using? It is recommended to use CapTIvate Design Center to generate basic touch source code.

    Regards,
    Ling
  • Hi Ling,

    Thanks for your support,
    I can able to debug on board there is no issues on that. However my issue is that I can't get the corresponding UART output with that source. I got the source code from ti sites, Basic code flashed successfully while I touch on the any one of the key from 64 button the led1's is blink if i multi touch an board both led 1 and led 2 are blink, Now I want that touch sense data in UART. Wright now i get the UART value but it not related on touch sense it may be a garbage value on it so I need a touch output in UART (with BuadRate) please give me a solution for this issues ASAP.

    Note: I can able to send UART code separately link a test source. But I didn't get proper in CAPTIVATE-64-BUTTON UART's output and we struggle on that source only TIDM-CAPTIVATE-64-BUTTON Software.

    For added info:
    From beginning the ti sites code( TIDM-CAPTIVATE-64-BUTTON Software ) is not working so I changed the watchdog timer configuration to stop on it
    WDT_A_hold(WDT_A_BASE); change with WDTCTL = WDTPW | WDTHOLD;
    then only the source code runs as per touch the led blinks.But I can't get corresponding UART output.

    Awaiting for your reply Ling .

    Please help us to share your feedback on to resolve the issue .

    Thanks and regards ,
    Hemantha Kumara N K
  • Hello Hemantha,

    I modified the TIDM-CAPTIVATE-64-BUTTON_BasicDemo code so you can now send the touched button information through UART with your own package formatting.

    Here is what you will need to do:

    1.Go to project properties in CCS and add the include options:     
       ${PROJECT_ROOT}/captivate/COMM/Serial_Drivers   (See picture below)

    2.Copy the main.c code to replace your main.c in your project. Make sure to keep a copy of your main.c as backup.

    5808.main.c
    /* --COPYRIGHT--,BSD
     * Copyright (c) 2014, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     * --/COPYRIGHT--*/
    
    //*****************************************************************************
    // Development main.c for MSP430FR26xx_25xx
    //
    // This starter application initializes the CapTIvate touch library
    // for the touch panel specified by CAPT_UserConfig.c/.h via a call to
    // CAPT_appStart(), which initializes and calibrates all sensors in the
    // application, and starts the CapTIvate interval timer.
    //
    // Then, the capacitive touch interface is driven by calling the CapTIvate
    // application handler, CAPT_appHandler().  The application handler manages
    // whether the user interface (UI) is running in full active scan mode, or
    // in a low-power wake-on-proximity mode.
    //
    // The CapTIvate application handler will return true if proximity was
    // detected on any of the sensors in the application. After the application
    // handler, the number of touches detected on the sensor will be counted.
    // If a single touch is detected, only LED1 will light up. If multiple
    // touches are detected, both LED1 and LED2 light up.
    //
    // \version 1.01.01.00
    // Released on Thu, Oct 15, 2015 12:27:24 AM
    //
    //*****************************************************************************
    
    //*****************************************************************************
    //! \addtogroup Basic_Demo_Main
    //! @{
    //*****************************************************************************
    
    #include <msp430.h>                      // Generic MSP430 Device Include
    #include "driverlib.h"                   // MSPWare Driver Library
    #include "captivate.h"                   // CapTIvate Touch Software Library
    #include "CAPT_App.h"                    // CapTIvate Application Code
    #include "CAPT_BSP.h"                    // CapTIvate EVM Board Support Package
    #include "UART.h"
    
    //*****************************************************************************
    //
    //! \brief Size of the general purpose data packet
    //
    //*****************************************************************************
    #define ROW_PACKET_SIZE 2
    
    //*****************************************************************************
    //
    //! \brief Index of keypad in sensor list
    //
    //*****************************************************************************
    #define KEYPAD_SENSOR 0
    
    //*****************************************************************************
    //
    //! \brief General purpose data packet used in testing/debug
    //
    //*****************************************************************************
    
    void Test_callbackHandler(tSensor* pSensor);
    #define Test_Pakage_Size (2)
    
    void main(void)
    {
    
    	//
    	// Initialize the MCU
    	// BSP_configureMCU() sets up the device IO and clocking
    	// The global interrupt enable is set to allow peripherals
    	// to wake the MCU.
    	//
    	//WDT_A_hold(WDT_A_BASE);
    	WDTCTL = WDTPW | WDTHOLD;
    	BSP_configureMCU();
    	__bis_SR_register(GIE);
    	MAP_CAPT_registerCallback(&keypad64Button,
    	                    &Test_callbackHandler);
    	//
    	// Start the CapTIvate application
    	//
    	CAPT_appStart();
    
    	//
    	// Background Loop
    	//
    	while(1)
    	{
    		//
    		// Run the captivate application handler.
    		//
    		CAPT_appHandler();
    
    		//
    		// Background application that keeps track
    		// of the number of buttons on the sensor
    		// that are currently in a touch state.
    		//
    		if(g_uiApp.pSensorList[0]->bSensorTouch)
    		{
    			uint8_t cycle, element, touchCount = 0;
    
    			for(cycle = 0; cycle < g_uiApp.pSensorList[KEYPAD_SENSOR]->ui8NrOfCycles; cycle++)
    			{
    				for(element = 0; element < g_uiApp.pSensorList[KEYPAD_SENSOR]->pCycle[cycle]->ui8NrOfElements; element++)
    				{
    					if(g_uiApp.pSensorList[KEYPAD_SENSOR]->pCycle[cycle]->pElements[element]->bTouch)
    					{
    						touchCount++;
    					}
    				}
    			}
    
    			LED1_ON;
    			if(touchCount > 1)
    			{
    				LED2_ON;
    			}
    			else
    			{
    				LED2_OFF;
    			}
    		}
    		else
    		{
    			LED1_OFF;
    			LED2_OFF;
    		}
    
    
    
    		//
    		// End of background loop iteration
    		// Go to sleep if there is nothing left to do
    		//
    		CAPT_appSleep();
    		
    	} // End background loop
    } // End main()
    
    //*****************************************************************************
    //! Close the doxygen group
    //! @}
    //*****************************************************************************
    
    void Test_callbackHandler(tSensor* pSensor)
    {
    
        static uint8_t Touched_Button[Test_Pakage_Size];
    
        Touched_Button[0] = 0;
        Touched_Button[1] = 0xAA;
    
    
                if (g_uiApp.pSensorList[0]->pCycle[0]->pElements[0]->bTouch == true)
                {
                    Touched_Button[0] |= 0x01;
                }
                if (g_uiApp.pSensorList[0]->pCycle[1]->pElements[0]->bTouch == true)
                {
                    Touched_Button[0] |= 0x02;
                }
                if (g_uiApp.pSensorList[0]->pCycle[0]->pElements[1]->bTouch == true)
                {
                    Touched_Button[0] |= 0x04;
                }
                if (g_uiApp.pSensorList[0]->pCycle[1]->pElements[1]->bTouch == true)
                {
                    Touched_Button[0] |= 0x08;
                }
                if (g_uiApp.pSensorList[0]->pCycle[0]->pElements[2]->bTouch == true)
                {
                    Touched_Button[0] |= 0x10;
                }
                if (g_uiApp.pSensorList[0]->pCycle[1]->pElements[2]->bTouch == true)
                {
                    Touched_Button[0] |= 0x20;
                }
                if (g_uiApp.pSensorList[0]->pCycle[0]->pElements[3]->bTouch == true)
                {
                    Touched_Button[0] |= 0x40;
                }
                if (g_uiApp.pSensorList[0]->pCycle[1]->pElements[3]->bTouch == true)
                {
                    Touched_Button[0] |= 0x80;
                }
                if(pSensor->bSensorTouch == false)
                {
                    Touched_Button[0] = 0;
                }
    
          UART_transmitBuffer(Touched_Button, Test_Pakage_Size);
    }
    
    

    2.Now if you use a logic analyzer to probe the UART TX pin you should be able to see the package. The baud rate is 250000.
     
    3.Here is the package format I am using as a example. (You can change this based on your host processor in void Test_callbackHandler(tSensor* pSensor) function. )
    So if the button E1 and E5 are being touched, you will see 0x11 0xAA
         if the button E2 and E3 and E7 are being touched, you will see 0x46 0xAA

    Thanks,

    Yiding

**Attention** This is a public forum