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

MSP430G2553: Slower execution after waking up from lpm3

$
0
0

Part Number:MSP430G2553

Hi!

I'm having an issue with LPM3 in a battery powered application.

We have a remote that sends radio commands with CC1101. There is a "Sleep" function between the "sendings"

and after waking up from LPM3, the remote sends slowly, ruining some time-dependant communication operations.

I checked all the BCS, TIMERA and SR registers, it seems all the same. I tried to set the clock again but the problem won't disappear.

Do you have a clue? Details below.

Thanks in advance,

Mirco

This is the send function

for(ikj=0;ikj<4;ikj++)//Send message n times { 
     FLUSH_TX sleepII(TWNTH_SEC);
     RFSendPacket(txBuffer, tx_length, (char)0); // Send value over RF 
     sleepII(TWNTH_SEC);
     L_SIGN_PORT_OUT ^= L_SIGN; 
}

This is the "sleepII"

void sleepII(unsigned int time)
{
    BCSCTL1 |= DIVA_0;                        // ACLK/2
    BCSCTL3 |= LFXT1S_2;                      // ACLK = VLO
    WDTCTL = WDT_ADLY_1000;                   // Interval timer
    TA0CCR0 = time;
    TA0CTL = MC_1+TACLR+TASSEL_1;
    TA0CCTL0 &= ~(CAP+CCIFG);
    TA0CCTL0 |= CCIE;
    Stop_Wait=1;
    __bis_SR_register(GIE);

    while(Stop_Wait);
    //    __bis_SR_register(LPM0_bits+GIE);
}

this is the part where enters and exits lpm3

while(TLC_Power==LOW)                          
                {
                    P1DIR = 0xFF;                             // All P1.x outputs
                    P1OUT = 0;                                // All P1.x reset
                    P2DIR = 0xFF;                             // All P2.x outputs
                    P2OUT = 0;                                // All P2.x reset
                    ADC10CTL0 &= ~ENC;
                    ADC10CTL0 &= ~REFON ;
                    ADC10CTL0 &= ~ADC10ON;
                    sleep_s(IDLE_DELAY_INFO);                     //__bis_SR_register(LPM3_bits), sleep_s enters lpm3 mode
                    sleepII(CENT_SEC);

                    if (check_button_x(1,2))    // if button pressed, wake up

                    {
                        TLC_Power=HIGH;                         // Power Flag

                        Deep_sleep_counter=DEEP_SLEEP_DELAY;

                        //Set_Up_Clock_and_WDT();     // it doesn't remove the problem

                        go_to_sleep_ok=0;
                        TLC_Power=HIGH;                         // Power Flag
                        Battery_Check_time=25;                  // Tempo prima del prossimo battery check
                    }



then we have sleep_s():
void sleep_s(unsigned int time)
{

    BCSCTL1 |= DIVA_1;                        // ACLK/2
    BCSCTL3 |= LFXT1S_2;                      // ACLK = VLO
    WDTCTL = WDT_ADLY_1000;                   // Interval timer
    TA0CCR0 = time;
    TA0CTL = MC_0+TACLR+TASSEL_1;
    TA0CCTL0 &= ~(CAP+CCIFG);
    TA0CCTL0 |= CCIE;
    __bis_SR_register(LPM3_bits+GIE);
}

and TA0 ISR that exits lpm3

#pragma vector = TIMER0_A0_VECTOR
__interrupt void Timer0_A0 (void)
{
    TA0CTL &= ~(MC_1);
    TA0CCTL0 &= ~(CCIE);
    __bic_SR_register_on_exit(LPM3_bits);
    //    __bic_SR_register_on_exit(LPM3_bits)

    Stop=0;
    Stop_Wait=0;
}

the clock is calibrated with this function

void Set_Up_Clock_and_WDT(void)
{
    WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
    if (CALBC1_1MHZ==0xFF)while(1);// If calibration constant erased do not load, trap CPU!!
    DCOCTL = 0;                               // Select lowest DCOx and MODx settings
    BCSCTL1 = CALBC1_1MHZ;                    // Set DCO to 1MHz
    DCOCTL =  CALDCO_1MHZ;
    BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO
}


MSP430F5326: SPI 3 wires mode connection

$
0
0

Part Number:MSP430F5326

Hi all

I am using MSP430F5326 in my new project

I am using it to interface with a sensor with 3 wire SPI connection

Pls help me to connect the MSP to the sensor, using SPI pins of MCU

I have found this for the PIC controller, can I apply to the MSP430?

Thanks

Ryder

CC430F5137: Add CC430F5137 to Launchpad

$
0
0

Part Number:CC430F5137

Is there any way to add the CC430f5137 to the list of boards in the launchpad ide?
In the arduino ide this task is easy but I see myself in problems with launchpad.
Any help is welcome.

Gustavo.

MSP-FET: MSP-FET Backchannel UART - software Flow Control

$
0
0

Part Number:MSP-FET

Hi Everrybody,

I'm using MSP-FET with CCSv7.4 to debug & program MSP432 devices (currently MSP432P401R LaunchPad , later our own design with MSP432P401M). It's working OK.

I want to use the Backchannel UART also for debug purposes. Target MCLK is 16 MHz, 28800 Baud is working well without Flow Control. According to the documentation (SLAU647K) higher speed is only available with Flow Control or handshaking.

Flow Control means hardware flow control signals (RTS and CTS)? Or software Flow Control is also available with XONN/XOFF?

Is any eUSCI supports CTS and RTS signals?

Maybe somebody can help me!

Thanks,

Zoltan

MSP430FR2433: GPIO p1.0 setup as Input , with 4k Pull-up to 3.3 but showing 1.8V

$
0
0

Part Number:MSP430FR2433

I just did P1DIR &= ~BIT0, and observed that even though i have a 4k pull up to 3.3, the signal is at 1.8V

When I changed to P1DIR |= BIT0, the signal dropped to 0V

Anything else I should have done to make the input pin stay high? 

CCS/MSP-EXP430FR5994: bigtime_MSP_EXP430FR5994_TI example project fails during Task_construct.

$
0
0

Part Number:MSP-EXP430FR5994

Tool/software: Code Composer Studio

Having installed TI v16.9.6.LTS into CCS 7.4.0.00015 running under Windows 10 Home v1709 (64-bit) the bigtime_MSP_EXP430FR5994_TI example project fails during Task_construct.

Source file bigtime.cpp, line 151.

The above error was resolved by adding:
MPUCTL0 = MPUPW; // disable MPU
at the begin of main().
See: https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/680181

However, the bigtime did not performed.
Another error has raised.

xdc_runtime_Error_policySpin__E(struct xdc_runtime_Error_Block *, unsigned int, unsigned char *, int, unsigned long, long, long)() at Error.c:178 0x01467C
xdc_runtime_Error_raiseX__E(struct xdc_runtime_Error_Block *, unsigned int, unsigned char *, int, unsigned long, long, long)() at Error.c:114 0x013AAE
ti_sysbios_knl_Task_checkStacks__E(struct ti_sysbios_knl_Task_Object *, struct ti_sysbios_knl_Task_Object *)() at Task.c:422 0x01145E
ti_sysbios_knl_Task_schedule__I() at Task.c:134 0x011E8C
ti_sysbios_knl_Task_restore__E(unsigned int)() at Task.c:350 0x013C64
ti_sysbios_knl_Semaphore_pend__E(struct ti_sysbios_knl_Semaphore_Object *, unsigned long)() at Hwi__epilogue.h:339 0x010CB8
clockTask(unsigned long)() at bigtime.cpp:225 0x0127AE
ti_sysbios_knl_Task_exit__E() at Task.c:455 0x013238
ti_sysbios_knl_Task_enter__I() at Task.c:149 0x014150
0x005242 (no symbols are defined)

First call to clockTask() went to Semaphore_pend() at line 220 in bigtime.c
because cl3 and cl4 (all Clock objects to be precise) were not initialized by their constructors
because cl[0..4] objects were placed in another MPU segment.

Solution or workaround:
Project Properties -> General -> tab: MPU -> disable checkbox: Enable Memory Protection Unit (MPU).

Below the Enable Memory Protection Unit (MPU) checkbox there are two options with:
     Let compiler handle memory partitioning, associated acces rights, and linker output section placement
as default.

Having no experience with MPU and being unfamiliar at e2e I have two questions:

1. the default option "Let compiler ... and linker ..." suggests that compiler and linker should handle an error which we have encountered,
    Question: what should I expect from "Let compiler ... and linker ..." in case of MPU handling?
    Without your answer I cannot qualify my proposal as a solution or a workaround.

2. I have found that the bigtime example is offered for LaunchPads based on other MCUs like cc1130, 432, ...
    If I find similar problems with the bigtime example should I created separete posts for each particular LaunchPad with a link to this thread?
    My question cames from my lack of experiance how to deal with e2e interresants, voluntee supporters and TI employes.

Best regards,

Tomasz

MSP430G2230: MSP430G2230

$
0
0

Part Number:MSP430G2230

Pin 6, 7 (RST/NMI/SBWTDIO and TEST/SBWTCK) can I using these pins as general inputs?

Problem on Water Meter Reference Design for three LC Sensors, Using Extended Scan Interface (ESI)

$
0
0

Dear Sir/madam,

I bought a EVM430-FER6989 and would like to implement the Water Meter Reference Design for three LC Sensors, Using Extended Scan Interface (ESI)

i download the package and run , however i encounter the following problem:

1) the demo didnt work, the counter is always 0 whatever i try to locate my motor board for what distacnce. Any idea?

2) i try to use ccs to reload the sample program , however the result is the same.

Any idea?

3) i try to debug the program ,  setting the breakpoint and seems the program does run , however it  never fall into the case 0x0c

__interrupt void ISR_ESCAN_IF(void)
{

   switch (ESIIV)

 case 0x02:  if (ESIINT1&ESIIE1)

                {    ESIINT2 &= ~ESIIFG1;                     // clear the ESISTOP flag

                    if(ReCal_Flag&BIT6)
                    {TA0CTL |= TACLR;                       // Reset Timer to prevent abnormal time out.
                    TA0CCTL0 &= ~CCIFG;    }

                    _low_power_mode_off_on_exit();           // exit low power mode;
                }
              break;

   case 0x04:  break;
   case 0x06:  break;
   case 0x08:  break;

   case 0x0A: break;
   {case 0x0C: if(ESIINT1&ESIIE5)
                               {    ESIINT2 &= ~ESIIFG5;                // clear the Q6 flag

                                      if(ReCal_Flag&BIT6)
                        {TA0CTL |= TACLR;                   // Reset Timer to prevent abnormal time out.
                        TA0CCTL0 &= ~CCIFG;    }

                        if(ReCal_Flag&BIT7)
                        { ReCal_Flag |= BIT6;    }           // to do runtime calibration with AFE2

                        if(Status_flag&BIT3)                // Check for completion of Calibration of DAC
                        {                                    // If yes, LCD is to display the rotation number

                            rotation_counter = ESICNT1;     // for every complete rotation, there are 6 states change and so add +1 six times

                            if (rotation_counter < 0)
                                {rotation_counter = -1*rotation_counter /6;}
                            else
                                {rotation_counter = rotation_counter / 6;}

                            lcd_display_num(rotation_counter,0);
                        }


                        _low_power_mode_off_on_exit();       // exit low power mode;

thanks

jeff


CCS/MSP432E401Y: How to configure IP addresses manually. MSP432E401y launchpad

$
0
0

Part Number:MSP432E401Y

Tool/software: Code Composer Studio

I use the (udpecho) code of msp432E401y, how to configure static IP,   do not assign IP using DHCP.

CCS/MSP432E401Y: How does the (udpecho)sample code configure static IP?

MSP432E401Y: TIDL for MCU

$
0
0

Part Number:MSP432E401Y

Hi Folks,

Could you please let me know if there is TIDL ( TI Deep Learning ) for MCU available for not.
The TIDL development flow for TDAx is described in Figure 1. on page 3 in www.ti.com/lit/spry314.

Thank you so much for your kind attention.
Best regards,
Hitoshi

MSP430FR5739: Wireless Communication

MSP432P401R: Can software update be done over BSL UART if RX and TX are connected?

$
0
0

Part Number:MSP432P401R

I am using MSP432P401R MCU with pins P1.2 and P1.3 used for BSL. Because of apllication requrements multiple pins are connected together.

Question is: will BSL work if RX and TX pins are connected? 

BSL will be invoked with Flash memory erased and/or software called BSL function. 

  

CCS/MSP430F5529: LaunchPad and project from Ti "DRV8323_MSP430F5529_Trapezoidal_Sensorless_BLDC". question about cmd

$
0
0

Part Number:MSP430F5529

Tool/software: Code Composer Studio

Hi,

I want to use msp430f5529.cmd instead of lnk_msp430f5529.cmd in project.

but there is problem (msp430f5529.cmd is unchangeable "please do not change" ):

Description Resource Path Location Type
#10247-D creating output section ".bss" without a SECTIONS specification Msp_Drv2 C/C++ Problem
#10247-D creating output section ".cinit" without a SECTIONS specification Msp_Drv2 C/C++ Problem
#10247-D creating output section ".const" without a SECTIONS specification Msp_Drv2 C/C++ Problem
#10247-D creating output section ".data" without a SECTIONS specification Msp_Drv2 C/C++ Problem
#10247-D creating output section ".reset" without a SECTIONS specification Msp_Drv2 C/C++ Problem
#10247-D creating output section ".stack" without a SECTIONS specification Msp_Drv2 C/C++ Problem
#10247-D creating output section ".text" without a SECTIONS specification Msp_Drv2 C/C++ Problem

I notice that all projects I found take this file lnk_msp430f5529.cmd

another question is that the last sentece in lnk_msp430f5529.cmd is "-1 msp430f5529.cmd", I want to know what is that means.

thanks very much for your help.

Tang Yusong

CCS/MSP430FR5857: ADC12 in Repeat Autoscan mode.

$
0
0

Part Number:MSP430FR5857

Tool/software: Code Composer Studio

/* --COPYRIGHT--,BSD_EX
 * Copyright (c) 2012, 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.
 *
 *******************************************************************************
 *
 *                       MSP430 CODE EXAMPLE DISCLAIMER
 *
 * MSP430 code examples are self-contained low-level programs that typically
 * demonstrate a single peripheral function or device feature in a highly
 * concise manner. For this the code may rely on the device's power-on default
 * register values and settings such as the clock configuration and care must
 * be taken when combining code from several examples to avoid potential side
 * effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware
 * for an API functional library-approach to peripheral configuration.
 *
 * --/COPYRIGHT--*/
//******************************************************************************
//  MSP430FR59xx Demo - ADC12, Sample A1, AVcc Ref, Set P1.0 if A1 > 0.5*AVcc
//
//   Description: A single sample is made on A1 with reference to AVcc.
//   Software sets ADC12SC to start sample and conversion - ADC12SC
//   automatically cleared at EOC. ADC12 internal oscillator times sample (16x)
//   and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC12
//   conversion complete, ADC12_ISR will force exit from LPM0 in Mainloop on
//   reti. If A1 > 0.5*AVcc, P1.0 set, else reset. The full, correct handling of
//   and ADC12 interrupt is shown as well.
//
//
//                MSP430FR5969
//             -----------------
//         /|\|              XIN|-
//          | |                 |
//          --|RST          XOUT|-
//            |                 |
//        >---|P1.1/A1      P1.0|-->LED
//
//   T. Witt / P. Thanigai
//   Texas Instruments Inc.
//   November 2013
//   Built with IAR Embedded Workbench V5.60 & Code Composer Studio V5.5
//******************************************************************************
#include <msp430.h>

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

  // GPIO Setup
  P2OUT &= ~BIT2;                           // Clear LED to start
  P2DIR |= BIT2;                            // Set P1.0/LED to output
  P3OUT &= ~BIT7;                           // Clear LED to start
  P3DIR |= BIT7;
  P1SEL1 = BIT0|BIT1;                           // Configure P1.1 for ADC
  P1SEL0 = BIT0|BIT1;

  // Disable the GPIO power-on default high-impedance mode to activate
  // previously configured port settings
  PM5CTL0 &= ~LOCKLPM5;

  // Configure ADC12
  ADC12CTL0 = ADC12SHT0_2 | ADC12ON| ADC12MSC;        // Sampling time, S&H=16, ADC12 on
  ADC12CTL1 = ADC12SHP| ADC12CONSEQ_3;                     // Use sampling timer
  ADC12CTL2 |= ADC12RES_2;                  // 12-bit conversion results
  ADC12MCTL0 |= ADC12INCH_0;                // A1 ADC input select; Vref=AVCC
  ADC12MCTL1 = ADC12INCH_1|ADC12EOS;                // A1 ADC input select; Vref=AVCC
  ADC12IER0 = ADC12IE0| ADC12IE1;                    // Enable ADC conv complete interrupt

  ADC12CTL0 |= ADC12ENC | ADC12SC;        // Start sampling/conversion
  while (1)
  {
  /*  __delay_cycles(5000);
    ADC12CTL0 |= ADC12ENC | ADC12SC;        // Start sampling/conversion

    __bis_SR_register(LPM0_bits | GIE);     // LPM0, ADC12_ISR will force exit
    __no_operation();                       // For debugger */
  }
}

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = ADC12_VECTOR
__interrupt void ADC12_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(ADC12_VECTOR))) ADC12_ISR (void)
#else
#error Compiler not supported!
#endif
{
  switch(__even_in_range(ADC12IV, ADC12IV_ADC12RDYIFG))
  {
    case ADC12IV_NONE:        break;        // Vector  0:  No interrupt
    case ADC12IV_ADC12OVIFG:  break;        // Vector  2:  ADC12MEMx Overflow
    case ADC12IV_ADC12TOVIFG: break;        // Vector  4:  Conversion time overflow
    case ADC12IV_ADC12HIIFG:  break;        // Vector  6:  ADC12BHI
    case ADC12IV_ADC12LOIFG:  break;        // Vector  8:  ADC12BLO
    case ADC12IV_ADC12INIFG:  break;        // Vector 10:  ADC12BIN
    case ADC12IV_ADC12IFG0:                 // Vector 12:  ADC12MEM0 Interrupt
      if (ADC12MEM0 >= 0x7ff)               // ADC12MEM0 = A1 > 0.5AVcc?
        P2OUT |= BIT2;                      // P1.0 = 1
      else
        P2OUT &= ~BIT2;                     // P1.0 = 0
      __bic_SR_register_on_exit(LPM0_bits); // Exit active CPU
      break;                                // Clear CPUOFF bit from 0(SR)
    case ADC12IV_ADC12IFG1:                 // Vector 14:  ADC12MEM1
        if (ADC12MEM1 >= 0x7ff)               // ADC12MEM0 = A1 > 0.5AVcc?
          P3OUT |= BIT7;                      // P1.0 = 1
        else
          P3OUT &= ~BIT7;                     // P1.0 = 0
        __bic_SR_register_on_exit(LPM0_bits); // Exit active CPU
        break;
    case ADC12IV_ADC12IFG2:   break;        // Vector 16:  ADC12MEM2
    case ADC12IV_ADC12IFG3:   break;        // Vector 18:  ADC12MEM3
    case ADC12IV_ADC12IFG4:   break;        // Vector 20:  ADC12MEM4
    case ADC12IV_ADC12IFG5:   break;        // Vector 22:  ADC12MEM5
    case ADC12IV_ADC12IFG6:   break;        // Vector 24:  ADC12MEM6
    case ADC12IV_ADC12IFG7:   break;        // Vector 26:  ADC12MEM7
    case ADC12IV_ADC12IFG8:   break;        // Vector 28:  ADC12MEM8
    case ADC12IV_ADC12IFG9:   break;        // Vector 30:  ADC12MEM9
    case ADC12IV_ADC12IFG10:  break;        // Vector 32:  ADC12MEM10
    case ADC12IV_ADC12IFG11:  break;        // Vector 34:  ADC12MEM11
    case ADC12IV_ADC12IFG12:  break;        // Vector 36:  ADC12MEM12
    case ADC12IV_ADC12IFG13:  break;        // Vector 38:  ADC12MEM13
    case ADC12IV_ADC12IFG14:  break;        // Vector 40:  ADC12MEM14
    case ADC12IV_ADC12IFG15:  break;        // Vector 42:  ADC12MEM15
    case ADC12IV_ADC12IFG16:  break;        // Vector 44:  ADC12MEM16
    case ADC12IV_ADC12IFG17:  break;        // Vector 46:  ADC12MEM17
    case ADC12IV_ADC12IFG18:  break;        // Vector 48:  ADC12MEM18
    case ADC12IV_ADC12IFG19:  break;        // Vector 50:  ADC12MEM19
    case ADC12IV_ADC12IFG20:  break;        // Vector 52:  ADC12MEM20
    case ADC12IV_ADC12IFG21:  break;        // Vector 54:  ADC12MEM21
    case ADC12IV_ADC12IFG22:  break;        // Vector 56:  ADC12MEM22
    case ADC12IV_ADC12IFG23:  break;        // Vector 58:  ADC12MEM23
    case ADC12IV_ADC12IFG24:  break;        // Vector 60:  ADC12MEM24
    case ADC12IV_ADC12IFG25:  break;        // Vector 62:  ADC12MEM25
    case ADC12IV_ADC12IFG26:  break;        // Vector 64:  ADC12MEM26
    case ADC12IV_ADC12IFG27:  break;        // Vector 66:  ADC12MEM27
    case ADC12IV_ADC12IFG28:  break;        // Vector 68:  ADC12MEM28
    case ADC12IV_ADC12IFG29:  break;        // Vector 70:  ADC12MEM29
    case ADC12IV_ADC12IFG30:  break;        // Vector 72:  ADC12MEM30
    case ADC12IV_ADC12IFG31:  break;        // Vector 74:  ADC12MEM31
    case ADC12IV_ADC12RDYIFG: break;        // Vector 76:  ADC12RDY
    default: break;
  }
}

Given above is the code I edited from the examples given in MSPWare. I tried the Autoscan mode(sequence of channels) and it was working but the Repeat Autoscan( repeat a sequence of channels)  code aboe is not working. Help me with what I have done wrong.


CCS/EVM430-FR6047: EVM430-FR6047 - how to start the board not in debug mode

$
0
0

Part Number:EVM430-FR6047

Tool/software: Code Composer Studio

Hello, dear hotline!

We have EVM430-FR6047 with MSP430FR6047 resoldered (we've soldered new MSP430 IC because the original became corrupted). Of course it has no firmware inside.

So I've imported GUI Demo project into CCS8 and after build I got USSLib_GUI_Demo.out (located in folder ....\USSLib_GUI_Demo\LPM)

Then I start DEBUG session (the board is connected by USB with PC). Everything is OK - after Resuming I see the measurements on the GUI program screen.

Then I want to reset board and to start it without debugging. And it acts like the program is hanging (the red LED blinks very fast, nothing is measured) - please look at the video  .

I suppose there is some conflict between a debugger which works through USB, and the program starting sequence if we are not in debug mode.

What jumper settings do we have to do for starting the board without debug. 

If there is a possibility to load the binary (.out) not from CCS8 (maybe some flasher program)?

BEst regards, Anastasia

MSP432P401R: How to save Data on SD card and have multiple ADC channels using TI-RTOS

$
0
0

Part Number:MSP432P401R

Hello

I'm going to explain what i have and what i want to do.

Right now, I'm doing a multiple sampling data using 12 ADC channels. 3 channels for sensors, so i have 4 independents tasks for each sensors, becuase i set the sample time using the (Task_Sleep) function, so i get new data every task_sleep time i set for each one task.

/* VIBRATION TASK */ //Example of 1 of the 4 task
void vibWork(void)
{
   if (start == 1)
   {
       vxc = ADC14_getResult(ADC_MEM0);
       vyc = ADC14_getResult(ADC_MEM1);
       vzc = ADC14_getResult(ADC_MEM3);
       ADC14_toggleConversionTrigger();
   }
}
void vibTaskFunc(UArg arg0, UArg arg1)
{
   while (1) {
       vibWork();
       Task_sleep((freqgvibracion * 1000) * (1000 / Clock_tickPeriod)); //Periodic task
   }
}

The sample time of the taks are 1ms , 2ms, 4ms, etc.. So i cannot save the the value of ADC inside the task because the its take about 13ms to save one value (convert the int to string, then write (f_write) on SD).

so i need another way to save the data on SD and keep getting new data over ADC, maybe make another task for save the data on the SD card. i dont know how

Can you help me please?

Thanks in advance

CCS/MSP430FR5969: contorlling Pwm dutycycle with varying adc value from scaling circuit

$
0
0

Part Number:MSP430FR5969

Tool/software: Code Composer Studio

We have designed a closed loop circuit using MSP30fr5969 wen load across buck converter is varied scaling voltage is varied which changes ADC value we compare that value to increase duty cycle so that output is maintained between 5-7v. these conditions are checked for in update duty cycle function. 

Problem faced is the ADC memmory  (ADCMEM0) sometimes gets updated with junk value or sometimes remains 00. also sometimes for the unchanged load, it keeps varying. Can anyone help me.

following is the code am working on.

#include <msp430.h>
unsigned int ADCValue,Dutycycle;
void CongifureAdc(void);
void Configuretimer(void);
void Make_PWM(unsigned int Dutycycle);
void UpdateDutycycle(unsigned int ADCValue);

int main(void)
{
WDTCTL = WDTPW | WDTHOLD; //stop wdt
P1SEL0|=BIT3; //Configure P1.3 for ADC
P1SEL1|=BIT3;
PM5CTL0=~LOCKLPM5;
Dutycycle=256; //50% duty cycle initially
while(1)
{
Make_PWM(Dutycycle);
ConfigureADC();
UpdateDutycycle(ADCValue);
}
__bis_SR_register(LPM0_bits);
__no_operation();
return 0;
}

void ConfigureADC()
{
// clear ADC flags
ADC12IFGR0 = 0x00;
ADC12IFGR1 = 0x00;
ADC12IFGR2 = 0x00;
ADC12CTL0&= ~ADC12ENC; //disable ADC12 during initialization
ADC12CTL0|=ADC12SHT0_2|ADC12ON; // Turn on ADC12, set sampling time,enable interrupt
ADC12CTL1|=ADC12SHP|ADC12CONSEQ_2; // Use sampling timer, set mode double sequence
ADC12CTL2|=ADC12RES_2; // 12-bit conversion results
ADC12IER0 |= ADC12IE0; // Interrupt MEM0
ADC12MCTL0|=ADC12INCH_3|ADC12VRSEL_3; // ref+=AVcc, channel = A3 Vref = 2.5V // ref-1.2v,2.0v,2.5v
ADC12CTL0|=ADC12ENC|ADC12SC; // enable adc and start conversion,sampling
}

void Make_PWM(unsigned int Dutycycle)
{
P1DIR|=BIT2; //P1.2 input
P1SEL0|=BIT2; //P1.2 select
PM5CTL0=~LOCKLPM5;
FRCTL0=FRCTLPW|NWAITS_1; // Configuring 16M MCLK
CSCTL0_H=CSKEY>>8; // Unlock CS registers'''''''''''''''''
CSCTL1=DCORSEL|DCOFSEL_4; // Set DCO = 8MHz
CSCTL2=SELA__VLOCLK|SELS__DCOCLK|SELM__DCOCLK; // Set ACLK=VLO SMCLK=DCO
CSCTL3=DIVA__1|DIVS__1|DIVM__1; // Set all dividers
CSCTL0_H=0; // Lock CS registers
// Configure Timer1_A
TA1CCR0=512-1; // PWM Period
TA1CCTL1=OUTMOD_7; // CCR2 reset/set
TA1CCR1=Dutycycle; // CCR1 PWM duty cycle

// | P1.2/TA1|--> CCR1 - 383-->75% PWM
// | P1.2/TA1|--> CCR1 - 256-->50% PWM
// | P1.2/TA1|--> CCR1 - 128-->25% PWM
// | P1.2/TA1|--> CCR1 - 64-->12.5% PWM
// | P1.2/TA1|--> CCR1 - 32--> 6.26% PWM
// | P1.2/TA1|--> CCR1 - 16--> 3.13% PWM
// | P1.2/TA1|--> CCR1 - 8--> 1.56% PWM

TA1CTL=TASSEL__SMCLK|MC__UP|TACLR; // SMCLK, up mode, clear TAR
}
void UpdateDutycycle(unsigned int ADCValue)
{
if(ADCValue<2862)
{
Dutycycle=TA1CCR1++;
}
if(ADCValue>4006)
{
Dutycycle=TA1CCR1--;
}

}
#pragma vector=ADC12_VECTOR
__interrupt void ADC12_ISR (void)
{
ADCValue = ADC12MEM0; // Saves measured value.
}

CCS/MSP430FR5994: MSP430FR5994

$
0
0

Part Number:MSP430FR5994

Tool/software: Code Composer Studio

Can the spi bi wire scheme be used to fuse the code into the new device.We tried to fuse with the hardware seen below and it did not fuse.If the scheme different for FR series

We tried 

MSP430I2030: SD24 ADC offset voltage

$
0
0

Part Number:MSP430I2030

Hi,

does anybody has a software routine to calculate and eliminate the offset voltage from the SD24V ADCs of the MSP430i2030?

I use them with an OSR=64, LSBACC=0 and gain=2. The offset voltage is up to +-0x80h if I short circuit the ADC input pins.

Regards

Wolfgang

Viewing all 21975 articles
Browse latest View live


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