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

CCS/MSP432P401R: UART receive/transmit

$
0
0

Part Number: MSP432P401R

Tool/software: Code Composer Studio

I have a MSP432P401R and BOOSTXL-EDUMKII. I am having trouble sending an image from the PC to the MSP432 through the UART to be displayed on MKII. The MKII has a 128x128 display. I have a bitmap image that has a color depth of 256K colors represented in a 128x128 array. I am having trouble sending that image in array form in DriverLib and Register Level to the board. Is this possible?


MSP430FR5739: Execute the function from RAM

$
0
0

Part Number: MSP430FR5739

Hello All,

We are using MSP430FR5739 and developing the firmware on IAR IDE.
We want to be able to execute the function from RAM, by copying it from specific location of FRAM. Is this possible ?
We have looked at different methods recommended here by on community posts, however, we are running into issue and would like to know if there are any official guidelines from TI (also IAR if any).
Please let me know if anyone had been able to successfully do this.

Regards,
Devika R

MSP432P4011: MSP432P4011 ESD EMI troubles

$
0
0

Part Number: MSP432P4011

Hi, we want to use the MSP432P4011(64-pin) instead of the MSP432P4111(100-pin), used on LaunchPad. They all die after programming and running them. After a long search we will now create an ESD safe environment and adapt the pcb with protection. First we dive into literature and some experiments to better understand whats happening! At this stage, tips are welcom!

regards, Laurent

2M Engineering
the Netherlands 

WEBENCH® Tools/MSP430FR6047: what the meaning of term in x and y axis in ADC capture graph?

$
0
0

Part Number: MSP430FR6047

Tool/software: WEBENCH® Design Tools

y-axis means the -  amplitude of received signal train, but what's its magnitude (i.e mvolts or volts)

x - axis - ADC Buffer index ?

please help me understand this graph? 

MSP432P401R: How to change stack and heap size in ccsv6 gcc compiler.

$
0
0

Part Number: MSP432P401R

The linker file is msp432p401r.lds so how to make a change in that file or is there any other option available to change stack size from. like Project>>Properties then >>...................... because I can't find the same. Help me with this. this is the  msp432p401r.lds file.

MEMORY
{
    MAIN_FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00040000
    INFO_FLASH (RX) : ORIGIN = 0x00200000, LENGTH = 0x00004000
    SRAM_CODE  (RWX): ORIGIN = 0x01000000, LENGTH = 0x00010000
    SRAM_DATA  (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
}

REGION_ALIAS("REGION_TEXT", MAIN_FLASH);
REGION_ALIAS("REGION_BSS", SRAM_DATA);
REGION_ALIAS("REGION_DATA", SRAM_DATA);
REGION_ALIAS("REGION_STACK", SRAM_DATA);
REGION_ALIAS("REGION_HEAP", SRAM_DATA);
REGION_ALIAS("REGION_ARM_EXIDX", MAIN_FLASH);
REGION_ALIAS("REGION_ARM_EXTAB", MAIN_FLASH);

SECTIONS {

    PROVIDE (_intvecs_base_address =
        DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x0);

    .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) {
        KEEP (*(.intvecs))
    } > REGION_TEXT

    PROVIDE (_vtable_base_address =
        DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20000000);

    .vtable (_vtable_base_address) : AT (_vtable_base_address) {
        KEEP (*(.vtable))
    } > REGION_DATA

    .text : {
        CREATE_OBJECT_SYMBOLS
        KEEP (*(.text))
        *(.text.*)
        . = ALIGN(0x4);
        KEEP (*(.ctors))
        . = ALIGN(0x4);
        KEEP (*(.dtors))
        . = ALIGN(0x4);
        __init_array_start = .;
        KEEP (*(.init_array*))
        __init_array_end = .;
        *(.init)
        *(.fini*)
    } > REGION_TEXT AT> REGION_TEXT

    .rodata : {
        *(.rodata)
        *(.rodata.*)
    } > REGION_TEXT AT> REGION_TEXT

    .ARM.exidx : {
        __exidx_start = .;
        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
        __exidx_end = .;
    } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX

    .ARM.extab : {
        *(.ARM.extab* .gnu.linkonce.armextab.*)
    } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB

    __etext = .;

    .data : {
        __data_load__ = LOADADDR (.data);
        __data_start__ = .;
        KEEP (*(.data))
        KEEP (*(.data*))
        . = ALIGN (4);
        __data_end__ = .;
    } > REGION_DATA AT> REGION_TEXT

    .bss : {
        __bss_start__ = .;
        *(.shbss)
        KEEP (*(.bss))
        *(.bss.*)
        *(COMMON)
        . = ALIGN (4);
        __bss_end__ = .;
    } > REGION_BSS AT> REGION_BSS

    .heap : {
        __heap_start__ = .;
        end = __heap_start__;
        _end = end;
        __end = end;
        KEEP (*(.heap))
        __heap_end__ = .;
        __HeapLimit = __heap_end__;
    } > REGION_HEAP AT> REGION_HEAP

    .stack (NOLOAD) : ALIGN(0x8) {
        _stack = .;
        __stack = .;
        KEEP(*(.stack))
    } > REGION_STACK AT> REGION_STACK
}

CCS/MSP430F413: DCOCTL

$
0
0

Part Number: MSP430F413

Tool/software: Code Composer Studio

error #20: identifier "DCOCTL" is undefined
error #20: identifier "BCSCTL1" is undefined

Now I want to executing this source code on MSP430F413 but the errors occurred.

MSP430FR2355: Smart combo for audio processing

$
0
0

Part Number: MSP430FR2355

Hello,
customer needs a compact solution for signalling tones, speech and sounds on a small loudspeaker and also measuring enviroments noise with a microphone. I thought to use MSP430FR2355 for this tasks. I thought of following way:

Measuring sound:
Microphone -> OA -> 12bit-ADC -> CPU

Generating sound:
Flash -> CPU/DMA -> 12bit DAC -> OA -> loudspeaker

Can this work? Is there any reference design?

Regards, Holger

CCS/MSP-FET: MSP-FET-432ADPTR + MSP-FET on MSP-EXP432E401Y board

$
0
0

Part Number: MSP-FET

Tool/software: Code Composer Studio

I have the same issue (ie use MSP-FET with the MSP-EXP432E401Y board).

Can I use the  MSP-FET-432ADPTR with the MSP-FET to work with MSP432E4 ?

Or do I have order tow useless tools?


MSP432P4111: I2C waveforms incorrect on the MSP432

$
0
0

Part Number: MSP432P4111

We are porting code from the MSP430 to the MSP432P4111, and the waveform I'm getting from the MPS432 doesn't look correct.  The data signal (shown in the red trace) is connected to pin 78 (GPIO port P6.4), while the clock signal (shown in the yellow trace) is connected to pin 79 (GPIO port P6.5).  The two I2C lines are connected to an LCD display driver, and the MSP430-based design shows characters on the LCD display, while the MSP432-based design does not.  As shown below, the clock trace looks good, but the data trace seems to return to the high state, and is sometimes at a level between gnd and Vcc.

MSP432 waveform displaying bad data line

By contrast the MSP430 waveform seems healthy:

Note that the two transfers shown are different data (obviously), but you can see the difference.  On the MSP430 both signals remain in a high logic state until a transfer occurs, and the data signal is high or low, no "in-between" states like what is seen on the MSP432.  We are using DMA for the transfer, but I'll only present the code related to the I2C functionality for simplicity.

I2C initialization and send sequence:

#define LCD_I2C_DATA BIT4 //LCD I2C Data

#define LCD_I2C_CLK BIT5 //LCD I2C CLK

#define I2C_BASE_ADDR         EUSCI_B1_BASE

//pins 78, 79 - P6.4,5 - I2C

GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, LCD_I2C_DATA | LCD_I2C_CLK, GPIO_PRIMARY_MODULE_FUNCTION);

i2cConfig.selectClockSource= EUSCI_B_I2C_CLOCKSOURCE_SMCLK; //SMCLK source

i2cConfig.i2cClk= CS_getSMCLK();

i2cConfig.dataRate= EUSCI_B_I2C_SET_DATA_RATE_400KBPS;

i2cConfig.byteCounterThreshold= 0;

i2cConfig.autoSTOPGeneration= EUSCI_B_I2C_NO_AUTO_STOP;

I2C_initMaster(I2C_BASE_ADDR, &i2cConfig);

I2C_setSlaveAddress(I2C_BASE_ADDR, IIC_SLAVE_ADRS);

I2C_setMode(I2C_BASE_ADDR, EUSCI_B_I2C_TRANSMIT_MODE);

I2C_enableModule(I2C_BASE_ADDR);

I2C_enableInterrupt(I2C_BASE_ADDR, EUSCI_B_I2C_NAK_INTERRUPT);

SET_LCD_PWR_HI();

I2C_masterSendMultiByteStart(I2C_BASE_ADDR, *PTxData++);

I2C_masterSendStart(I2C_BASE_ADDR);

Any ideas?  Thx.

CCS/MSP-EXP432E401Y: demo program power measure stops at sl_Start(0,0,0)

$
0
0

Part Number: MSP-EXP432E401Y

Tool/software: Code Composer Studio

Having read similar problems with the MSP-EXP432E401Y board and SimpleLink modules, I cannot find a way to get the demo program to initialize the wifi module and run. 

It appears to hang in an infinite loop when sl_Start(0,0,0) is called in displayBanner() method.

The CC3120MOD provisions correctly using the mobile app and is able to be flashed using Uniflash and the CC31XXEMUBOOST module.

I have tried using both a BOOSTXL-CC3120MOD and a BOOSTXL-CC3135 with the MSP-EXP432E401Y and both have same problem.

We are using CCS  Version: 8.0.0.00016 with Simplelink MSP432E4 SDK 2.40.0.11 and SimplLink SDK WiFi Plugin 2.40.0.22

Hope there is a solution?

CCS/MSP430FR5969: Capturing an external signal and output by serial port.

$
0
0

Part Number: MSP430FR5969

Tool/software: Code Composer Studio

Hello,

as I posted a week ago, I want to mesure an external wave signal and capturing the increase value of the timer. Once I achieved that, I want to to transmit the increase value of the timer by using UART ut (serial port). I used a code that captures a temperature signal and transmit the value, as an example to implement the code on my program but it does not work.

****HERE IS THE EXAMPLE CODE USED*****

#include <stdio.h>
#include <stdint.h>
#include <msp430.h>

long valor;		// Global variable of 16 bits

void UART_print(char *string);	// Function used to transmit by serial port

int main(void)
{
  char result[50];	// String to transmit by serial port

  WDTCTL = WDTPW | WDTHOLD;                 // Stop WDT

  // Configure GPIOs to it's lowest power state
  P1OUT = 0;                                // All P1.x reset
  P1DIR = 0xFF;                             // All P1.x outputs
  P2OUT = 0;                                // All P2.x reset
  P2DIR = 0xFF;                             // All P2.x outputs
  P3OUT = 0;                                // All P3.x reset
  P3DIR = 0xFF;                             // All P3.x outputs
  P4OUT = 0;                                // All P4.x reset
  P4DIR = 0xFF;                             // All P4.x outputs
  PJOUT = 0;                                // All PJ.x reset
  PJDIR = 0xFFFF;                           // All PJ.x outputs

  // Set up XT1
  PJSEL0 = BIT4 | BIT5;           // For XT1

  P2SEL1 |= BIT1 | BIT0;          // Configure UART pins
  P2SEL0 &= ~(BIT1 | BIT0);       // Configure UART pins

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

  // Clock System Setup
  CSCTL0_H = CSKEY >> 8;                    // Unlock CS registers
  CSCTL1 = DCOFSEL_0;              // Set the freq. of DCO = 1 MHz
  CSCTL2 = SELA__LFXTCLK | SELS__DCOCLK | SELM__DCOCLK;
  CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1;     // Set all dividers
  CSCTL4 &= ~LFXTOFF;

  // New: Configure UART.
  UCA0CTLW0 |= UCSSEL__SMCLK | UCSWRST;     // No parity, LSB first, 8-bit data, 1 stop, Funciona amb el SMCLK!!
  UCA0BRW = 6;                              // Baud rate register prescale. Configure 9600 baud. This value works for SMCLK =1MHz
  UCA0MCTLW |= 0x2081;                      // UCBRS = 0x20, UCBRF = 8; UCOS16 = 1
  UCA0CTLW0 &= ~UCSWRST;                    // Enable eUSCI_A

  do
  {
    CSCTL5 &= ~LFXTOFFG;                    // Clear XT1 fault flag
    SFRIFG1 &= ~OFIFG;
  } while (SFRIFG1 & OFIFG);                // Test oscillator fault flag

  do
  {
  __delay_cycles(1000000);					// Wait 1 s
  valor=0x1010;								//Variable to transmit. For example number 16.
  sprintf(result,"Codi: %d \r\n",valor);	// Generates a string
  UART_print(result);              		// Send the result UART
  while(UCA0STATW & UCBUSY);				// Not clear if it is necessary
  } while(1);

  return 0;
}

void UART_print(char *string)                 // Send a zero-terminated string through the UART
{
    char byte = *string++;
    while(byte != 0)
    {
        while(!(UCA0IFG & UCTXIFG));          // Wait until TX buffer ready
        UCA0TXBUF = byte;                     // Send the next byte of info
        byte = *string++;                     // Get the next character to send
    }
}

This program works, but when I try to implement it on my program, it has some errors and i do not know how to solve it.

****HERE IS MY CODE****

#include <stdio.h>
#include <stdint.h>
#include <msp430.h> 

long value;		// Global variable of 16 bits
unsigned int n = 0;
volatile unsigned int vinitial;
volatile unsigned int vfinal;
volatile unsigned int result;

void UART_print(char *string);

int main(void)
{
	 char results[50];	// Character string to transmit by serial port

    WDTCTL = WDTPW | WDTHOLD;	// Stop watchdog timer
	

    // Configure GPIO
     P1OUT &= ~0x01;                           // Clear P1.0 output
     P1DIR |= 0x01;

     P1SEL1 &= ~BIT3; 						   // Set P1.3 to input direction
     P1SEL0 |= BIT3;
     P1DIR &= ~BIT3;

     P2SEL1 |= BIT1 | BIT0;          // Configure UART pins
     P2SEL0 &= ~(BIT1 | BIT0);       // Configure UART pins

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

      // Clock System Setup
      CSCTL0_H = CSKEY >> 8;                    // Unlock CS registers
      CSCTL1 = DCOFSEL_0;                       // Set DCO to 1MHz
      CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK;  // Set SMCLK = MCLK = DCO ACLK = VLOCLK
      CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1;     // Set all dividers to 1
      CSCTL4 &= ~LFXTOFF;
      CSCTL0_H = 0x00;                          // Lock CS module (use byte mode to upper byte)

      __delay_cycles(1000);                     // Allow clock system to settle

      UCA0CTLW0 |= UCSSEL__SMCLK | UCSWRST;     // No parity, LSB first, 8-bit data, 1 stop, It works with SMCLK
      UCA0BRW = 6;                              // Baud rate register prescale. Configure 9600 baud. This value is correct if SMCLK works at 1 MHz
      UCA0MCTLW |= 0x2081;                      // UCBRS = 0x20, UCBRF = 8; UCOS16 = 1
      UCA0CTLW0 &= ~UCSWRST;                    // Enable eUSCI_A

      // Timer0_A3 Setup
      TA1CCTL2 = CM_1 | CCIS_0 | SCS | CAP | CCIE;
                                                // Capture rising edge,
                                                // Use CCI2A=P1.3,
                                                // Synchronous capture,
                                                // Enable capture mode,
                                                // Enable capture interrupt

      TA1CTL = TASSEL__SMCLK | MC__CONTINUOUS ;  // Use SMCLK as clock source, Start timer in continuous mode.

      TA1EX0 = 0X00;

      __bis_SR_register(LPM0_bits | GIE);
      do
      {
      __delay_cycles(1000000);					// Wait 1 s
      value=result;								// Output value
      sprintf(results,"The result is: %d \r\n",value);	// It generates a string with the result
      UART_print(results);              		// Send the increase value of the timer through the backchannel UART
      while(UCA0STATW & UCBUSY);				// I do not know if it is necessary
      } while(1);

      return 0;
    }
    }

    // Timer1_A3 CC1-4, TA Interrupt Handler
    #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
    #pragma vector = TIMER1_A1_VECTOR
    __interrupt void Timer1_A1_ISR(void)
    #elif defined(__GNUC__)
    void __attribute__ ((interrupt(TIMER1_A1_VECTOR))) Timer1_A1_ISR (void)
    #else
    #error Compiler not supported!
    #endif
    {
      switch (__even_in_range(TA1IV, TA1IV_TAIFG)) {
        case TA1IV_TA1CCR1:
          break;
        case TA1IV_TA1CCR2:
          if (n == 0){
        	  vinitial = TA1CCR2;
        	  n = 1;
          }
          else {
        	  vfinal = TA1CCR2;
        	  n=0;
          }

          result = (vfinal-vinitial);
          __bic_SR_register_on_exit(LPM0_bits); // Exit active CPU
          break;
        case TA1IV_TA1IFG:
          break;
        default:
          break;
      }
    }

    void UART_print(char *string)                 // Send a zero-terminated string through the UART
    {
        char byte = *string++;
        while(byte != 0)
        {
            while(!(UCA0IFG & UCTXIFG));          // Wait until TX buffer ready
            UCA0TXBUF = byte;                     // Send the next byte of info
            byte = *string++;                     // Get the next character to send
        }
    }

It has some errors and I do not know how to solve it.

Thank you for your help and sorry for the inconvenience.

Adrian.

MSP430F6779A: Need help with Timers

$
0
0

Part Number: MSP430F6779A

ok, so I would try to explain and make it clear as much as possible. I am using MSP430F6779A and want to generate a PWM signal in pin 66(P4.7). Please refer page 12 of the datasheet for IC pin diagram and page 23 for the pin description. The pin is mapped to Timer TA3.0 with compare/ capture register TA3CCR0. From what I have learned, we need two CCR for generating PWM. We load the PWM cycle Period in TACCR0 register and the duty cycle set/reset time in the corresponding Timer mapped compare/caprture Register. For eg. At Pin 44 (P2.2 Timer mapped TA0.2), I am able to generate the desired PWM by putting PWM cycle Period in TA0CCR0 Register and the duty cycle period in TA0CCR2 register.  Let's say, TA0CCR0 = 255 & TA0CCR2  = 100. Then we assign OUTMOD_7 to the pin for Reset/Set operation. So initially, when the timer counts from 0 to TA0CCR2 value( 100 in this example) the pin is reset, but after it reaches TA0CCR2 value, the pin is set until it reaches TA0CCR0 value (255 in this example). This way we get the PWM.

But, here in P4.7 (TA3 Comapre/capture Register 0) I am unable to get the PWM. Suppose, we load the PWM cycle period in TA3CCR0 register, where are we supposed to load the duty cycle ON/OFF time period so the pin set/reset after certain time. Please help me with this as I think its not possible to get a PWM at that Pin. Please let me know if I am missing out something. Thanks in Advance! 

Compiler/MSP430F5659: MSP430 Sleep Mode Requirement

$
0
0

Part Number: MSP430F5659

Tool/software: TI C/C++ Compiler

Hi TI team,

 

Device Details:

    Controller Used - msp430F5659

    Interface - USB-CDC

What is our requirement?

Our device runs with controller msp430f5659, Purpose is for measurement of physical quantities. 

We communicate with the device using dedicated app and send the request to start measurement. 

Now we want to bring the microcontroller to "Deep sleep mode" when device is in idle state to consume the power.

Kindly advice on this request.

 

Best Regards

Manoj

 

 

MSP430F2619: ADC registers

$
0
0

Part Number: MSP430F2619

Hi,

I am using msp430f2619 for adc conversion while I want to access two  adc conversion memory registers at the same time but unfortunately two pins provided with the same voltage provide slightly different values in the memory and as well as for the provided analog value the digital value varies time to time

" for example analog value = 0.350v it provided decimal values of (400-500), analog value = 2.1v it provided decimal values of (2550-2751)"

ADC12CTL0 = 0x2290; /* ADC conversion set */
ADC12CTL1 = 0x0202; /* ADC Memory register & sample and Hold timer set */
ADC12MCTL0 = 0x00; /* Channel select */
ADC12MCTL1 = 0x01;
ADC12CTL0 = 0x2293; /* ADC conversion initiated */
reg1 = ADC12MEM0;
reg2 = ADC12MEM1;

Is there any possibilities of getting a stable register value and moreover other register such as ADC12MEM3 - ADC12MEM12 also provide some values how do i stop them

does the 

MSP432E401Y: How can i erase the flash?

$
0
0

Part Number: MSP432E401Y

Hello,

For updating a firmware image how exactly would this work in the field, if iam using ethernet as the updaters transport layer.I have a launchpad for a MSP432E401Y and iam following the first link below but when i get to Task4. Instruction 1 using ethernet it assumes that the MCU's flash is erased.The only way the BSL scripter can erase memory is through the USB DFU Comm. per Table.1 page 5 in the second link what exactly are my options here to be able to update the firmware 100% using ethernet?

Thanks any input is appreciated

http://dev.ti.com/tirex/content/simplelink_academy_msp432e4sdk_1_15_00_00/modules/msp432e4_bootloader/msp432e4_bootloader.html

https://www.ti.com/lit/ug/slau655f/slau655f.pdf


MSP430FR2311: MSP430 FRAM write/ read

$
0
0

Part Number: MSP430FR2311

Hi TI Team,

The MSP430FR2311PW20 got the FRAM, right? 

Looking for any sample code to read/write from/to FRAM .

Regards,

Walter

CCS/MSP430FR5992: Invalid time value in RTC_C module

$
0
0

Part Number: MSP430FR5992

Tool/software: Code Composer Studio

Hi, 

I've a problem with RTC_C module. 

My board does not have an external oscillator. I need to run RTC with only internal oscillators available.
I launched ACLK from the VLO source and MCLK from the DCO source. Unfortunately, the time entered in the time registers does not change.

Which clocks should I run and from which sources to get full functionality without an external oscillator?

Best regards, 

Paulina

CCS/MSP-EXP430F5529LP: I want to use EnergyTrace with MSP-EXP430F5529LP

$
0
0

Part Number: MSP-EXP430F5529LP

Tool/software: Code Composer Studio

Hi, Thank you for support.
An evaluation board has arrived and is being checked for operation.

There was a problem that EnergyTrace could not be used.
When the EnergyTrace icon is pressed, the following error occurs:
"Error communicating with FET USB1"

The following check boxes are grayed out. Is there anything related to this problem?
Project> Properties> MSP43xOptions> Low Power Mode Settings

MSP430F2112: working temperature confirmation

$
0
0

Part Number: MSP430F2112

Hello everybody , 

for MSP430F2112IRHBR     we declare  temperature  under "reccomended opertating conditions " as   "Operating free-air temperature"  :   do we mean   ambient temperature  ?

can I consider  "T" version ( declared 105 )    able to work  up to 105 degrees  AMBIENT ?  ( so junction will be higher for sure ) 

best regards

Carlo

MSP430F2619S-HT: could it be using to drive BLDC Sensor Less Motor ?

$
0
0

Part Number: MSP430F2619S-HT

Greetings,

Can I use in MSP430F2619S-HT Timer module to generate PWM for BLDC motor control ( I would need 6 outputs for 3x PWM_H and PWM_L drivers)

Thank you in advance,

Gadi Fishel 

Viewing all 21961 articles
Browse latest View live


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