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

Compiler/MSP430G2553: CCS/ infoB

$
0
0

Part Number:MSP430G2553

Tool/software: TI C/C++ Compiler

Hi all,

I am trying to write to infoB of MSP430G2553 using,

#pragma DATA_SECTION(var_a, ".infoB")

const int var_a = 980;

But if I replace the infoB with infoC then I am able to write to infoC but not to infoB, is there any way possible to write to infoB as I have utilized the entire infoC and infoD. Can't use the infoA because of clock calibration data.

Thanks

Nitish


MSP430F2617: MSP430 32kHz crystal oscillator accuracy

$
0
0

Part Number:MSP430F2617

Hi, 

Looking at the datasheet, there is quite a large error across the voltage/temp range for the 32kHz crystal oscillator.  But I'm more interested in the error at a fixed voltage and fixed temperature.  In this case, would the error approach that of the crystal tolerance spec?  We are using MSP's internal loading caps, but they are not specified with a min/max (only typ) in the datasheet, so will they have their own process variation that would increase the error?  If so, any idea how much?  We are using a 20ppm tolerance crystal, trying to figure out if our overall error would be near that, or 40ppm, or 100ppm,  or ???

Thank you,

Erik

MSP430FR6989: Evaluation kit driver problem

$
0
0

Part Number:MSP430FR6989

Hi

I've just bought brand new development kit. I've got IAR embedded workbench innstalled, however I cant upload any program to microcontroler.

Looks like there is a problem with usb driver because device manager says "USB device not recognized device descriptor failure"

The same situation occurs for my laptop and PC.

I've tried to installl this http://www.ti.com/tool/mspds 

MSP430AFE253: MSP430AFE253

Compiler/EVM430-F6736: Warning messages received when compiling the software of EVM430-F6736

$
0
0

Part Number:EVM430-F6736

Tool/software: TI C/C++ Compiler

Hi,

I'm using the EVM430-F6736 development board for single phase energy meter measurement.

I'm using the software for this development board is slaa517. I have IAR embedded workbench version is 7.12.1

 when i compiled these file : emeter-toolkit-6733.ewp . i have following errors like

Building configuration: emeter-toolkit-6733 - Debug
Updating build tree...
 
54  file(s) deleted.
Updating build tree...
accum48.s43
bin2bcd16.s43
bin2bcd32.s43
dc_filter16.s43
dc_filter24.s43
imul16.s43
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\imul16.s43 95
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\imul16.s43 100
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\imul16.s43 100
Warning[410]: A NOP needs to be added after setting GIE if the next instruction clears GIE, as required by the architecture C:slaa517\SLAA517\Source\emeter-toolkit\imul16.s43 100
isqrt16.s43
mul48_32_16.s43
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:slaa517\SLAA517\Source\emeter-toolkit\mul48_32_16.s43 67
mul48u_32_16.s43
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:slaa517\SLAA517\Source\emeter-toolkit\mul48u_32_16.s43 67
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:slaa517\SLAA517\Source\emeter-toolkit\mul48u_32_16.s43 67
Warning[410]: A NOP needs to be added after setting GIE if the next instruction clears GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\mul48u_32_16.s43 67
q1_15_mul.s43
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mul.s43 91
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mul.s43 96
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mul.s43 96
q1_15_mulq.s43
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulq.s43 93
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulq.s43 98
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulq.s43 98
Warning[410]: A NOP needs to be added after setting GIE if the next instruction clears GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulq.s43 98
q1_15_mulr.s43
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulr.s43 88
Warning[413]: A NOP needs to be added before setting GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulr.s43 93
Warning[411]: A NOP needs to be added after clearing GIE, as required by the architecture C:\slaa517\SLAA517\Source\emeter-toolkit\q1_15_mulr.s43 93
shift48.s43
sqac48_16.s43
sqac64_24.s43
div48.c  
debounce.c  
dds.c  
div_sh48.c  
flash_replace16.c  
flash_replace32.c  
flash_memcpy.c  
flash_clr.c  
flash_secure.c  
flash_write_int32.c  
flash_write_int8.c  
flash_write_int16.c  
host_dec32.c  
host_dec16.c  
host_char.c  
hex2ASCII.c  
host_hex32.c  
host_hex16.c  
host_decu16.c  
host_decu32.c  
isqrt32i.c  
iiceeprom.c  
host_str.c  
isqrt32.c  
LCD-module.c  
LCD-internal.c  
isqrt64i.c  
isqrt64.c  
LCDdec16.c  
LCD-sim.c  
LCDdecu16.c  
LCDdec32.c  
rtc.c  
rand16.c  
LCDdecu32.c  
mul48.c  
rtc_data.c  
setdco.c  
Building library
 
     IAR Universal Library Builder V6.5.1.95
     Copyright 1999-2016 IAR Systems AB.
 
Total number of errors: 0
Total number of warnings: 18

The above warning messages on assembly file only.  Is this assembler file not supported by latest version of IAR?

How can i solve this?

regards,

Anitha.L

MSP432P401R: Problem using Energia code with Boost sense 1 and MSP432

$
0
0

Part Number:MSP432P401R

Dear all,


I am trying to use Booster Sensor 1 capacitive touch with MSP432. There are few programs are given on the net since TI has stopped supporting this device.
There are some nice sketches from Robert Wessels, year 2012. Unfortunately when I run those programs I get the following errors:

=========================================================================================

sketch\CapTouch.cpp.cpp: In constructor 'CapTouch::CapTouch(uint8_t, uint8_t)':

CapTouch.cpp.cpp:33:37: error: 'digitalPinToPort' was not declared in this scope

uint8_t port = digitalPinToPort(pin);

^

CapTouch.cpp.cpp:35:14: error: 'NOT_A_PORT' was not declared in this scope

if (port == NOT_A_PORT) return;

^~~~~~~~~~

CapTouch.cpp.cpp:38:30: error: 'portSel2Register' was not declared in this scope

sel2 = portSel2Register(port);

^

CapTouch.cpp.cpp:40:14: error: 'NOT_A_PORT' was not declared in this scope

if (sel2 == NOT_A_PORT) return;

^~~~~~~~~~

CapTouch.cpp.cpp:43:31: error: 'digitalPinToBitMask' was not declared in this scope

bit = digitalPinToBitMask(pin);

^

CapTouch.cpp.cpp:46:28: error: 'portSelRegister' was not declared in this scope

sel = portSelRegister(port);

=================================================================

And many more which I have not bother to include. There are all in the same context.

I have his header file, but I am sure I missing something extra. Can somebody help me since I have to take care of lecture regarding the capacitive sensor using MSP432.

Thank you in advance.
Mostafa

RTOS/MSP432E401Y: Writing and Reading a Specific Location

$
0
0

Part Number:MSP432E401Y

Tool/software: TI-RTOS

Hi,,

I am using "nvsinternal" example program for my application.

Using that application i am able to write the data on to the flash memory and read the flash memory.

However i would like to write the data on to the specific memory location and read when needed.

As per the example the Base address is : 0xE0000 and sector size is: 0x4000. that means i can write the data from (0xE0000 to 0xE3FFF).

If at all i want to write the data to the location (0xE2000) then how to initialize the write address to the nvs handle while writing and reading the location. 

Thank you

Regards

Kalyan.

MSP430FR6047: Question about meter constant

$
0
0

Part Number:MSP430FR6047

As the flow picture, the Area is meter constant, and I get my meter constant around 25.434.

( 3.14 * 0.015 * 0.015 * 0.08 ) / 8 = 0.000007065 (m3/s) 

0.000007065 * 3600 * 1000 = 25.434 (L/h)

But TI's meter constant is 12742000 (L/h), what should I do to get the correct result?

Thank you. 


MSP432P401R: MSP432P401R: BPSK Modulation/Demodulation

$
0
0

Part Number:MSP432P401R

Did anyone have a slaa681a archive left, is it no longer available for download on the official website? Tell me, please, where to get the source code for the project -CCS / MSP432P401R: BPSK Modem Implementation With SimpleLink ™ MSP432 ™ MCUs - slaa681a?

MSP-EXP430FR5969: Need center-to-center distance of the J4 and J5 "Booster Pack" connectors on the eval board so i can design a board that plugs into them

$
0
0

Part Number:MSP-EXP430FR5969

I get an error message "Could not determine how this design was created.  Xpedition xPCB Layout cannot be invoked on this design." 

I was trying to open the layout file called "MSP-EXP430FR5969.pcb" that I obtained from the TI website for this evalue board.

I was using  Mentor Graphics  XPedition Enterprise X-ENTP VX.2.1 layout tool. 

Questions: 

1.  What layout tool was the file created with?

2. Does TI have another file that I could use to view the layout?  I just want to know the center-to-center distance between the J4 and J5 connectors.  I suppose I could measure it, but I want to be exact and the layout files would give me the exact distance.

MSP432P401R: For Driverlib where is the MAP_GPIO_setOutputStateOnPin

$
0
0

Part Number:MSP432P401R

I am pretty sure that there is little development on driver lib any more, but:

We can set a pin high, we can set a pin low and we can toggle the pin, but why is there no MAP_GPIO_setOutputStateOnPin()?

I envision the signature like this:

MAP_GPIO_setOutputStateOnPin(int Port, int Pin, bool State)

MSP430G2553: ADC

$
0
0

Part Number:MSP430G2553

The voltage difference between the ADC pin 1.1 and ground of MSP430G2553 is 3.5V i.e high. I am unable to read correct ADC value due to this. How do I resolve this issue?

MSP430G2553: Blink onboad LED for one second using TAR compare interrupt

$
0
0

Part Number:MSP430G2553

Hello,

I am trying to blink the onboard LED every one second via a Timer A interrupt, but am failing to understand the logic of specifying the exact interval of the blinking. From what I understand from the users guide, the ACLK is driven directly by the crystal, which oscillates at 32768 Hz. It also says that the TAR increments on every rising edge of the clock signal. So, my immediate thought is that the TAR should overflow after exactly one second if I set the value of the compare register to be 32768, since there is one rising edge per cycle and 32768 cycles in one second. But, with the code I have pasted below, the interrupt triggers roughly every 20 seconds or so. This leads me to believe that the number that should be in TACCR0 is *much* lower than 32768, but I don't know how to calculate it. I'm wondering where my logic is breaking down. I am pretty new to microcontroller development so please forgive me ignorance of electrical engineering related concepts. Please have a look at my code below if you don't mind. Thanks.

#include<msp430g2553.h>

void main(void) {
        // DISABLE WATCHDOG TIMER
        WDTCTL = WDTPW | WDTHOLD;

        // SET TIMER_A CONTROL REGISTER USING ACLK AS CLOCK SRC AND IN UP MODE WITH NO CLOCK DIVISION
        TACTL = TASSEL_1 | MC_1 | ID_0;

        // SET CAPTURE/COMPARE REGISTER TO SPECIFIC VALUE
        TACCR0 |= 0x8000; // 32768 hz, which is the oscillation frequency of aclk

        // SET CAPTURE/COMPARE CONTROL REGISTER TO DICTATE BEHAVIOR OF CAPTURE/COMPARE REGISTER
        // THIS LINE BASICALLY JUST ENABLES INTERRUPTS
        TACCTL0 |= CCIE;

        // MAKE P1.0 AN OUTPUT PIN AND HAVE IT TURNED OFF INITIALLY
        P1DIR |= 0x01;
        P1OUT &= 0x00;

        // ENTER LOW POWER MODE 
        // INFORM STATUS REGISTER THAT CPU IS OFF AND GLOBAL INTERRUPTS ARE ENABLED
        _BIS_SR(CPUOFF + GIE);
}

// INTERRUPT SERVICE ROUTINE... TOGGLE LED1 WHENEVER INTERRUPT OCCURS
// I SUSPECT THAT THE MSP430 PLACES THIS ISR IN THE INTERRUPT VECTOR ADDRESS FOR THIS PARTICULAR INTERRUPT
#pragma vector = TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR (void) {
        P1OUT ^= 0x01;
}

MSP430F5529: UART RX buffer - value not passed to function?

$
0
0

Part Number:MSP430F5529

Hello,

I have a simple UART api that provides reading/writing to hardware UART:

#include "uart.h"
#include <msp430.h>

using namespace Uart;

CircularBuffer write_buffer(256);
CircularBuffer read_buffer(256);

unsigned char tmp_buf[1024];
unsigned int tmp_buf_i = 0;


void Uart::init() {
    P3SEL |= BIT3 + BIT4;

    UCA0CTL1 |= UCSWRST;                      // **Put state machine in reset**
    UCA0CTL1 |= UCSSEL_1;                     // CLK = ACLK
    UCA0BR0 = 0x03;                           // 32kHz/9600=3.41 (see User's Guide)
    UCA0BR1 = 0x00;                           //
    UCA0MCTL = UCBRS_3+UCBRF_0;               // Modulation UCBRSx=3, UCBRFx=0
    UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
    UCA0IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt

    __bis_SR_register(GIE);
}

bool Uart::write(unsigned char *buffer, unsigned int length) {
    if (length > write_buffer.get_size() - write_buffer.get_count()) {
        return false;
    }
    for (int i = length - 1; i >= 0; i--) {
        write_buffer.write(buffer[i]);
    }
    return true;
}

void Uart::read(unsigned char *buffer, unsigned int length) {
    for (unsigned int i = 0; i < length; i++) {
        while (read_buffer.is_empty());
        read_buffer.read(&buffer[i]);

        if (i == 10) {
            __no_operation();
        }
    }
}

void Uart::skip_until(unsigned char *sample, unsigned int sample_length) {
    unsigned char byte;
    unsigned int matching = 0;

    /*
    while (true) {
        Uart::read(&byte, 1);

        if (byte == sample[matching]) {  // If the next part of the sample matches
            matching++;                  // goes forward
        }

        if (matching == sample_length) { // If matching is equal to sample length we're done
            break;
        }
    }
    */
}

#pragma vector=USCI_A0_VECTOR
__interrupt void usci_a0_isr() {
    if (UCA0IFG & UCTXIFG) {
        unsigned char tmp;
        write_buffer.read(&tmp);
        UCA0TXBUF = tmp;
    }

    if (UCA0IFG & UCRXIFG) {
        unsigned char tmp = UCA0RXBUF;

        // Circular buffer NOT WORKING
        read_buffer.write(tmp);

        // Test buffer working
        tmp_buf[tmp_buf_i] = tmp;
        tmp_buf_i = (tmp_buf_i + 1) % 1024;
    }
}

On reading/writing I have two CircularBuffer, tested and working, that store the data that should be write/read.

I have only tested RX reading, since I'm using a GPS module that doesn't require any command.

  • The reading_circular_buffer (read_buffer) reads correct characters but alternates them always with the same sequences:
    As decimals are 50 ("2"), 208, 240, 0, 255, 63 ("?").
  • So I decided to make a temporary buffer (tmp_buf) to see if what my GPS module sent was effectively wrong but it's not! The output is fine!

So I took the CircularBuffer class and tested it a part, but works! And the strange fact is that those foreign characters repeat...


Is there something I'm misunderstanding with MSP430 UART API usage?

Looks like the UCA0RXBUF (copied to tmp) passed to a function changes value. Maybe is the program Stack that is misread on interrupt calls?

CCS/MSP430G2553: Can't Control 7-Segment Display Using I2C

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

I'm using the MSP430 Launchpad in my Microcontroller Applications class. The end goal of my project is to press a button on a keypad and have it output to a 7-segment display using I2C. I have the keypad code working already, but I can't get anything to send over I2C. I started with the msp430g2xx3_uscib0_i2c_08.c example code provided--I assumed it would be plug-and-play (after changing the slave address, of course).

I'm including the body of the example code that I adapted from referencing a working code for the MSP430F5529. The primary problem I'm having currently is that I can't find a vector word for I2C (UCB0IV in this code) for the MSP430G2553. I've combed through a few different datasheets and have been unable to find anything that works. Does anyone have any idea what I can replace that with to get this code working for my 7-segment? Or is this method just not going to work with the MSP430G2553? (Our professor recommended bit-banging, but I'd rather take a cleaner approach if that's possible.)

Thank you!

#include <msp430.h>

unsigned char *PTxData;                     // Pointer to TX data
unsigned char TXByteCtr;
const unsigned char TxData[] =              // Table of data to transmit
{
 0x11,
 0x22,
 0x33,
 0x44,
 0x55
};

int main(void)
{
    WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
    P1SEL |= BIT6 + BIT7;                     // Assign I2C pins to USCI_B0
    P1SEL2|= BIT6 + BIT7;                     // Assign I2C pins to USCI_B0
    UCB0CTL1 |= UCSWRST;                      // Enable SW reset
    UCB0CTL0 = UCMST + UCMODE_3 + UCSYNC;     // I2C Master, synchronous mode
    UCB0CTL1 = UCSSEL_2 + UCSWRST;            // Use SMCLK, keep SW reset
    UCB0BR0 = 12;                             // fSCL = SMCLK/12 = ~100kHz
    UCB0BR1 = 0;
    UCB0I2CSA = 0x3B;                         // Slave Address is 048h
    UCB0CTL1 &= ~UCSWRST;                     // Clear SW reset, resume operation
    IE2 |= UCB0TXIE;                          // Enable TX interrupt

    while (1)
    {
        PTxData = (unsigned char *)TxData;      // TX array start address
        TXByteCtr = sizeof TxData;              // Load TX byte counter
        while (UCB0CTL1 & UCTXSTP);             // Ensure stop condition got sent
        UCB0CTL1 |= UCTR + UCTXSTT;             // I2C TX, start condition
        __bis_SR_register(CPUOFF + GIE);        // Enter LPM0 w/ interrupts
        // Remain in LPM0 until all data
        // is TX'd
    }
}

//------------------------------------------------------------------------------
// The USCIAB0TX_ISR is structured such that it can be used to transmit any
// number of bytes by pre-loading TXByteCtr with the byte count. Also, TXData
// points to the next byte to transmit.
//------------------------------------------------------------------------------
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = USCIAB0TX_VECTOR
__interrupt void USCIAB0TX_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCIAB0TX_VECTOR))) USCIAB0TX_ISR (void)
#else
#error Compiler not supported!
#endif
{
    int j = 0;
    switch (__even_in_range(UCB0IV, 12))
    {
    case 0:
        break;                           // Vector  0: No interrupts
    case 2:
        break;                           // Vector  2: ALIFG
    case 4:
        break;                           // Vector  4: NACKIFG
    case 6:
        break;                           // Vector  6: STTIFG
    case 8:
        break;                           // Vector  8: STPIFG
    case 10:
        j = 0;
        while (++j < 10)
            ;
        break;                           // Vector 10: RXIFG
    case 12:                                  // Vector 12: TXIFG
        if (TXByteCtr)                            // Check TX byte counter
        {
            UCB0TXBUF = *PTxData++;                 // Load TX buffer
            TXByteCtr--;                            // Decrement TX byte counter
        }
        else
        {
            UCB0CTL1 |= UCTXSTP;                    // I2C stop condition
            IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag
            __bic_SR_register_on_exit(CPUOFF);      // Exit LPM0
        }
    default:
        break;
    }
}


MSP430FR6989: Is MSP430FRAM products more secure than its Flash?

$
0
0

Part Number:MSP430FR6989

My customer is concerned with FRAM as follows.

<Question>
He saw about the possibility of destroying Flash with the following document (MSP430 Advanced Technical Conference), but will phenomenon like the document occur in MSP430FRAM as well?

Customers sometimes experienced memory bugs like Flash events on events like ATC.
They are considering MSP430FRAM products and worry about the same symptoms as Flash does not occur.

Please let me know if it is not occur with MSP430FRAM.

Best regard.
Cruijff

Compiler/MSP430G2533: Storage on RAM for an interval of every 15minutes and summation

$
0
0

Part Number:MSP430G2533

Tool/software: TI C/C++ Compiler

Hi,

In the MSP430G2553,two values are received as an input and will increment based on the reception.

If P2.1 is low , then these two received values should multiply and store on to the RAM for every 15minutes interval and get accumulated on to a particular place, until the P2.1 goes high.

Based on these accumulated value after P2.1 goes high.I will assign the functionality based on the accumulated values range.

This is the requirement of my code and can you please share any example code or any reference code for it.

I am working on IAR workbench.

Regards,

Phanendra

EVM430-FR6047: LCD

$
0
0

Part Number:EVM430-FR6047

Hi,

1.Is it possible to buy 108 Segment LCD Display (FH-1138P) for evaluation module EVM-FR6047.

2.Is there any compatible alternatives that can be used?

Regards,

Divya Harikumar

RTOS/MSP432E401Y: SAMPLE PROGRAM FOR EXTERNAL EEPROM PROGRAMMING

$
0
0

Part Number:MSP432E401Y

Tool/software: TI-RTOS

Hi,

Can any one let me know the sample program to start with, for external eeprom programming.

Thank you

Regards

Kalyan.

MSP430F5234: BSDL Support for MSP430 Device

$
0
0

Part Number:MSP430F5234

On JTAG MSP430 wiki:

    MSP430 JTAG interface is not 100% IEEE 1149.1 (JTAG) compatible. For example none of the MSP430 devices has Boundary Scan Cells. We only support the required command BYPASS, but don’t support the other required commands for example EXTEST and SAMPLE/PRELOAD.

Therefore there is no BSDL file for any MSP430 devices. In addition you can not put a MSP430 into a JTAG chain together with other devices.

Customer is wondering if there is no BSDL file, how do they verify chip in their factory, can we provide a way customer can verify device on their own?

Regards

Andre

Viewing all 21954 articles
Browse latest View live