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

MSP430G2553: Interfacing LDC1000 and MSP430

$
0
0

Part Number:MSP430G2553

Hello,

Im trying to interface the LDC1000 with the MSP430G2553 launchpad and im following the guide avaible on TI site which provides various example codes but im having an issue in running one of them because it shows an error in the first line of  the code below

.text : {} > FLASH /* CODE */
.cinit : {} > FLASH /* INITIALIZATION TABLES */
.const : {} > FLASH /* CONSTANT DATA */
.cio : {} > RAM /* C I/O BUFFER */

It says 'program will not fit into avaiable' ive already searched the forum and theres someone having a similar issue but none of the purposed solution works. My tought is that maybe the file could have been written with an older version of CCS and i need to update the ink_msp430g2553.cmd? in case someone knows how to do it or has a different solution?


MSP-EXP430FR2433: Second UART eUSCI_A1 not working

$
0
0

Part Number:MSP-EXP430FR2433

I recently purchased an MSP-EXP430FR2433. I was trying to program it through CCS Cloud.  I'm trying to make the second UART eUSCI_A1 work. Following is the code.

/* --COPYRIGHT--,BSD
* Copyright (c) 2017, 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.
* --/COPYRIGHT--*/
//******************************************************************************
//
// main.c
//
// Out of box demo for the MSP-EXP430FR2433
//
// This demo uses the MSP432FR2433's internal Temperature Sensor and demonstrates
// how to setup a periodic temperature data logger, by utilizing a ring-buffer
// inside the MSP430F2433 device's FRAM memory. In addition, the demo also implements
// a real time temperature sensor
//
//
// E. Chen
// Texas Instruments Inc.
// October 2017
//******************************************************************************

#include "FRAMLogMode.h"
#include "LiveTempMode.h"

// ADC data
adc_data_t adc_data;

// NVS ring handle
nvs_ring_handle nvsHandle;

// FRAM storage for ADC samples using NVS ring storage
#if defined(__TI_COMPILER_VERSION__)
#pragma PERSISTENT(nvsStorage)
#elif defined(__IAR_SYSTEMS_ICC__)
__persistent
#endif
uint8_t nvsStorage[NVS_RING_STORAGE_SIZE(sizeof(adc_data_t), NVS_RING_SIZE)] = {0};

bool buttonS1Pressed;
bool buttonS2Pressed;
bool rtcWakeup;

// Application mode, selected between FRAM_LOG_MODE and LIVE_TEMP_MODE
char mode;

bool rxStringReady = false;
bool rxThreshold = false;
char rxString[MAX_STRBUF_SIZE];

#ifdef RECEIVE_JSON
#include <jsmn.h>

jsmn_parser p;
jsmntok_t t[5]; /* We expect no more than 5 tokens */
#endif

// UART Defines
#define UART_TXD_PORT GPIO_PORT_P1
#define UART_TXD_PIN GPIO_PIN4
#define UART_RXD_PORT GPIO_PORT_P1
#define UART_RXD_PIN GPIO_PIN5
#define UART_SELECT_FUNCTION GPIO_PRIMARY_MODULE_FUNCTION

// Function Definitions
void initGpio(void);
void initCs(void);
void initRtc(void);
void initAdc(void);
void initEusci(void);
void UART_receiveString(char);

void initEusciA1(void);
void UART_receiveString1(char);
void transmitString1(char *str);

int main(void)
{
/* Halt the watchdog timer */
WDT_A_hold(WDT_A_BASE);

/* Initialize GPIO and RTC */
initGpio();
initCs();

initEusci();
initEusciA1();

/* Enable global interrupts. */
__enable_interrupt();

while(1)
{
transmitString("uart0\n\r");

transmitString1("uart1\n\r");

// Add delay to ensure system clock stabilizes after waking up from LPM3.5
__delay_cycles(100000);
}
}

void initGpio(void)
{
// P2.6 as output
P2DIR |= BIT6;


// P2.6 as primary module function (UCA1TXD)
P2SEL0 |= BIT6;
}

void initCs(void)
{
//Set DCO FLL reference = REFO
CS_initClockSignal(
CS_FLLREF,
CS_REFOCLK_SELECT,
CS_CLOCK_DIVIDER_1
);

//Set ACLK = REFO
CS_initClockSignal(
CS_ACLK,
CS_REFOCLK_SELECT,
CS_CLOCK_DIVIDER_1
);

//Create struct variable to store proper software trim values
CS_initFLLParam param = {0};

//Set Ratio/Desired MCLK Frequency, initialize DCO, save trim values
CS_initFLLCalculateTrim(
16000,
488,
&param
);

//Clear all OSC fault flag
CS_clearAllOscFlagsWithTimeout(1000);

//For demonstration purpose, change DCO clock freq to 16MHz
CS_initFLLSettle(
16000,
488
);
}
// Initialize EUSCI
void initEusci(void)
{
// Configure UCA1TXD and UCA1RXD
P1SEL0 |= BIT4 | BIT5;
P1SEL1 &= ~(BIT4 | BIT5);

// Configure UART
// software-dl.ti.com/.../index.html
EUSCI_A_UART_initParam param = {0};
param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK;
param.clockPrescalar = 8;
param.firstModReg = 10;
param.secondModReg = 247;
param.parity = EUSCI_A_UART_NO_PARITY;
param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
param.uartMode = EUSCI_A_UART_MODE;
param.overSampling = EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION;

if(STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param))
{
return;
}

EUSCI_A_UART_enable(EUSCI_A0_BASE);

EUSCI_A_UART_clearInterrupt(EUSCI_A0_BASE,
EUSCI_A_UART_RECEIVE_INTERRUPT);

// Enable USCI_A0 RX interrupt
EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,
EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt
}


// EUSCI interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCI_A0_VECTOR))) USCI_A0_ISR (void)
#else
#error Compiler not supported!
#endif
{
switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
{
case USCI_NONE: break;
case USCI_UART_UCRXIFG:
// Read buffer
//UART_receiveString(UCA0RXBUF);
break;
case USCI_UART_UCTXIFG: break;
case USCI_UART_UCSTTIFG: break;
case USCI_UART_UCTXCPTIFG: break;
default: break;
}
}

// Transmits string buffer through EUSCI UART
void transmitString(char *str)
{
int i = 0;
for(i = 0; i < strlen(str); i++)
{
if (str[i] != 0)
{
// Transmit Character
while (EUSCI_A_UART_queryStatusFlags(EUSCI_A0_BASE, EUSCI_A_UART_BUSY));
EUSCI_A_UART_transmitData(EUSCI_A0_BASE, str[i]);
}
}
}

// Initialize EUSCI_A1
void initEusciA1(void)
{




// Disable eUSCI_A
EUSCI_A_UART_disable(EUSCI_A1_BASE); // Set UCSWRST bit

UCA1CTLW0 |= UCSSEL__SMCLK; // Chose SMCLK as clock source

// Initialization of eUSCI_A
EUSCI_A_UART_initParam param = {0};
param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_SMCLK;
param.clockPrescalar = 8;
param.firstModReg = 10;
param.secondModReg = 247;
param.parity = EUSCI_A_UART_NO_PARITY;
param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
param.uartMode = EUSCI_A_UART_MODE;
param.overSampling = EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION;

if(STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A1_BASE, &param))
{
return;
}

// Enable eUSCI_A
EUSCI_A_UART_enable(EUSCI_A1_BASE); // Clear UCSWRST bit

EUSCI_A_UART_clearInterrupt(EUSCI_A1_BASE,
EUSCI_A_UART_RECEIVE_INTERRUPT);

// Enable USCI_A1 RX interrupt
EUSCI_A_UART_enableInterrupt(EUSCI_A1_BASE,
EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt


}


// EUSCI interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_A1_VECTOR
__interrupt void USCI_A1_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCI_A1_VECTOR))) USCI_A1_ISR (void)
#else
#error Compiler not supported!
#endif
{
switch(__even_in_range(UCA1IV,USCI_UART_UCTXCPTIFG))
{
case USCI_NONE: break;
case USCI_UART_UCRXIFG:
// Read buffer
//UART_receiveString1(UCA1RXBUF);
break;
case USCI_UART_UCTXIFG: break;
case USCI_UART_UCSTTIFG: break;
case USCI_UART_UCTXCPTIFG: break;
default: break;
}
}

// Transmits string buffer through EUSCI UART
void transmitString1(char *str)
{
int i = 0;
for(i = 0; i < strlen(str); i++)
{
if (str[i] != 0)
{
// Transmit Character
while (EUSCI_A_UART_queryStatusFlags(EUSCI_A1_BASE, EUSCI_A_UART_BUSY));
EUSCI_A_UART_transmitData(EUSCI_A1_BASE, str[i]);
}
}
}

But the second UART doesnt seem to work. Am I missing something here? Any help will be greatly appreciated, thanks in advance.

CCS/MSP-TS430PZ100AUSB: MSP-TS430PZ100AUSB development board, MSP430FG6426 controller & MSP-FET for debugger tool.

$
0
0

Part Number:MSP-TS430PZ100AUSB

Tool/software: Code Composer Studio

Hello Guys,

I have MSP-TS430PZ100AUSB development board, MSP430FG6426 controller & MSP-FET for debugger tool. I need to establish a UART connection for communication MSP430 controller to PC for one of the project. I checked with other MSP430 FZ series they need a breakout board for establishing UART connection. However the MSP-FET has the UART communication option available. It is not clear to me if I need to use an additional break out board for UART connection or it can be done using MSP-FET. Also the MSP430FG6426  has UART BSL I think I can use this not sure though. 

Also I have written a code activating the UART for MSP430FG6426. I am able to compile and debug this on the flash however I can't read any string output on the Teraterm on the PC.

[#include <msp430.h>
#include <string.h>
#include <stdio.h>
volatile char i=0;


void main(void)
{
char wel[]="Hi ! Good Morning !";

// stop WDT
WDTCTL= WDTPW | WDTHOLD;
P2SEL |= 0x03; // Assign P2.0 to UCA0TXD and...
P2DIR |= 0x03; // P2.1 to UCA0RXD
UCA0CTL1 |= UCSWRST; // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 6; // 1MHz 9600 (see User's Guide)
UCA0BR1 = 0; // 1MHz 9600
UCA0MCTL = UCBRS_0 | UCBRF_13 | UCOS16; // Modln UCBRSx=0, UCBRFx=0,
// over sampling
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
/

while (1)

{i=0;
while (wel[i]!='\0');
{
UCA0TXBUF = wel [i];
while (UCA0STAT&UCBUSY);
i++;
}

UCA0TXBUF = 0X0a;
while (UCA0STAT&UCBUSY);
UCA1TXBUF = 0X0d;
while (UCA0STAT&UCBUSY);
}

}

]

Can anyone recommend the resources on how do I make the UART communication for this microcontroller.  Would be thankful. 

Thanks.

CCS/MSP430G2553: MSP430 2 channel ADC

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

Hi, i was able to code a ADC ISR which is triggered by a timer CC ISR with 1 analog input.
I have been trying to code a ADC for 2 pins for some days but wasnt able so far.

the timer ISR is triggered by capture compare mode.
inside my timer ISR i want to make a ADC of my A3 pin and save it to the cariable temp1.
after the 1st ADC i tryed to switch the channel to A4 but the channel never switches.

i have also tryed to switch the channel inside my ADC interrupt but that didnt work aswell.

this is my code: (i hope someone could help me)

#include <msp430.h>
#include <msp430g2553.h>

long temp1;
long temp2;

void main(void) {

	__enable_interrupt();
	WDTCTL = WDTPW | WDTHOLD;		// Stop watchdog timer

	TACTL = TASSEL_1 + MC_1;					// ACLK-clock 	+	CCR up mode mode
	CCTL0 = CCIE;								// CCR0 Interrupt enabled
	CCR0 = 50;

	ADC10CTL1 = INCH_4 + ADC10SSEL_1;			// Channel select A4	+	Conversion sequence mode select ==  Sequence-of-channels 	+ ACLK - clock (no input div)
	ADC10CTL0 = SREF_0 + ADC10SHT_2 + ADC10ON + ADC10IE;	// REF = VCC & VSS + ADC SampleAndHoldTime 16 x ADC10CLKs  + + //
	ADC10AE0 |= BIT3 + BIT4;			// 	 These bits enable the corresponding pin for analog input
	P1SEL |=  BIT3 + BIT4;			//	ADC input select mode P1.4

	P1DIR |= 0x00;	// ADC input P1.3

	P2DIR |= (BIT0 + BIT1 + BIT2) + (BIT3 + BIT4 + BIT5);	// pins as output // P2.0-2 for A3	+	P2.3-5 for A4
	P2OUT = 0x00;					// all pins set to low (input) //port2


}

#pragma vector = TIMER0_A0_VECTOR;
__interrupt void Timer(void){

	ADC10CTL1 = INCH_3;		// select channel A3 for ADC
	ADC10CTL0 |= ADC10SC + ENC;	// ADC10SC == 0 >> no sample start conversation + ENC == EnableConversation
	temp1 = ADC10MEM;	// saves the ADC measure in 1st temp variable
	while(!ADC10BUSY) // wait till ADC is NOT busy anymore
	{
		ADC10CTL0 &= ~ENC;	// disable conversation
	}
	ADC10CTL0 &= ~ADC10IFG;	// deletes the ADC-InterruptFlag for the next conversation

	ADC10CTL1 = INCH_4;		// select channel A4 as input
	ADC10CTL0 |= ADC10SC + ENC;
	if(ADC10CTL1 == INCH_4)temp2 = ADC10MEM;		// save ADC measure in 2nd temp variable
	while(!ADC10BUSY)
	{
		ADC10CTL0 &= ~ENC;
	}

	//TACTL &= ~TAIFG;	// deletes Timer FLag (it will be automatic set by the timer >> when cotinues mode reaches 0xFFFFx)
}


#define A0 0x00
#define A1 BIT0
#define A2 BIT0 + BIT1
#define A3 BIT0 + BIT1 + BIT2

#define B0 0x00
#define B1 BIT3
#define B2 BIT3 + BIT4
#define B3 BIT3 + BIT4 + BIT5

#pragma vector = ADC10_VECTOR;
__interrupt void ADC(void){

	const int output1[4] = {A0, A1, A2, A3};
	const int output2[4] = {B0, B1, B2, B3};

	if(temp1 >= 0 && temp1 <= 50)P2OUT = output1[0];
		else if(temp1 >= 50 && temp1 <= 400) P2OUT = output1[1];
		else if(temp1 >= 400 && temp1 <= 750) P2OUT = output1[2];
		else P2OUT = output1[3];

	if(temp2 >= 0 && temp2 <= 50)P2OUT |= output2[0];
		else if(temp2 >= 50 && temp2 <= 400) P2OUT |= output2[1];
		else if(temp2 >= 400 && temp2 <= 750) P2OUT |= output2[2];
		else P2OUT |= output2[3];

	ADC10CTL1 = INCH_4;		// select channel A4 as input

}

MSP430FR4133: multiple ADC channel sequencing reading probblem

$
0
0

Part Number:MSP430FR4133

Hello ,

 I am working on MSP430FR4133 launch pad"s ADC. i have trying to read single channel its working fine with ADC channel A8 but when i am tried to work with sequential A7 and A8 using Sequence-of-channels and Repeat-sequence-of-channels mode using ADCSC bit as ADC sample-and-hold source its not working.i am giving constant 0.50 Vdc to pin no P8.0 And P1.7 which are A8 and A7 respectively are giving random value which i have pasted in image.as i am expecting around 342 decimal count because ref is 1.5V internal and 10 bit ADC.

circuit configurations are ground is shorted and common 0.5V is directly fed to the ADC channel through voltage divider and a low pass RC filter which value is 100 ohms and 2.2uF cap.

one more thing i have tried is that i had make one voltage divider array which out put is varies between 0 to 1.25V with step of 125mV using 10 step rotary switch.with this configuration i have use single channel and i am getting step of 84~85 decimal count when i am switching rotary switch which is exactly right but same configuration will not work for multiple channel.

my code is follow

 

#include <msp430.h>

int ADC_Result[2]; //10bit ADC conversion result array
unsigned char i;

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

// Configure ADC A7~8 pins
SYSCFG2 |= ADCPCTL8 | ADCPCTL7 ;

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

// Configure ADC
ADCCTL0 |= ADCSHT_2 | ADCMSC | ADCON; // 16ADCclks, MSC, ADC ON
ADCCTL1 |= ADCSHP | ADCCONSEQ_1; // ADC clock MODCLK, sampling timer, s/w trig.,single sequence
ADCCTL2 |= ADCRES; //10bit conversion results
ADCMCTL0 |= ADCINCH_8 | ADCSREF_1; // A7~8(EoS); Vref=1.5V
ADCIE |= ADCIE0; // Enable ADC conv complete interrupt

// Configure reference
PMMCTL0_H = PMMPW_H; // Unlock the PMM registers
PMMCTL2 |= INTREFEN; // Enable internal reference
__delay_cycles(400); // Delay for reference settling
__no_operation();

while(1)
{
i = 1;
while(ADCCTL1 & ADCBUSY); // Wait if ADC core is active
ADCCTL0 |= ADCENC | ADCSC; // Sampling and conversion start
__bis_SR_register(GIE);
__no_operation(); // Only for debugger
__delay_cycles(5000);
__no_operation();
}
}

// ADC interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=ADC_VECTOR
__interrupt void ADC_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(ADC_VECTOR))) ADC_ISR (void)
#else
#error Compiler not supported!
#endif
{
switch(__even_in_range(ADCIV,ADCIV_ADCIFG))
{
case ADCIV_NONE:
break;
case ADCIV_ADCOVIFG:
break;
case ADCIV_ADCTOVIFG:
break;
case ADCIV_ADCHIIFG:
break;
case ADCIV_ADCLOIFG:
break;
case ADCIV_ADCINIFG:
break;
case ADCIV_ADCIFG:
ADC_Result[i] = ADCMEM0;
if(i == 0)
{

}
else
{
i--;
}
ADCIFG = 0;
break;
default:
break;
}
}

this is the same code which are present in sample code only change is that i have changed ADC channel and remove LPM mode

MSP432E401Y: RS232C to Ethernet converter

$
0
0

Part Number:MSP432E401Y

Hello.

I would like to implement RS232C to Ethernet converter using MSP432E401Y.

1.Do you have any examples for UART to Ethernet with MSP432E401Y?

2.Should I use lwip, or NDK? Which is more appropriate to realize uart to Ethernet?

3.Could you tell me how to create a web server that sets IP address? Are there any reference materials?

Regards,

MSP432P4111: MSP432 TI-RTOS flash segmentation & access question

$
0
0

Part Number:MSP432P4111

Dear friends,

My customer has two questions about MSP432 flash during software development:

  1. Flash segmentation: customer wants to have a dedicated flash space for their application task, the application task will be fixed in this location and called remotely from main function in other flash location. The reason doing this is they want only the application task region to be modified for different applications and keep the main function region as a platform block for their whole products echo systems, that’s how they do for all their MCU platforms. The question is how do we do it in the .cmd file to archive this, do we have any examples, or can you do a simple example project for them?
  2. NVS semaphore question: since it is RTOS system, how do different tasks to access flash at the same time by NVS APIs? Looks like we use semaphore in the NVS to control the flash access, and only one task could have the access at one time, what if multi tasks wants to have the access to the different flash location at the same time?

 

Thanks!

CCS/MSP430G2553: Can I see in Software if LFXT1 is connected?

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

Hello,

I have several devices here with Msp430G2553. Some of them have a 12.5pF 32kHz Oscilator connected to LFXT1, some not. I need to initialize some Peripherals in a specific mode when a oscilator is present on the device.

The initialization in both cases is straight forward and works fine. But I can not find any documentation about how to find out if a oscilator is connected to the device.

The LFXT1OF bit in BCSCTL3 Register seems not to work properly. Sometimes it is set after reset when no oscilator present, sometimes it is not set. But I haven´t seen the case when no oscilator present and it was set at initialisation Point, so I guess I need to monitor this bit?

The Example Projects assume all, that LFXT1 is connected.


MSP430F1101: How to connect an Analog CTC Accelerometer to MSP CPU?

MSP430F5131: Problem with downloading the program to the MCU

$
0
0

Part Number:MSP430F5131

Hello ,

once i try downloading the program to the MCU (by clicking on debug and download button) i get the error : 

i think i connected the MSP-FET emulator correctly to the MSP430.

MSP430FR2311: Peripherals running off internal OSC

$
0
0

Part Number:MSP430FR2311

Please will you look at the questions below:

1)      Clock - 30 days accuracy needed, few seconds of drift in 30 days is acceptable. Will the on-chip oscillator meet this requirements?

2)      IRDA –  Do we support RC6 protocol and can we run the IRDA from one of the internal OSCs?

3)      UART – 115K baud; What is the likely error rate running from internal OSC?

Thanks.

MSP430F67791: SPI read Problem

$
0
0

Part Number:MSP430F67791

Hi Everyone,

               Now i have read two byte data from WINBOND Flash via MSP430F67791.In MSP430F67791 SPI mode use for Communication purpose read and write.Now read data from flash,Data is available in UCA1RXBUF.In this only one data is available.So how to read another one data from UCA1RXBUF.

uint8_t sFLASH_SendByte(unsigned char *uData,unsigned char count)
{

// Clear Rx interrupt flag
while(!(UCA1IFG & UCTXIFG));
UCA1IFG &=~UCRXIFG;
for(datacount=0;datacount<count;datacount++)
// Transmit data
UCA1TXBUF = uData[datacount];
// Wait for transfer to complete
while ((UCRXIFG==0));
// Receive data
*uData = UCA1RXBUF;

return *uData;
}  How to read one more data.As soon as possible.

MSP430F5438A: Using MSP430F5438A BSL UART

$
0
0

Part Number:MSP430F5438A

Hi everyone,

I am using BSL Scripter from PC to flash the code into my MSP430F5438A using MSP-FET.

It works fine for text file < 256 bytes. But maximum flashable code size seems to be 256 bytes.

How to flash more than 256 bytes using BSL Scripter? I couldn't find it in the BSL Scripter User Guide.

My text file has around 25 KB. It can go even more than that.

Thanks and Regards,

Ankit

CCS/MSP430G2553: SPI and UART use in USCIA0

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

I have a question related with SPI and UART modes in same USCI.
I'am developing a academic project where i need to comunicate with 3 peripheral with 3 different modes (UART, SPI and I2C).

Since the microcontroller has two separate USCI, i have decided to connect the I2C peripheral to USCIB0, and leave it alone. I think there's nothing wrong with that.

The other two is where the problem stands. Can i connect the two to USCIA0, knowing that some of the required pins for each of the modes (UART - P1.1 and P1.2 | SPI - P1.1, P1.2 and P1.4) are shared, namely P1.1 and P1.2, and change the config mode of USCIA0 between UART and SPI when i need, or it is not doable?

This might be a trivial question, but my student knowledge is not very wide in this chapter,

Thanks for your help!

MSP430F5529: MSP 430F5529 wireless programing using ESP 8266

$
0
0

Part Number:MSP430F5529

Hello everyone,hope you're doing great,

I plan to wirelessly program an MSP F5529 wirelessly ,so is it possible to program  MSP 430 F5529 using ESP 8266 ? if it's possible, how i can do it ?

Thanks in advance for your help!


MSP430F47197: FOTA, OVER THE AIR FIRMWARE UPDATE

$
0
0

Part Number:MSP430F47197

Dear All,

I want to know if it is possible to update the firmware of MSP430F47197 over the air.

I have to design a new hardware, that requires this feature. So, please let me know, it it is possible into this micro, if yes then please tell me the procedure or provide some documentation.

I will use ESP8266 WiFi module to transfer data over the air, and I will also use nRF52 for Bluetooth Communication.

If not possible with this micro, then please suggest any other micro that has this function.

Thanks in advance.

BOOSTXL-BATPAKMKII: Charging and Discharging Problem

$
0
0

Part Number:BOOSTXL-BATPAKMKII

Dear Ryan,

I am experiencing the same problem with a new BOOSTXL-BATPAKMKII. I have bought a brand new one couple of weeks ago. I used it and when I try to recharge it, the same thing happened.

I left it on charging for overnight and it seems it was charged as I check the output of the battery. Then I connected it to the MSPF5529LP but, it just went to the zero. Then I remove the BATPAKMKII from MSPF5529LP and try yo charge it. Charge active LED stays ON for couple of minutes and then gone. I measured the voltage output and it was 3.32 V. I connect it to the MSPF55529LP, it worked for couple of minutes and then the output of BATPAKMKII became 0. Now it's doing the same thing, When I connect the USB, the Charge Active LED blinks one time and then stays off, also the output of the battery is 0.

Please help me out as I am kind of bored paying 25$ continuously for this equipment.

Btw, I have been using the MSPF5529LP with another BATPAKMKII for last couple of months and it is still working very well. 

Murat

CCS/MSP432E401Y: CCS/MSP432E401Y

$
0
0

Part Number:MSP432E401Y

Tool/software: Code Composer Studio

Hello everybody,

I'm trying to use CC2640R2 as a peripheral in the MSP432E401Y. but right now it's just the MSP432P supported in the Bluetooth plugin.

When will be the MSP432E4 supported in the Bluetooth Plugin? Or has someone dealt with this topic?

Thank you.

Regards

Fares

SIMPLELINK-MSP432-SDK: Use of RTC and Watchdog Together in same firmware

$
0
0

Part Number:SIMPLELINK-MSP432-SDK

Hi Team,

I have a certain situation arising in the firmware written and to over come that situation I am thinking of using Watchdog.

So the point is as below:

In my firmware I am using RTC to wake up the device from sleep mode every 6 hours. After wake up the unit takes some data from uPulser on board and writes the data into SD card on board and then the same data is compressed and sent to another MCU on device,

The stuff what I am experiencing is that when the data is written on the file in SD card there is not issue but when the same data is compressed and is saved into another file and the compressed data is been sent to another device on board at times, the f_open function to open the file in SD card fails and gives FR_DSK_ERR and as per the third_party library to which this file functions belong it says that FR_DSK_ERR refers to 

"The lower layer, disk_readdisk_write or disk_ioctl function, reported that an unrecoverable hard error occured.
Note that if once this error occured at any operation to an open file, the file object is aborted and any operations to the file except for close will be rejected."

So as per this the only way around to make everything work again is I have to reset the board. 

But once the unit is in field there is no way that anyone can go and reset the board so I was planing to use Watchdog concept to reset the board.

So, my questions are as below:

Can we use Watchdog and RTC in the same code?

If yes, will watchdog still be active when the unit is in deep sleep mode?

And lastly, when the issue FR_DSK_ERR arises how do I use watchdog to restart the MCU?

Hope to hear from you soon.

Thank you

Vikram

Compiler/MSP430FR5969: UART Code Example

$
0
0

Part Number:MSP430FR5969

Tool/software: TI C/C++ Compiler

Hi everyone

I have a question concering the UART mode of my msp. In the first code example for UART in the code section for the interrupt service routine there is the following line:      while(!(UCA0IFG&UCTXIFG));

I don't quite get the effect of the condition, I mean UCTXIFG is set after the transmit buffer is empty and ready to recieve a new character but why do the AND this with the whole UCA0IFG register?

Kind Regards

marc

Viewing all 22233 articles
Browse latest View live


Latest Images

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