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

CCS/MSP430FR4133: HELP, Code will run once from CCS only after uploading from Energia

$
0
0

Part Number:MSP430FR4133

Tool/software: Code Composer Studio

I really hope someone out there can help me. I had a special moment while wiring up my old MSP430g2552, and I completely fried the whole thing. So, I purchased the MSP430fr4133 figuring it would be the simplest introduction to using displays. 

Here is where I am at with this,

The first time I ran the controller was from Energia (I was testing why it would not upload programs from CCS. Turns out i had to move the jumpers from RTS/CTS to SBW pins). Then I ran it on CCS and it made me update the firmware first.

I was able to upload the program after the firmware update, but when I click stop debugging the micro controller stopped running the code ( my LED stopped blinking).

After stopping the debugging, I can not restart the program on the micro controller. In CCS debug it will show the variables are changing but the LEDs do not flash.

After reprogramming from Energia I can start the process all over again, and it will only run the first time from CCS.

So, I installed CCS8 and now It will only run the first program I debugged. I wrote a second program just like the first except it will flash the red led 3 times and the the green once ( Super Coder! I know), but when I ran debug ( after energia to reset it of course) it only ran the first program. 

I was originally running on CCS 7.1 then updated to 7.2. I uninstalled and reinstalled it a few times. I then installed CCS8 from the offline installer, and I am still having the same problems. 


MSP430G2744: InstaSPIN library

CCS/MSP-EXP432P4111: uart loopback 24mhz

$
0
0

Part Number:MSP-EXP432P4111

Tool/software: Code Composer Studio

uart_loopback_24mhz_brclk does not work for me

I installed CCS V8 thinking that might solve it yet I do not get it to send or receive data at 115200 

I need a working uart program to communicate with the TI BQ76PL455 chip.

CCS: SMALL PROJECT CODE ASSISTANCE! THANK YOU IN ADVANCE FOR ANY HELP!!

$
0
0

Tool/software: Code Composer Studio

Hi all, I'm in need of a little assistance with a coding project I have going on. I have attached what I have so far along with the requirements needed.

As of this moment, only the "countup" function is working through the S2 Button on the launchpad. The connected third switch to P1.4 and P2.1 is not counting backwards through the LEDs as it should.

All help is greatly appreciated!!

 

#include <msp430.h>

#define OUTPUTMASK (BIT6 + BIT0 + BIT4)

// Global variables to hold current state and # of pushes
char currentState;
char pushes;
char direction;

// Initialization function
void init(void)
{
    WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
    P1DIR |= OUTPUTMASK;                      // Set P1.0, P1.6, and P1.4 to output direction
    P1REN |= BIT3;                    		  // P1.3 enable internal resistor
    P1OUT |= BIT3 + BIT4;                      // Set bits 3 and 4 of P1
	
	P2DIR &= ~(BIT1);						  // Makes this an input
	P2REN |= BIT1;							  // P2.2 enable internal resistor
	P2OUT &= ~(BIT1);						  // Make internal resistor pulldown
	

    currentState = 0;                         // Initialize global variable
    pushes = 0;                               // Initialize global variable
    P1OUT &= ~(OUTPUTMASK);                   // Clear output LEDs
}

// Read input function
char readInput(void)
{
    char local = 0;

    if (!(BIT3 & P1IN))                       // Check for button push
    {
        pushes += 1;                          // increment pushes variable
        local = 1;
		direction = 1;
        _delay_cycles(10000);                 // Wait for bouncing to end
    }
	else if (BIT1 & P2IN)                       // Check for button push
    {
        pushes -= 1;                          // decrement pushes variable
        local = 1;
		direction = 0;
        _delay_cycles(10000);                 // Wait for bouncing to end
    }
    else{
        local = 0;
        _delay_cycles(10000);                 // Wait for bouncing to end
    }
    return local;
}

// Count up function
void countUp(void)
{
    switch(currentState){
    case 0: {
        currentState = 1;
        P1OUT |= BIT6;
        P1OUT &= ~(BIT0);
        break;
    }
    case 1: {
        currentState = 2;
        P1OUT &= ~(BIT6);
        P1OUT |= BIT0;
        break;
    }
    case 2: {
        currentState = 3;
        P1OUT |= BIT6;
        P1OUT |= BIT0;
        break;
    }
    case 3: {
        currentState = 0;
        P1OUT &= ~(BIT6);
        P1OUT &= ~(BIT0);
        break;
    }
    }
}

// Count down function
void countDown(void)
{
  switch (currentState)
  {
  case 3:
     currentState = 2;
     P1OUT |= BIT6;
     P1OUT &= ~(BIT0);
     break;
  case 2:
	  currentState = 1;
	  P1OUT &= ~(BIT6);
	  P1OUT |= BIT0;
	  break;
  case 1:
	  currentState = 0;
	  P1OUT |= BIT6;
	  P1OUT |= BIT0;
	  break;
  case 0:
	  currentState = 3;
	  P1OUT &= ~(BIT6);
	  P1OUT &= ~(BIT0);
	  break;
  }
}


// Main function
int main(void)
{
  char enable = 0;                        // Holds status of the S2 button
  char previousState = 0;                 // Holds previous state of S2 button
  init();                                 // One time initialization function

  while (1)
  {
      
      enable = readInput();               // Check the buttons

      if(enable && !previousState){
          // If button is pressed, allow counter to increment/decrement once
         if(direction){
             countUp();
         }
         else{
             countDown();
		 }
        }
      previousState = enable;
	  
	   
  }
}


 

MSP-EXP432E401Y: Doubt in Schematic

$
0
0

Part Number:MSP-EXP432E401Y

Hi,

I noticed that in the Schematic, for Y1 and Y3 crystals, GND pin is not connected. May I know why the pin is left floating?

Thanks

MSP430FR2633: Waterfall demo FW Request

MSP430G2553: PROBLEM WITH MSP430G2 PROJECT CODE! ALL ASSISTANCE WILL BE APPRECIATED!!!

$
0
0

Part Number:MSP430G2553

#include <msp430.h>

#define OUTPUTMASK (BIT6 + BIT0 + BIT4)

// Global variables to hold current state and # of pushes
char currentState;
char pushes;
char direction;

// Initialization function
void init(void)
{
    WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
    P1DIR |= OUTPUTMASK;                      // Set P1.0, P1.6, and P1.4 to output direction
    P1REN |= BIT3;                    		  // P1.3 enable internal resistor
    P1OUT |= BIT3 + BIT4;                      // Set bits 3 and 4 of P1
	
	P2DIR &= ~(BIT1);						  // Makes this an input
	P2REN |= BIT1;							  // P2.2 enable internal resistor
	P2OUT &= ~(BIT1);						  // Make internal resistor pulldown
	

    currentState = 0;                         // Initialize global variable
    pushes = 0;                               // Initialize global variable
    P1OUT &= ~(OUTPUTMASK);                   // Clear output LEDs
}

// Read input function
char readInput(void)
{
    char local = 0;

    if (!(BIT3 & P1IN))                       // Check for button push
    {
        pushes += 1;                          // increment pushes variable
        local = 1;
		direction = 1;
        _delay_cycles(10000);                 // Wait for bouncing to end
    }
	else if (BIT1 & P2IN)                       // Check for button push
    {
        pushes -= 1;                          // decrement pushes variable
        local = 1;
		direction = 0;
        _delay_cycles(10000);                 // Wait for bouncing to end
    }
    else{
        local = 0;
        _delay_cycles(10000);                 // Wait for bouncing to end
    }
    return local;
}

// Count up function
void countUp(void)
{
    switch(currentState){
    case 0: {
        currentState = 1;
        P1OUT |= BIT6;
        P1OUT &= ~(BIT0);
        break;
    }
    case 1: {
        currentState = 2;
        P1OUT &= ~(BIT6);
        P1OUT |= BIT0;
        break;
    }
    case 2: {
        currentState = 3;
        P1OUT |= BIT6;
        P1OUT |= BIT0;
        break;
    }
    case 3: {
        currentState = 0;
        P1OUT &= ~(BIT6);
        P1OUT &= ~(BIT0);
        break;
    }
    }
}

// Count down function
void countDown(void)
{
  switch (currentState)
  {
  case 3:
     currentState = 2;
     P1OUT |= BIT6;
     P1OUT &= ~(BIT0);
     break;
  case 2:
	  currentState = 1;
	  P1OUT &= ~(BIT6);
	  P1OUT |= BIT0;
	  break;
  case 1:
	  currentState = 0;
	  P1OUT |= BIT6;
	  P1OUT |= BIT0;
	  break;
  case 0:
	  currentState = 3;
	  P1OUT &= ~(BIT6);
	  P1OUT &= ~(BIT0);
	  break;
  }
}


// Main function
int main(void)
{
  char enable = 0;                        // Holds status of the S2 button
  char previousState = 0;                 // Holds previous state of S2 button
  init();                                 // One time initialization function

  while (1)
  {
      
      enable = readInput();               // Check the buttons

      if(enable && !previousState){
          // If button is pressed, allow counter to increment/decrement once
         if(direction){
             countUp();
         }
         else{
             countDown();
		 }
        }
      previousState = enable;
	  
	   
  }
}

MSP430FR2422: BSL software for Android

$
0
0

Part Number:MSP430FR2422

Hello,

I have a question.

Is software for writing with BSL (I2C) from Android host available in TI?

I would like to write firmware from the Android OS host to MSP430FR2422 with I2C.

Regards,


MSP430FR2433: MSP430FRBoot for Dual image mode

$
0
0

Part Number:MSP430FR2433

We refer the slaa721b and download "MSP430FRBoot_1_01_00_00 " for dual image application,

We have some problems on the MSP430FRBoot_1_01_00_00\Target\FR5969_UART example projects.

1. After we checked the App1 and APP2 projects, that have the same APP start address in both linker file.

If we need to implement dual image on the MSP430FR5969 (APP1 size = 30KB , APP2 size = 30KB),

How do we modify the App start address and vector ISR at linker file in the APP1 and APP2 examples?

2. Besides APP1 and APP2 examples, Does the MSPBoot project need to modify the link file ?

3. Could you help to understand the dual image design on the MSP430FRBoot's example or any document for demo of dual image?

we have refer https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/671662/2505705#2505705 

MSP430FR2433: MSP430FRBoot for Dual image mode on FR5969

$
0
0

Part Number:MSP430FR2433

We refer the slaa721b and download "MSP430FRBoot_1_01_00_00 " for dual image application,

We have some problems on the MSP430FRBoot_1_01_00_00\Target\FR5969_UART example projects.

1. After we checked the App1 and APP2 projects, that have the same APP start address in both linker file.

If we need to implement dual image on the MSP430FR5969 (APP1 size = 30KB , APP2 size = 30KB),

How do we modify the App start address and vector ISR at linker file in the APP1 and APP2 examples?

2. Besides APP1 and APP2 examples, Does the MSPBoot project need to modify the link file ?

3. Could you help to understand the dual image design on the MSP430FRBoot's example or any document for demo of dual image?

we have refer

MSP-GANG: MSP-GANG:ERROR 23: MCU device initialization failed. ERROR 385: - empty code in selected memory space.

$
0
0

I have programmed MSP430F149 target board with MSP430-GANG. It was fine.

Recently I am trying to use MSP-GANG instead MSP430-GANG. However, the following error appeared.

ERROR 23: MCU device initialization failed.
ERROR 385: Nothing to program / verify - empty code in selected memory space.

What should I check?

C6607670_V0201.hex is actually 60 kB, but it is not recognized in the GUI.

Compiler/MSP-EXP432P4111: Using google test with the TI Compiler

$
0
0

Part Number:MSP-EXP432P4111

Tool/software: TI C/C++ Compiler

on Linux 16.04 and CCS Version: 8.0.0.00016, MSP-EXP432P4111

I would like to use gtest ( google test) to run unit tests for TI code (ti-cgt-arm-18.1.1.LTS).

I get errors:

"/usr/local/include/gtest/internal/gtest-port.h", line 266: fatal error #1965: cannot open source file "sys/stat.h"

This is normal since the TI compiler doesn't search in the normal linux header locations.

In my CCS installation folder I have:

~/ti
❯ print -l **/stat.h
ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/stat.h
simplelink_msp432p4_sdk_2_10_00_14/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/sys/stat.h

This suggests that I either have to use gcc or the stat.h from the SDK. But I don't understand what "install-native" means in the path. And why is this header part of the tirtos package ? Shouldn't this file be available independently from the stack I use (RTOS or bare metall) ?

Regards

Peter

CCS/MSP430G2553: MSP430G2553:

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

Dear  Forum,

can i use terminal box in ccs?/

if yes tell me procedure??

i want use UART, to see AT commands and see return answers want something to watch...

please guide me?/

MSP432P401R: Putting device in sleep or low power mode

$
0
0

Part Number:MSP432P401R

Hello!

For my project I'm implementing a power button to turn my device on/off. Doing so, I would like to put the processor in sleep mode or low power mode. I have a pin-change interrupt for my power button and I've read where you can enable/disable sleep on ISR exit. Would this be suitable for my situation? 

Just to add, I'm running my device at 48MHz for FFT/Touchscreen so I'm using VCORE1, not sure If I need to do anything to disable that to put the processor in sleep or low power mode?

Any help/advice is appreciated!

Thank you, 

Jacob Leeson

MSP430FR2633: UART Example not working

$
0
0

Part Number:MSP430FR2633

Hi MSP team.

I am trying out the UART example provided in the file msp430fr243x_euscia0_uart_01.c from here:

I am running on the Captivate EVM:

I debugging using CCS V7, using the Terminal in CCS with the following Settings:

The MSP430FR2633 isnt receiving any characters.

What have I done wrong?

BR

Anders Lange


MSP430F5359: Please help me understand how low-power mode interacts with the USCI UARTs

$
0
0

Part Number:MSP430F5359

SLAU208P (the MSP430x5xx and MSP430x6xx Family User's Guide) makes the following statement:

36.3.14 Using the USCI Module in UART Mode With Low-Power Modes

The USCI module provides automatic clock activation for use with low-power modes. When the USCI
clock source is inactive because the device is in a low-power mode, the USCI module automatically
activates it when needed, regardless of the control-bit settings for the clock source. The clock remains
active until the USCI module returns to its idle condition. After the USCI module returns to the idle
condition, control of the clock source reverts to the settings of its control bits.

Let's suppose I've set up a UART (say, UCA1) as follows:

  • It's clocked from SMCLK
  • SMCLK is driven from MCLK
  • MCLK is driven from the FLL DCO at 8 MHz
  • RXIE for this UART is enabled

Then, suppose I put the microprocessor into low-power mode (say, LPM3) so MCLK and SMCLK are off.

Interpreting Section 36.3.14 freely, I'd assume that a Marking-to-Spacing transition on the Rx Data line coming into the UART would activate the UART and the UART would then request SMCLK (hopefully in time to catch the incoming asynch Start bit or at least the first data bit). Then, I'd further hope that the setting of RXIFG at the end of the character would cause an interrupt that would take the microprocessor out of LPM3 while the USCI_A1_VECTOR interrupt is being processed.

But for me, this doesn't seem to be happening. My UART only receives characters when some other action in my system has already taken the microprocessor out of LPM3.

Am I reading that paragraph too optimistically and hoping for too much automation? Or am I failing to set up some bit that's blocking this bit of automation?

Notes:

  1. TRANSMITTING characters from the UART seems to properly request/enable SMCLK.
  2. I don't see anything in the device Errata that is relevant to this.
  3. Substantially the same code worked without this difficulty on our previous MSP430F2618 design but that's no guarantee that I ported everything correctly/completely.

MSP430G2553: MSP430 I2C HTS221 Humidity Temperature sensor

$
0
0

Part Number:MSP430G2553

According to this solution, offered by Gary H, the registers for reading the calibration values and the Output values are 0xB0 and 0xA8, respectively. But in the datasheet those numbers are NOT referenced. Where were this numbers gotten? Is the datasheet incomplete? Is there some sort of operation where the numbers are deducted that I'm missing?

Thanks in advance.

MSP430F1111A: test case will delete: "@#$%^$&*@#"

MSP430F1111A: test case will delete: "@#$%^$&*@#"

MSP430F1111A: test case will delete: "@#$%^$&*@#" related thread

Viewing all 21975 articles
Browse latest View live


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