Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all 22733 articles
Browse latest View live

MSP430G2452: 430BOOST-SENSE1 GUI Installation

$
0
0

Part Number:MSP430G2452

TI Friends & Family,

There are many previous threads such as this one, that discuss the 430BOOST-SENSE1 GUI installation:

Most underlying questions surround how to get the GUI.exe working.  While TI has since released better Capacitive Touch MCUs and corresponding GUI tools (such as the CapTIvate Design Center, many still desire to get the older 430BOOST-SENSE1 board working alongside the GUI.

Here are some additional steps to be followed (note the MSP Touch Pro GUI installation reference):

- As noted previously, please install the latest Java support.  V1.8 is preferred.  You can enter java -version at a Windows cmd prompt if you do not know if or what version you have installed locally

-Please follow the installation steps found in the 430BOOST-SENSE1 User Guide here:  

- Please also install the 430 Touch Pro GUI prior (this will help to enable various Windows DLLs and such required for the BOOST GUI also)

-Windows7 is supported.  This has been tested on many such Win7 machines, including Dell laptops and desktops.

Some users may still experience installation issues thus preventing the GUI from operating.  Lastly, a try on another machine is worth the time and effort.  Simply copying and installing the MSP-EXP430G2 Software Examples and MSP Touch Pro software should enable the CapTouch_BoosterPack_UserExperience GUI once and for all!

Good luck,

CY


CCS/MSP430FR2433: MSP430FR2433 #35 Error Directive with CCS version 6.1.300033

$
0
0

Part Number:MSP430FR2433

Tool/software: Code Composer Studio

After many years of designing with MSP430Gxxx ICs using CCS, I decided to use the MSP430FR2433 on my latest design.

Everything seemed to work except for SPI communications. I had no problem compiling and testing software using my version of CCS.

So after spending a day looking at the differences and making several changes, I decided to download the latest version of CCS for my 32bit PC [version 6.1.300033].

After updating CSS I now get #35 #error directive: "Failed to match a default include file" on line 1784. I checked msp430fr2433.h and found 1784 is  #define TA1IV_3  (0x006)  /* Reserved */.

I tried several of the MSP430FR2433 demo files and even the simple msp430fr243x_1.c Blink LED routine - same error appears.

If I compile my existing MSP430G software, this error does not happen.  Is there a problem with the msp430fr2433.h file?

CCS/MSP-EXP432E401Y: Is there a simple procedure to use MSP-BSL programmer "BSL Rocket" to flash firmware image to the MSP-EXP432E401Y

$
0
0

Part Number:MSP-EXP432E401Y

Tool/software: Code Composer Studio

The MSP-EXP432E401Y development board has a BSL connector to connect the MSP-BSL programmer (also called BSL Rocket)  for
the purpose of downloading the firmware to the flash of the MSP432E4.

I have read many documents trying to figure out the procedure to use the BSL Rocket for programming the flash of the MSP432E4, but I could not figure out what I need to do.

Questions:

- It seemed to me that TI does not provide software tools to easily allow the user to flash the MSP432E4 using the the BSL Rocket programmer.
Is TI expected that the users need to develop the tools themselves for that purpose? If so, please advice me the steps that I need to do to develop the tools..
If not, show me the procedure how I easily use the BSL Rocket programmer for flashing the MSP432E.

Thank you very much.

Long

MSP430FR5994: LaunchPad code behavior I need help understanding.

$
0
0

Part Number:MSP430FR5994

Hello everyone,
I am coming up the learning curve on the MSP430FR5994 and ran into two problems neither of which I can explain and need some help to understand. The code is rather simple, it simply uses the BCL UART to respond with " hello world " whenever a character "a" is typed on the CCS's terminal (any character other than "a" is ignored). This code works (with many thanks to Bruce and Matt). However, I am puzzled that the code stops functioning when I comment out a P5IFG = 0x00; statement inside the initGPIO function. I highlighted the problem statement in yellow. As is, the code works. Comment out the statement and it stops. Moving the statement outside of the function and into the main function doesn't change the behavior. The statement needs to be in the initGPIO function for some reason. Any ideas as to what's happening? 
1) The second problem is that Port5 interrupts from the two button on the Launchpad (P5.6 and P5.5) aren't being recognized when pressed. Did I lock up the port somehow? . Any help here would also be greatly appreciated. 
 
#include "driverlib.h"
uint32_t myMCLK = 0;
uint32_t mySMCLK = 0;
uint32_t myACLK = 0;
volatile uint8_t i;
volatile uint8_t j;
const char UCA0_string[] = {" Hello World "};
extern int mode;
extern int pingHost;
uint8_t RXData = 0;                               // UART Receive byte
int mode = 0;                                     // mode selection variable
int pingHost = 0;                                 // ping request from PC GUI
int noSDCard = 0;
Calendar calendar;                                // Calendar used for RTC

void initClocks (void){

   // Set DCO frequency to 8 MHz
   CS_setDCOFreq(CS_DCORSEL_0, CS_DCOFSEL_6);
   //Set external clock frequency to 32.768 KHz
   CS_setExternalClockSource(32768, 0);
   //Set ACLK=LFXT
   CS_initClockSignal(CS_ACLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
   // Set SMCLK = DCO with frequency divider of 1
   CS_initClockSignal(CS_SMCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
   // Set MCLK = DCO with frequency divider of 1
   CS_initClockSignal(CS_MCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
   //Start XT1 with no time out
   CS_turnOnLFXT(CS_LFXT_DRIVE_3);
   myACLK=CS_getACLK();
   mySMCLK=CS_getSMCLK(); //8MHz
   myMCLK=CS_getMCLK();   //16MHz
}
initTimers(void){
    myACLK=CS_getACLK();   //10KHZ
    Timer_A_initContinuousModeParam initA0 = {0}; //initializer selects TB1
    initA0.clockSource=TIMER_A_CLOCKSOURCE_ACLK;
    initA0.clockSourceDivider=TIMER_A_CLOCKSOURCE_DIVIDER_1;
    initA0.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
    initA0.timerClear=TIMER_A_DO_CLEAR;
    initA0.startTimer=false;
    Timer_A_initContinuousMode(TIMER_A0_BASE,&initA0);
    __bis_SR_register(GIE);
}
void Init_BCL_UART()
{
    // Configure UART
    EUSCI_A_UART_initParam param = {};
    param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK;
    param.clockPrescalar = 3;  //set for 32.768KHz
    param.firstModReg = 0;
    param.secondModReg =  0x92; //3;//0x92;
    param.parity = EUSCI_A_UART_NO_PARITY;
    param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
    param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
    param.uartMode = EUSCI_A_UART_MODE;
    param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION;
    if(STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param))
        return;
    EUSCI_A_UART_enable(EUSCI_A0_BASE);
    EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE,EUSCI_A_UART_RECEIVE_INTERRUPT);

       // Enable USCI_A0 RX interrupt
    EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
                                    EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt
    myACLK=CS_getACLK();
    mySMCLK=CS_getSMCLK(); //8MHz
    myMCLK=CS_getMCLK();   //16MHz
}
void initGPIO()
{
        // Set all GPIO pins to output low for low power
        GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P2,           GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P3, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P4,           GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P5, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|                    GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P6, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P7, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_P8, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setOutputLowOnPin(GPIO_PORT_PJ, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7|GPIO_PIN8|GPIO_PIN9|GPIO_PIN10|GPIO_PIN11|GPIO_PIN12|GPIO_PIN13|GPIO_PIN14|GPIO_PIN15);
        GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P3, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P4, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P5, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|                    GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P6, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P7, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_P8, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);
        GPIO_setAsOutputPin(GPIO_PORT_PJ, GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3|GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7|GPIO_PIN8|GPIO_PIN9|GPIO_PIN10|GPIO_PIN11|GPIO_PIN12|GPIO_PIN13|GPIO_PIN14|GPIO_PIN15);
        // Set PJ.4 and PJ.5 as Primary Module Function Input, LFXT.
        GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_PJ,GPIO_PIN4 + GPIO_PIN5,GPIO_PRIMARY_MODULE_FUNCTION);

    // Setup P1.0 and P1.1 LED
    GPIO_setAsOutputPin(GPIO_PORT_P1,GPIO_PIN0);
    GPIO_setAsOutputPin(GPIO_PORT_P1,GPIO_PIN1);
    //turn off leds
    GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);
    GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN1);
    // Setup P5.5 and P5.6 as input buttons
    GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P5,GPIO_PIN5);
    GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P5,GPIO_PIN6);
    GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P5, GPIO_PIN5,GPIO_PRIMARY_MODULE_FUNCTION);
    GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P5, GPIO_PIN6,GPIO_PRIMARY_MODULE_FUNCTION);
    GPIO_selectInterruptEdge(GPIO_PORT_P5,GPIO_PIN5,GPIO_HIGH_TO_LOW_TRANSITION);
    GPIO_selectInterruptEdge(GPIO_PORT_P5,GPIO_PIN6,GPIO_HIGH_TO_LOW_TRANSITION);
    //P5IE = 0x60; //enable interrupts on P5.5 and P5.6
    GPIO_enableInterrupt(GPIO_PORT_P5,GPIO_PIN5);
    GPIO_enableInterrupt(GPIO_PORT_P5,GPIO_PIN6);
    //setup BCL UART Pins
    // Configure P2.0 - UCA0TXD and P2.1 - UCA0RXD
    GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P2, GPIO_PIN0, GPIO_SECONDARY_MODULE_FUNCTION);
    GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P2, GPIO_PIN1, GPIO_SECONDARY_MODULE_FUNCTION);
    //enable interrupts
    // commenting out the function below causes the EUSCI_A_UART to stop working.EUSCI_A_UART uses P2.0 & P2.1
    P5IFG = 0x00; //clear all Port 5 interrupt flags
    // Disable the GPIO power-on default high-impedance mode
    // to activate previously configured port settings
    //PMM_unlockLPM5();
}
void Init_RTC()
{
    //Setup Current Time for Calendar
    calendar.Seconds    = 0x55;
    calendar.Minutes    = 0x30;
    calendar.Hours      = 0x04;
    calendar.DayOfWeek  = 0x01;
    calendar.DayOfMonth = 0x30;
    calendar.Month      = 0x04;
    calendar.Year       = 0x2014;
    // Initialize RTC with the specified Calendar above
    RTC_C_initCalendar(RTC_C_BASE,&calendar,RTC_C_FORMAT_BCD);
    RTC_C_setCalendarEvent(RTC_C_BASE,RTC_C_CALENDAREVENT_MINUTECHANGE);
    RTC_C_clearInterrupt(RTC_C_BASE,RTC_C_TIME_EVENT_INTERRUPT);
    RTC_C_enableInterrupt(RTC_C_BASE,RTC_C_TIME_EVENT_INTERRUPT);
    //Start RTC Clock
    RTC_C_startClock(RTC_C_BASE);
}

int main(void) {
    WDT_A_hold(WDT_A_BASE);
    initGPIO();
    initClocks();
    initTimers();
    Init_BCL_UART();
    //P5IFG = 0x00;
 /*
    SDCardLib_setRTCTime(SDCardLib * lib, Calendar *curTime);
    SDCardLib_detectCard(SDCardLib * lib);

    SDCardLib_createDirectory(SDCardLib * lib, char * directoryName);
    SDCardLib_writeFile(SDCardLib * lib,
                               char * fileName, char *buffer, uint16_t bufsize,
                               uint16_t *actualsize);

    return (0);
*/
       PMM_unlockLPM5();   // Enable output pin settings - disable the GPIO power-on default high-impedance mode
      // PM5CTL0 &= ~LOCKLPM5;
       //start timer B1 and its interrupt
       Timer_A_startCounter(TIMER_A0_BASE,TIMER_A_CONTINUOUS_MODE);
       Timer_A_enableInterrupt(TIMER_A0_BASE);

        UCA0IE |= UCRXIE; //enable only receive interrupts
      //__bis_SR_register(GIE);//enable interrupts
       __enable_interrupt();

       while(1)
       {
           volatile uint8_t k;
           //EUSCI_A_UART_transmitData(EUSCI_A0_BASE,'K');
       }
}

#pragma vector = USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
{
    switch(__even_in_range(UCA0IV,18))
    {
        case 0x00: // Vector 0: No interrupts
            break;
        case 0x02: // Vector 2: UCRXIFG
            if (UCA0RXBUF =='a'){
                i=0;
                UCA0IE |= UCTXIE; //received "a", enable transmit response
                UCA0TXBUF = UCA0_string[j];
            }
            break;
        case 0x04:  // Vector 4: UCTXIFG
            UCA0TXBUF = UCA0_string[j++];
           if (j==   sizeof(UCA0_string) - 1) {
                UCA0IE &= ~UCTXIE;
            }
           if(j>= sizeof(UCA0_string))j=0;
        break;
        case 0x06:  // Vector 6: UCSTTIFG
            break;
        case 0x08:  // Vector 8: UCTXCPTIFG
            break;
        default: break;
    }
}
#pragma vector=TIMER0_A1_VECTOR
__interrupt void TIMER_A0_ISR(void)
{
    switch(__even_in_range(TA0IV, 14))
    {
        case 0:                         // none
            break;
        case 2:                         // CCR1 IFG
            break;
        case 4:                         // CCR2 IFG
            break;
        case 6:                         // CCR3 IFG
            break;
        case 8:                         // CCR4 IFG
            break;
        case 10:                        // CCR5 IFG
            break;
        case 12:                        // CCR6 IFG
            break;
        case 14:                        // TAOIFG
            GPIO_toggleOutputOnPin(GPIO_PORT_P1,GPIO_PIN0);
            Timer_A_clearTimerInterrupt(TIMER_A0_BASE);
            break;
        default:                        // never executed
            break;
    }
}
#pragma vector=PORT5_VECTOR
__interrupt void ISR_P5_Handler (void){
  switch (P5IFG)
        {
            case 0x20:                  //P5.5 interrupt
                P5IFG &= ~BIT5;         //clear IFG
                P1OUT |= BIT1;          //Grn LED port 1.1
                _delay_cycles(80000);   //wait
                P1OUT &= ~BIT1;         //Turn Off LED
                break;
            case 0x40:                  //P5.6 interrupts
                P5IFG &= ~BIT6;         //clear IFG
                int i;
                for (i=3;i>0;i-- ){     //flash 3 times
                    P1OUT |= BIT1;      //Grn LED port 1.1
                    _delay_cycles(80000);
                    P1OUT ^= BIT1;
                    _delay_cycles(80000);
                }
                break;
            default:                    //Never executed
                break;
        }
}
/*
#pragma vector=PORT5_VECTOR
__interrupt void ISR_BUTTON_P55(void){
    _delay_cycles(1000); //wait for debounce
    //P1OUT &= ~BIT0;
    P5IFG = 0x00;       //clear Interrupt flag
    P5OUT |= BIT5;
    _delay_cycles(800000);
    P1OUT &= ~BIT0;
}
#pragma vector=PORT5_VECTOR
__interrupt void ISR_BUTTON_P56(void)
{
    _delay_cycles(10); //wait for debounce
    P1IFG = 0x00;//clear Interrupt flag
    P6OUT &= ~BIT6;
    for (j=6; j>0; j--) //three flashes - cycle through code twice per flash
        {
        P6OUT ^= BIT6;
        _delay_cycles(200000);//replace with timer
        }
    P5OUT &= ~BIT6;
    //test uart pragma
    //UCA1IE |= UCTXIE; //enable txie
}
*/
#pragma vector=RTC_VECTOR
__interrupt void RTC_ISR(void)
{
    switch(__even_in_range(RTCIV, 16))
    {
        case RTCIV_NONE: break;         //No interrupts
        case RTCIV_RTCOFIFG: break;     //RTCOFIFG
        case RTCIV_RTCRDYIFG: break;    //RTCRDYIFG
        case RTCIV_RTCTEVIFG:           //RTCEVIFG
            //Interrupts every 5 seconds
            __no_operation();           //for debugging
            __bic_SR_register_on_exit(LPM3_bits);    // exit LPM3
            break;
        case RTCIV_RTCAIFG: break;      //RTCAIFG
        case RTCIV_RT0PSIFG: break;     //RT0PSIFG
        case RTCIV_RT1PSIFG: break;     //RT1PSIFG
        default: break;
    }
}

CCS/MSP430FR2433: msp430fr2433

$
0
0

Part Number:MSP430FR2433

Tool/software: Code Composer Studio

Hi, 

I am using PORT Interrupts.

My Program is :

i) P2.7 is connected with switch (Interrupt).

ii) P3.2 is connected with LED.

When switch is pressed, LED will be on.

/*
* PORT2 VECTOR DEFINED=========================================================
*/

#pragma vector=PORT2_VECTOR
__interrupt void Port_2(void)
{
if (P2IFG & 0x80) {
P2IFG &= ~0x80; //P2.7 connected magnetic switch.
pattern=1;
__bic_SR_register_on_exit(LPM3_bits);
}

}

 


/*
* MAIN FUNCTION=================================================================
*/

int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

///LED DEFINE-----------------------------------------------------
// P3OUT &= ~BIT2; // Clear P1.0 output latch for a defined power-on state
  P3DIR |= BIT2 ; // Set P3.2 to output direction

//PORT INTERRUPT DEFINE------------------------------------------

P2DIR &= ~BIT7; //p7 --magnet, P2DIR &= ~BIT7;
P2IES |= BIT7; 
P2IFG &= ~BIT7;
P2IE |= BIT7;


PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode

/

 

//start----------------------------------------------------------------------
while(1)
{
__bis_SR_register(LPM3_bits+GIE);

if(pattern > 0)
{
pattern = 0 ;
P3OUT &= ~BIT2;                                 //LED is working, I tested it without interrupt in my customized board.
__delay_cycles(800000);
P3OUT |= BIT2;
}

}
//return 0;
}

 

Can anyone please tell me,

what mistake I am doing?

so that the Interrupt is not working.

 

Regards,

Srijit. 

 

MSP430G2553: Timer1 never enters A0 ISR

$
0
0

Part Number:MSP430G2553

I am trying to set up the Timer1 on my MSP, but I just can not figure out what the cause of my problems is.

I wrote a test program to see the Timer1 work. The program starts the Timer1 by pressing S2 over an ISR. Then the Timer is supposed to switch On and Off two LEDs with different frequencies.

My problems:

1. the ISR for CCR0 of Timer1 is never called and the REDLED always stays off.

2. The GREEN LED turns on, but does not turn off when S2 is pressed.

Can anyone help me with that?

#include<msp430g2553.h>

int mspON = 0;

void configClocks(void){
     BCSCTL1 = CALBC1_1MHZ;                    // Set range
     DCOCTL = CALDCO_1MHZ;                     // Set DCO step + modulation
     BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO
     IFG1 &= ~OFIFG;                           // Clear OSCFault flag
     BCSCTL2 = SELM_0;                         // MCLK = DCO = 1MHz - SMLCK = MCLK --> clocks are same, so that UART is sourced from SCLK and matches the example
}

//is stopped, MC_x must be set to continuous mode --> TA1CTL |= MC_2
void configTimerA1(void){
    TA1CTL = TASSEL_2 + ID_3 + MC_0 + TAIE;       //SMLOCK 1MHZ - input Divider 8 - MC Timer is in stop

    TA1CCR0 = 1250;
    TA1CCTL0 = 0;

    TA1CCR1 = 27500;           
    TA1CCTL1 = 0;

}

void main(void)
{
    WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

    configClocks();
    configTimerA1();

    P1DIR |= 0xF7;      // Set P1.0 to output direction
    P1OUT = 0;          // LED1 on
    P1IE |= BIT3;       // P1.3 interrupt enabled
    P1IES |= BIT3;      // P1.3 Hi/lo edge
    P1IFG &= ~BIT3;     // P1.3 IFG cleared
    P1OUT |= BIT3;
    P1REN |= BIT3;

    _BIS_SR(GIE); // Enter LPM4 w/interrupt

    while(1){}
}

// Port 1 interrupt service routine
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
    if(mspON){
        mspON = 0;
        TA1CTL &= ~MC_3;
    }
    else{
        mspON = 1;
        TA1CTL |= MC_2;
    }
    P1IFG &= ~BIT3; // P1.3 IFG cleared
}

#pragma vector=TIMER1_A0_VECTOR
__interrupt void Timer_A1 (void)
{
    TA1CCR0 += 1250;
    P1OUT ^= BIT0;
}

// TIMER1 -> access to timer A1; A1 access to CCR1
#pragma vector=TIMER1_A1_VECTOR
__interrupt void Timer_A1_1 (void)
{
    TA1CCR1 += 27500;
    P1OUT ^= BIT6;

    TA1CCTL1 &= ~CCIFG;
}

SW-DK-TM4C129X: UART DMA program to communicate with CC2564

$
0
0

Part Number:SW-DK-TM4C129X

Hi,

I am using Tiva C board TM4C129X and CC2564. I want to port a third party bluetooth stack on this setup. For that purpose I need to enable UART DMA.

Is there any code example to communicate between memory and bluetooth chip over urat dma?

Thanks and regards,

Bhagyashri

MSP430G2553: Maximum input frequency for ACLK?

$
0
0

Part Number:MSP430G2553

The only documentation I have seen regarding ACLK frequency is to use a 32 kHZ crystal, but I would like to clock it a bit faster.

What is the maximum input frequency for ACLK, given the following situations:

1) ACLK is sourced by crystal

2) ACLK is sourced by oscillator


MSP430FR2433: MSP430FR2433 -----ADC10 issue

$
0
0

Part Number:MSP430FR2433

Hi TI guys,

I found the ADC10 of FR2433 doesn't works as the user guider says.

The problem happens on  Repeat-Sequence-of-Channels Mode.

As we know, there is no DTC or DMA in FR2433 . Besides, it has only one ADCMEM. so I need your help clear sth.

1) If  I chose the sample trigger source  is TA1 , not by software(ADCSC),  and there're 5 channels in one sequence.

A rising edge of TA ,will trigger the whole sequence or just only one channel ?

In my head , if set ADCMSC bit,  the rising edge of TA will trigger the whole sequence , or , it just trigger only one channel.

   Am I right?

2)

Does it necessary to toggle ADCENC bit after each sequence conversion  completed in Repeat-Sequence-of-Channels Mode?


3)

Keep these precondion in mind,

a) Repeat-Sequence-of-Channels Mode   

b)Trigger by TA ,and TA always runs    

c)  ADCMSC  is NOTset.

When one sequence completed, will another sequence starts automatically ?

Thanks.

MSP430FR2355: MSP430FR2355 SPI problems

$
0
0

Part Number:MSP430FR2355

Hi TI:

I tested msp430fr235x_euscia0_spi_09  this routine,  

I found that when the last bit of MOSI is 1, it is also 1 in the idle state, and the last bit is 0, and it is 0 in the idle state.

How is this configured? thanks.

CCS/MSP432P401R: Delay function is incorrectly being optimised

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Hello!

I have the following issue when switching from the black MSP432 board to the new red MSP432 and a new compiler in Code Composer Studio 8.

A hard delay function gets optimised away and the program gets stuck in function. The delay function uses a timer interrupt to count the delays and
with the debugger I can see that the interrupt is firing and the delay variable gets decremented.

Can anybody help with this?

Here is the code:

/* These definitions are also used */
#define Public
#define Private static

/******** Here is the delay variable **********/

#pragma RETAIN(priv_delay_counter)
static volatile U16 priv_delay_counter = 0u;

/*********************/

/* delay function */
#pragma FUNCTION_OPTIONS(delay_msec, "--opt_level=off")
Public void delay_msec(U16 msec)
{
    priv_delay_counter = msec / 10;
    while(priv_delay_counter > 0u);
}


/* Interrupt service routine. */
//Hi priority interrupt handler.
Private void TA0_0_IRQHandler(void)
{
    Timer_A_clearCaptureCompareInterrupt(TIMER_A0_BASE, TIMER_A_CAPTURECOMPARE_REGISTER_0);
    if (priv_delay_counter > 0u)
    {
        priv_delay_counter--;
    }

    timer_10msec_callback();
}

MSP430FR6047: my MSP430FR6047 USS CH0_IN can't detect the input signal

$
0
0

Part Number:MSP430FR6047

hello, i have some problem about my board with msp430fr6047 on it,and i don't have a EVM430-FR6047
when i user the demo UltrasonicWaterFR604x_02_20_00_04,in methord
USSLibGUIApp_Engine(void)
{...
...
code = USS_runAlgorithmsFixedPoint(&gUssSWConfig,&algResFixed);
...
...
}
i use uart send the return code to pc(without debug),it's 126,means no signal,i have try about 5 times.
before runAlgorithms,the return code of initialise and measurement is no error.
so i try msp430ware peripheral example msp430fr60x7_sdhs_01.c, add a DC power about 280mv to the ch0_in channel,
and it can't detect the signal anyway (the convert result in LEA memory is zero ,in debug )
i need your help, thank you!

EVM430-FR6047: APPLICATION_ABSTOF_REFERENCE value

$
0
0

Part Number:EVM430-FR6047

Hi

I have a quick question regarding APPLICATION_ABSTOF_REFERENCE constant which is set to 32us as default. Should this be modified after the specific pipe, or should it be left untouched? (I usually get about 25us absTOF at zero flow). Note: I am using the absTOF zero flow offset calibration as well.

Best regards,
Thibault

MSP430FR6047: TFT LCD with MSP430

$
0
0

Part Number:MSP430FR6047

Hello

We use MSP430FR6047.

We want to connect TFT LCD.

Does anyone have experience to connect TFT LCD with MSP430 series?

I wonder it is possible and works well.

And also I want to get any recommendation of TFT LCD with MSP430FR6047.

Thank you.

MSP-EXP430FR5994: RTC Configuration (to avoid setting the RTC time upon each MCU reset)

$
0
0

Part Number:MSP-EXP430FR5994

Hi,

  I have gone through the RTC configuration example section as part of the Out-of-box demo for MSP-EXP430FR5994. In the code below, it shows how to set the RTC upon system startup. But how do I skip the RTC setting upon system startup? I mean that the RTC is holding its value (rather maintaining the clock) and upon system startup I do not want to set the time again, I just want the RTC to continue and I will fetch the time whenever necessary. I commented the blue coloured section below to see if it helps; but this results into wrong RTC time (during RTC value read). For example, the original year setting was 'Year = 0x2018' but while reading the year value after an MCU reset, the value came as 843 (decimal).

  Note that in my application, I kept the RTC running in BCD mode while the application uses binary mode for its internal calculations. For setting the clock & for retrieving the same, the driverlibBCDtoBinary& BinaryToBCD functions have been used.

-

void Init_RTC()
{
    //Setup Current Time for Calendar
    calendar.Seconds    = 0x00;
    calendar.Minutes    = 0x00;
    calendar.Hours      = 0x00;
    calendar.DayOfWeek  = 0x01;
    calendar.DayOfMonth = 0x01;
    calendar.Month      = 0x01;
    calendar.Year       = 0x2019;

    // Initialize RTC with the specified Calendar above
    RTC_C_initCalendar(RTC_C_BASE,
                       &calendar,
                       RTC_C_FORMAT_BCD);

    RTC_C_setCalendarEvent(RTC_C_BASE,
                           RTC_C_CALENDAREVENT_MINUTECHANGE
                           );

    RTC_C_clearInterrupt(RTC_C_BASE,
                         RTC_C_TIME_EVENT_INTERRUPT
                         );

    RTC_C_enableInterrupt(RTC_C_BASE,
                          RTC_C_TIME_EVENT_INTERRUPT
                          );

    //Start RTC Clock
    RTC_C_startClock(RTC_C_BASE);
}

-

Thanks

-

Regards

Soumyajit


CCS/MSP430FR5969: ADC pin Reading Problem.

$
0
0

Part Number:MSP430FR5969

Tool/software: Code Composer Studio

hi this is harikrishna

One of my project I am reading the ADC pin value as input for me. because of I am reading the pin value every time .sometimes getting NOISE from the pin and that is not expected..is there any chances of changing from the software side or  hardware side.(and one more question like can I use that pin as either pullup or pulldown to avoid that Noise).any suggestions that helps me a lot...

Thank you. 

MSP430FR2111: MSP430FR2111 VLO

MSP-EXP430F5529LP: PGA460 USB2ANY Flashing Issue

$
0
0

Part Number:MSP-EXP430F5529LP

I have a client having trouble with getting the PGA460 GUI interface to run. The issue is when running the batch file to install the USB2Any interface on the MSP-EXP430F5529LP, the black bar that indicates it is underway appears, but it doesn't seem to be flashing and so never completes. 

They did try using some custom programming on the same board earlier, so it is not completely factory default. The device does show up on two COM ports in the device manager and the status LEDs on the USB interface show just solid green. I am guessing that the MCU itself is not ready to be flashed, so is there a way to force this? 

I did look at the documentation for the board, but it isn't exactly clear on this. Other than ending up driving the PGA460 and using the GUI program to run the batch file, this seems to be only an issue with the MSP-EXP430F5529LP at this moment. The client did try manually running the driver install batch file, and it looks like the system is seeing the board OK. 

Thanks for your help. 

Jon

1566

$
0
0

Dear Forum Members,

I would like to ask is there any easy way to implement Equivalent Time Sampling with ADC10/12 to digitize (repetitive) signals up to 2MHz (the ADC analog badwitdh based on sampling cap and

multiplexer channel resistance).

Thank you in advance!

Regards,

Joseph

MSP432P401R: UART issue with MSP432P401R

$
0
0

Part Number:MSP432P401R

Hello,

I am working with MSP432P401R LaunchPad, recently I started noticing an issue with my MSP432P401R UART communication between PC and board. Hence I uploaded a register level msp432p401x_euscia0_uart_01 example from SimpleLink MSP432P4 SDK. I noticed that when I am entering hello on the terminal different character are printed (Terminal Baud rate is set to 9600 as per example requirement).  I have attached an image which shows the same.

Viewing all 22733 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>