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

MSP430FR59941: MSP430 ocassionally stuck at address 0x0004

$
0
0

Part Number:MSP430FR59941

I have some TI provided code that I ported over to our MCU.  It basically processes a bunch of events when USB is plugged into our charger system.  Most of the time it works, but every once in a while it gets stuck at address 0x0004.  Which is just a jump back to 0x0004.

Also my watchdog timer is on hold, and I only ever set it on hold at the very start of my program.  Then I do a little configuration and activate it. I'm not sure what I'm seeing here.  Any advice?  I looked at the memory map at this section just says reserved.

Thanks!


CCS/MSP430F5529: Where is Software Serial?

$
0
0

Part Number:MSP430F5529

Tool/software: Code Composer Studio

Hello,

I'm working on a project where I need to connect my MSP430 to many external modules and sensors.

The communication with these is via UART however I saw that my model is provided of only one pair of TX/RX pins for UART (3.3 and 3.4).

Thus, I decided to make other GPIO pins to work like serials and interpret the received signal via software. However the SoftwareSerial lib is implemented only on Energia, and I'm using CCS!
What should I do? Should I re-invent my own lib?

CCS/MSP430FR2355: High current in LPM3 with connecting to RFM95

$
0
0

Part Number:MSP430FR2355

Tool/software: Code Composer Studio

Hi,

  I'm pretty new to the MSP430. I'm now trying to connect MSP430FR2355 with RFM95 LoRa module(www.adafruit.com/.../3072

  First I put all pins in MSP into OUTPUT LOW. And I test the current can be 1 uA(VLOCLK). That's really great.

  I use SPI to put RF95 into sleep mode. But when connect the MSP with RFM95, the total current is about 583 uA. I also put DMM between the 3V3(MSP) and Vin(RF), the current is 563 uA. Besides, the current is 530 uA when I put DMM between GND(RF) and GND(MSP). According to RF95 datasheet, the current can be 0.2uA in sleep mode. So the current I got is too large.

  When in the test, I find that the MSP pins are about -0.3V to 0.3V(OUTPUT LOW). Does this cause some leakage current when connecting to RF chip? I also try to connect RF chip's pin to either 3V3 or GND, but the current is almost the same. Is there any way to configure the RF95 pins into INPUT HIGH. Are there other reasons that cause this high current? 

  I'm now out of ideas.  If anyone can help me, I’m so grateful.

Below is the code:

------------------------------------------------------------------------------------

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

void rfi (void);
void ls1 (void);
void tb (int tm);
void si (void);
unsigned char sa (unsigned char); uint8_t data;
void csn_high (void);
void csn_low (void);
void ce_high (void);
void ce_low (void);
void sw (uint8_t, uint8_t); uint8_t val;
/**
* main.c
*/
int main(void)
{
WDTCTL = WDTPW | WDTHOLD;
//CSCTL4 = SELA__VLOCLK | SELMS__VLOCLK;
ls1();
si();
rfi();
ls1();
tb(1000);
__bis_SR_register(LPM3_bits | GIE);
}
#pragma vector = TIMER0_B0_VECTOR
__interrupt void Timer_B (void)
{
}
void rfi (void)
{
ce_high();
sw(RH_RF95_REG_01_OP_MODE, RH_RF95_MODE_SLEEP);
ce_low();
csn_low();
}
void ls1 (void)
{
P1DIR = 0xff; P2DIR = 0xff;
P3DIR = 0xff; P4DIR = 0xff;
P5DIR = 0xff; P6DIR = 0xff;
P1OUT = 0x00; P2OUT = 0x00;
P3OUT = 0x00; P4OUT = 0x00;
P5OUT = 0x00; P6OUT = 0x00;
}
void tb (int tm)
{
TB0CTL = TBSSEL__ACLK | MC__UP;
TB0CCR0 = tm;
TB0CCTL0 |= CCIE;
}
void si (void)
{
P1DIR |= BIT4; P1OUT |= BIT4;
P1DIR |= BIT3;
P1SEL0 |= BIT5; P1DIR |= BIT5;
P1SEL0 |= BIT7; P1DIR |= BIT7;
P1SEL0 |= BIT6; P1DIR &= ~BIT6;
P2DIR |= BIT0;
UCA0CTLW0 |= UCSWRST;
UCA0MCTLW = 0x00;
UCA0CTLW0 |= UCMST|UCSYNC|UCCKPH|UCMSB|UCMODE_0;
UCA0CTLW0 |= UCSSEL__SMCLK;
UCA0BR0 |= 0x01;
UCA0BR1 |= 0x00;
UCA0CTLW0 &= ~UCSWRST;
}
unsigned char sa (unsigned char data)
{
UCA0TXBUF = data;
while ( !(UCA0IFG & USCI_SPI_UCRXIFG) );
return UCA0RXBUF;
}
void csn_high (void)
{
P1OUT |= BIT4;
}
void csn_low (void)
{
P1OUT &= ~BIT4;
}
void ce_high (void)
{
P1OUT |= BIT3;
}
void ce_low (void)
{
P1OUT &= ~BIT3;
}
void sw (uint8_t addr, uint8_t val)
{
csn_low ();
sa (addr | 0x80);
sa (val);
csn_high ();
}

------------------------------------------------------------------------------------

Thanks

Jiangang

MSP432E401Y: Can't get MSP to program over serial.

$
0
0

Part Number:MSP432E401Y

I have been trying to follow the steps outlined  I follow all steps have my BSL rocket firmware correctly setup. When I run my BSL-Scripter it runs through and says 

---------------------------------------------------------
BSL Scripter 3.3.0
PC software for BSL programming
2019-Feb-26 14:52:15
---------------------------------------------------------
Input file script is : C:/Users/Al/Desktop/BSl/MSPBSL_Scripter_win_Ethernet/script_uart_app1.txt
MODE E4xx UART 115200 COM9 DISABLE_AUTO_BAUD
[ERROR_MESSAGE]No response bytes received from BSL!

The MSP-EXP432E401Y launchpad is empty. 

are there special steps that I need to take to load the uart BSL on to the processor? I have checked continuity to the process with the UART TX and RX. 

MSP430FR5994: Is there an Eagle library for MSP430FR5994?

$
0
0

Part Number:MSP430FR5994

I am curious whether there is an Eagle library for MSP430FR5994 for designing a PCB.

Or shall I make my own package?

Thank you.

Best Regards,

Kiwan

CCS/MSP430G2553: Using Malloc and Calloc using MSP430G2xx series

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

This article describes how to use the Malloc and the Calloc in small memory microcontrollers like the MSP430. Unlike many YouTube videos where they show this utility using higher memory chips and PCs, this one, specifically concentrates on using and demonstrating the same on low scale memory MSP430G2xx series. I have uploaded a simple video in YouTube that describes and shows very simply how you can allocate in the value line series MCUs.

I don't know how many people actually need to use malloc , calloc, realloc and free in MSP430, but if you choose to do, this video link can be of help to such users.

The code is here:

#include <msp430.h>
#include <stdlib.h>


/**
 * blink.c
 */
void main(void)
{
	WDTCTL = WDTPW | WDTHOLD;		// stop watchdog timer
	P1DIR |= 0x01;					// configure P1.0 as output

	volatile unsigned int i;		// volatile to prevent optimization

	int *p = (int*)malloc(5*sizeof (int));
//	p[0] = 1;
//	p[1] = 2;
//	p[2] = 3;

//	free(p);

	int *pt = (int*)calloc(5,sizeof (int));
    pt[0] = 10;
    pt[1] = 20;
    pt[2] = 30;

	while(1)
	{
		P1OUT ^= 0x01;				// toggle P1.0
		for(i=10000; i>0; i--);     // delay
	}
}

BELOW IS YOUTUBE LINK TO THE VIDEO:

(Please visit the site to view this video)

If you want more such libraries that I have developed for MSP430x2xx and MSP430x5xx series please visit : http://www.turjasuzworld.in/msp430x2xx-libraries-for-ccs/

MSP430FR6989: FRAM WRITE

$
0
0

Part Number:MSP430FR6989

Hi,

iam using msp430fr6989 launhpad and

my pgm is writing the data to FRAM  

i had writenn successfully to the locations of the FRAM

my question is when i write to a location 0x11000 

it clears the library data and writing my data so is there any hanging or corrupting of program will be happen

MSP430FR2433: LPM3 consumes around 17uA

$
0
0

Part Number:MSP430FR2433

Hi Experts,

I ran below code and saw that the current is around 17uA. What is wrong?

(Please visit the site to view this file)

Regards,

Uchikoshi


MSP430FR6047: USS design center calibration problem

$
0
0

Part Number:MSP430FR6047

Hello!

We use USS design center for calibration of water meter.

We use "Calibration" tab and we insert flow information that we want to calibration.

So GUI generates the slope and offset.

I understand how to use the "Calibration".

But when we test with water meter, it seems that slope is not applied to flow.

The setting value is below, and I check "adv.Calibration Table".

I read MCU configuration that the calibration is updated.

The screenshot of waveform is below.

After check the calibration table the flow is going to offset value.

Also I want to know that the temperature compensation is applied to USS design center.

Thanks

NK Yoo

MSP430FR2355: Digital Inputs 1.8V

$
0
0

Part Number:MSP430FR2355

There is a 1.8V power supply and the serial port is connected to the MSP430. Whether it will cause the high level is not recognized.

EVM430-FR6047: Timer Interrupt Vector and Timer Configuration

$
0
0

Part Number:EVM430-FR6047

Hi,

I´m currently working with a EVM430-FR6047 with a MSP430FR6047 Controller and want to configure a timer to generate a periodical interrupt. My problem is, that the controller doesn´t enter the interrupt service routine. I have configured the timer in the following way, whereat the Timer_A0_Init() function is called in the main function before the while(1) loop:

void Timer_A0_Init(void){
    Timer_A_initUpModeParam timerAParam;
    timerAParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
    timerAParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_8;
    timerAParam.timerPeriod = 10000;
    timerAParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_ENABLE;
    timerAParam.captureCompareInterruptEnable_CCR0_CCIE = TIMER_A_CCIE_CCR0_INTERRUPT_DISABLE;
    timerAParam.timerClear = TIMER_A_SKIP_CLEAR;
    timerAParam.startTimer = true;

    Timer_A_initUpMode(TA0_BASE,  &timerAParam);

    Timer_A_enableInterrupt(TA0_BASE);
    Timer_A_startCounter(TA0_BASE, TIMER_A_UP_MODE);

}

The interrupt service routine where currently just try to toggle a LED and a Port-Pin is the following:

#pragma vector=TIMER0_A0_VECTOR
__interrupt void Timer_A0_ISR(void) {
    if(LEDisOn == 1) {
        LEDisOn = 0;
        hal_system_LEDOff(HAL_SYS_LED_1);
        GPIO_setOutputLowOnPin(GPIO_PORT_P7, GPIO_PIN5);
    } else {
        LEDisOn = 1;
        hal_system_LEDOn(HAL_SYS_LED_1);
        GPIO_setOutputHighOnPin(GPIO_PORT_P7, GPIO_PIN5);
    }

    Timer_A_clearTimerInterrupt(TA0_BASE);
}

By debuging the program I found out that the program doesn´t enter the service routine but repeatedly starts from the beginning of the main function.
My guess is that i do not have the right interrupt vector. I´ve tried many other timer interrupt vectors defined in the appropriate header file but nothing worked.

For the sake of completeness here my main function:

int main(void)
{
    WDTCTL = WDTPW + WDTHOLD;

    hal_system_Init();
    hal_uart_Init();

    Timer_A0_Init();

    GPIO_setAsOutputPin(GPIO_PORT_P7,GPIO_PIN5);

    while (1)
    {
      ...
    }
}

Thanks in advance and best regards

MSP430FR6047: deltaTOF and absTOF is wrong

$
0
0

Part Number:MSP430FR6047

Hi,

I have a customized board with msp430fr6047, and I don’t have evm430-fr6047.

I have two question.

1. The zero flow drift is larger than the one TI test. As the figure show blow, the normal ZFD is around 25ps.

But my ZFD is around 5ns.

Some deltaTOF I get with static water:

-4.034121E-009

-4.652520E-009

-9.825726E-009

-1.439048E-008

-1.053058E-008

-1.898155E-008

-1.569930E-008

-1.118241E-008

-7.221217E-009

-1.388105E-008

I try to do the impedance matching according to www.ti.com/.../snia020.pdf but it don’t change anything.

2. My absTOF should be around 55us, right? But totalTOF_UPS and totalTOF_DNS are around 65us. Why?

The file is my configuration.(Please visit the site to view this file)

Thank you.

MSP432E401Y: MSP432 + cc256x to build a Bluetooth+WiFi BeltPack for Audio Communications

$
0
0

Part Number:MSP432E401Y

Hello,

We are building a full-duplex wireless communication system.

One of the devices is a "beltpack" to allow a user wearing a headset to communicate with other users wearing also a beltpack/headset and connected to the network via WiFi, TCP/IP.

The user will wear a wired or Bluetooth headset paired with the beltpack.

The Bluetooth full-duplex communication between the headset and the beltpack must be done with Bluetooth Profile HFP 1.6 Wideband Speech.

To build the beltpack, we are evaluating the following option: MSP432 + cc256x.

The cc256x seems to implement the mandatory feature of Bluetooth Wideband Speech for our application.

For our system to work, we need to have the Bluetooth Wideband Speech + the WiFi communication always active simultaneously and reliably.

The beltpack will:

- receive the Bluetooth audio from the microphone of the user,

- it will perform some audio processing,

- pack the audio data according to a defined protocol

- and send it via TCP/IP/WiFi to a server to dispatch it to the corresponding user

As we are in full-duplex communication, the bodypack will also:

- receive the WiFi/TCP/IP audio data from another user

- unpack the audio data

- send the audio data via Bluetooth to the headset of the user

We have the following questions/concerns:

1. Is the MSP432 + cc256x a good candidate to build our beltpack? We would like to have it as small as possible, with the possibility to clip it on a shirt (we will have a wired headset option too)

2. Will we be able to have full-duplex communications with Bluetooth Wideband Speech + WiFi communications simultaneously and reliably?

3. MSP432 does not seem to have Windows, Android or Linux OS, right? We have an App developed in C# on Microsoft Visual Studio. How can we reuse our code? Can we develop in C#? Which environment?

4. Do we have all necessary libraries for MSP432 regarding Bluetooth Wideband Speech and WiFi/TCP/IP communication?

Thank you.

Best regards,

Jorge

MSP430G2413: Automotive MSP430 device list

$
0
0

Part Number:MSP430G2413

Hi

Do we have MSP430 automotive level device list?

My customer want to use one similar to NXP S9KEAZN8AMTGR. Thanks.

CCS/MSP432P401R: Using MSP430 *.c programs for MSP432

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

At the moment I have MSP432P401R and MSP430F5529. There are a number of good examples for the timer, PWM and interrupts, given for MSP430 such as MSP430x22x4_ta_16.c; MSP430x22x4_ta_07.c etc which I cannot find for MSP432 demo and examples. In those files TI is using the header file #include<msp430.h>. So I am not sure if I can use those programs directly with MSP432.

Regards

Mostafa


MSP430I2041: MSP430I2014 DriverLib I2C Driver - Proper DriverLib I2C API call order for I2C peripheral register reads with repeat start condition

$
0
0

Part Number:MSP430I2041

I am already successfully using DriverLib I2C drivers to write registers on an LP8860-Q1 backlight controller. What I need help with is calling the right DriverLib master mode API calls in the right order to read from an OPT3001-Q1 ambient light sensor. I have read the DriverLib User Guide and the HTML documentation and there is not enough detail to understand how to properly mix the API calls to get a combination write/read with repeated start condition to meet the OPT3001-Q1 read cycle requirements. None of the I2C DriverLib code examples show the proper API call orders either. Please help me understand what API call order I should use for a read cycle on a OPT3001-Q1. Thank you...

CCS/MSP-EXP430F5529LP: BOOSTXL-SHARP128, How do I start with it

MSP432P401R: JTAG pins disabled because of bad GPIO init in code, how to factory reset?

$
0
0

Part Number:MSP432P401R

Hi,

A colleague started a new design on a MSP432P401R chip. He wrote a code with some bad initialization on the JTAG pins PJ.4 and PJ.5 (TDO and TDI). Now these pins are configured as GPIO, and not as JTAG pins. As a consequence, after loading this code, we cannot access anymore to the chip via JTAG. 

How can we erase the code in Flash so that the JTAG pins are back to their default configuration?

It seems the only option for a factory reset is through the BSL module. But we haven't configured anything in the code for BSL. What is the default state of BSL_PARAMS? If we manage to invoke the BSL module, how can we sent the factory reset command if the Tx line is not configured on the chip?

I hope someone will be able to help. If nothing else works, the last option will be to replace the chip on the board...

Thanks in advance for the help,

Stephane

MSP430FR6972: MSP430FR6972 BSL firmware updates or programming

$
0
0

Part Number:MSP430FR6972

Eddie,

 previously you were talking to Shane on this issue, I've taken over this project and have some follow-up questions.  What we are looking for is a low cost and easy means to update firmware in the field via a USB connection to a PC, that's why we started looking at the BSL on the  MSP430FR6972.  We are presently programming the device via the Spy-Bi-Wire interface and were looking at a way to use the BSL through this interface.  Is it possible to use the BSL via the Spy-Bi-Wire, in your data sheet for the MSP430FR6972 on page 10 Figure 4-2 it says the following "On devices with UART BSL: P2.0: BSL_TX; P2.1: BSL_RX", does this mean that the BSL is only accessible via these UART pins?  Don't see any mention in the data sheet of using the BSL via Spy-Bi-Wire connections.  We are bringing out P3.4:UCA1TXD and P3.5UCA1RXD to a serial expansion connector, can this UART be used for BSL?  Attached is part of our schematic showing our two interface connectors J13 (Spy-Bi-Wire) and J14 (Serial Expansion).

If we can't utilize the BSL in our current hardware configuration is there a low cost way that we can update the firmware out in the field without having a full blown MSP-FET programmer/emulator.  Not looking to do any emulation out in the field just updating firmware.  I've come across documentation of an eZ-FET Lite, does this exist as a development board we could purchase or would we have to roll our own.  Will the eZ-FET Lite work with the MSP430FR6972.  Also was looking at your LaunchPads, which one would meet our needs for just programming the MSP430FR6972 via the Spy-Bi-Wire interface, was looking at the MSP-EXP430F5529LP.

Any other suggestions/recommendations would be welcome.

Larry

CCS/EVM430-F67641: Missing MSP430 Library files

$
0
0

Part Number:EVM430-F67641

Tool/software: Code Composer Studio

I have been unable to get the supplied SLAA621 software package to compile on CCS due to what seem to be missing library files.

uart_comms.h is at least one that is not included

I am also getting these defintion errors:

"../emeter-app/debounce.c", line 51: error #20: identifier "BUTTON_PERSISTENCE_CHECK" is undefined
"../emeter-app/debounce.c", line 54: error #20: identifier "DEBOUNCE_JUST_HIT" is undefined
"../emeter-app/debounce.c", line 57: error #20: identifier "DEBOUNCE_RELEASED" is undefined
"../emeter-app/debounce.c", line 64: error #20: identifier "BUTTON_PERSISTENCE_CHECK" is undefined
"../emeter-app/debounce.c", line 67: error #20: identifier "DEBOUNCE_JUST_RELEASED" is undefined
"../emeter-app/debounce.c", line 74: error #20: identifier "DEBOUNCE_HIT" is undefined

And can you tell me why these errors occur?

"../emeter-toolkit/src/accum48.c", line 59: fatal error #35: #error directive: "Don't know how to accum48"

"../emeter-toolkit/src/bin2bcd16.c", line 72: error #2632: Modifiers are not allowed in printf_support=minimal mode

Viewing all 22138 articles
Browse latest View live


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