***
*** RSSing Note: Article removed by member request. ***
***
Part Number:MSP430FR6047
Hi,
I was reading through the Datasheet of the MSP430FR6047 and noticed that it comes with an MTIF:
Metering Test Interface (MTIF)
– Pulse Generator and Pulse Counter
– Pulse Rates up to 1016 Pulses per Second (p/s) – Count Capacity up to 65535 (16 Bit)
– Operates in LPM3.5 With 200 nA (Typical)
I intend to test my flow meter and want to generate a pulse every 10 liters or so, and I would like to use this interface as PWMs generated by GPIOs seem like a bad choice. How does this test interface work? Can anyone give examples of it? I couldn't find any examples nor any previous explanation of it.
I appreciate any and all help.
Part Number:MSP432P401R
Tool/software: Code Composer Studio
The value is '-151' (0xffffff69). The title is 'SC_ERR_FTDI_OPEN'. A connection cannot be established from Olimex TMS320-XDS100v3+ to launchpad MSP432P401R. All J101 jumper disconnected. ARM 20 to ARM 10 standard cable connected. Both MSP432P401R and Olimex TMS320-XDS100v3+ connected to host PC via 2 USB cables.
Part Number:MSP430G2553
Tool/software: Code Composer Studio
Hi
I wrote this program for communication between TI MSP430G2553 and NPX MFRC522 RFID reader.
I trying to read the Version of the ic (register adress 0x37) so i send over MOSI channel the address like datasheet instructions:
In the arduino version of mfrc522 library code, after sent the address have to sent a dummy byte. In this manner the after the ic had process the request it "shift" the required value in the master RX register (I think).
After the address was sent over the MOSI I recive in the RX register the value 0xFF (i think this is normal) but when I send the dummy byte (and I should be getting the value of the version register) i recive 0xFF again.
What's the problem? Thanks in advance
I attach the code below
#include <msp430.h> #include <stdint.h> #include <stdio.h> volatile char received_ch = 0; uint8_t SPI_write(uint8_t data){ //IFG2 &=~(UCA0RXIFG+UCA0TXIFG); P1OUT &= (~BIT5); // Select Device UCA0TXBUF = data; // setting TXBUF clears the TXIFG flag while (!(IFG2 & UCA0RXIFG)); // wait for SPI TX/RX to finish P1OUT |= BIT5; return UCA0RXBUF; } #define SPI_read() (SPI_write(0x00)) // Read by sending a dummy byte int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1OUT |= BIT5; P1DIR |= BIT5; P1SEL = BIT1 | BIT2 | BIT4; P1SEL2 = BIT1 | BIT2 | BIT4; UCA0CTL1 = UCSWRST; UCA0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master UCA0CTL1 |= UCSSEL_2; // SMCLK UCA0BR0 |= 0x02; // /2 UCA0BR1 = 0; // UCA0MCTL = 0; // No modulation UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine** IE2 |= UCA0RXIE; SPI_write((0x37<<1) | 0x80); //for(x = 2000; x > 0; x--); int value = SPI_write(0); }
Part Number:MSP430FR5994
Tool/software: Code Composer Studio
Greetings,
I am working on outputting a PWM signal with a varying duty cycles. My code is based on setting a timer that counts upto one period of a PWM signal, and another timer that for the duty cycle. The end goal is to use a LPF in order to average out the PWM and create a sine wave.
My problem is that my interrupts are never getting triggered. I am not really sure why. I tried several ways of timer initialization with no luck. I would appreciate any help with the code. I would also be happy if someone can point me in the right direction for this project.
#include <stdio.h> #include <msp430fr5994.h> /** * main.c */ unsigned char counter; // Current location in wave array unsigned char wave[32] = { // Wave array, preset to values of sine 128, 140, 152, 164, 173, 181, 187, 191, 192, 191, 187, 181, 173, 164, 152, 140, 128, 116, 104, 92, 83, 75, 69, 65, 64, 65, 69, 75, 83, 92, 104, 116 }; unsigned int i; // Used for 'for' loops. void main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop WDT PM5CTL0 &= ~LOCKLPM5; P8DIR |= BIT0; // P1.0 output P1DIR |= BIT0; counter = 0; // Reset counter P8OUT=0x0001; // Initialize Timer TA0CCTL0 |= CCIE; //Enable Interrupts on Timer TA0CCTL1 |= CCIE; // CCR1 interrupt enabled TA0CCR0 = 256; // Set PWM period to 256 clock ticks TA0CCR1 = wave[counter]; // Set first duty cycle value TA0CTL = TASSEL_1 |TAIE| MC_1 | TACLR; // SMCLK, upmode, enable interrupt, clear TA1R P8OUT=0x0001; P1OUT=0x0001; P1OUT=0x000; //printf("done with init\n"); _BIS_SR(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } /** * TimerA0 interrupt service routine **/ #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A0(void) { P8OUT |= BIT0; // Set P1.0 P1OUT=0x0001; TA0CCR1 = wave[counter]; // Set next duty cycle value counter += 1; // Add Offset to CCR0 if ( counter == 32) // If counter is at the end of the array { counter = 0; // Reset counter } } /** * TimerA1 Interrupt Vector (TAIV) handler **/ #pragma vector=TIMER1_A1_VECTOR __interrupt void Timer_A1(void) { switch( TAIV ) { case 2: // CCR1 interrupt P8OUT &= ~BIT0; // Clear P1.0 to determine duty cycle. break; default: break; } }
Part Number:MSP430F5524
Hello
My customer is communicating with LDC1612 using I2C of USCI_B1.
During the I2C communication, there was a problem that the start bit did not occur, and as a result, it was confirmed that noise occurred by power line in the I2C line as a result of debugging.
When noise occurs in the I2C line, the start bit is not transmitted suddenly during communication, and the I2C block can not be restored even if it is software reset by UCSWRST bit.
Of course, I know that cause of this problem is wrong layout design.
Questions:
- Why does the I2C Block stop when noise is generated?
- Is there a way to avoid or recover software for this issue?
Thank you
Part Number:MSP430FR2522
Hi
MSP430FR2522 data sheet do not have Internal Reference current consumptin data, IrEF with and without ADC_BUF.
Thanks
Venkat
HI,
I am wondering if it is possible to use MSP430 to develop a dead band for PWM to drive a H-Bridge.
Wonder if anyone can help to answer
thanks
Part Number:MSP430I2040
Tool/software: Code Composer Studio
Hello ,
I am doing Single phase energy meter using MSP430I2040 ,
When i gone through the command protocol document , I have seen i2041, are the same commands used for I2040.
Here are some doubts i am having -
How to read the UART data sent from i2040?
We need to send any request to i2040for values?
I am able to see data Waveforms in Logic Analyzer but not in Docklight or STM.
How to use the commands which is specified in the protocol document?
How to check the boudrate of UART in i2040?
Where is the UART configuration has been done in i2040?
How to get i2040 to active state from idle state?
Is there any delay has to keep after sending commands?
Got code from Energy Measurement design center GUI and flashed to MSP430I2040 but while debugging i am getting different values as shown below-
Please share your thoughts.
Thanks and Regards,
Fakruddin Mulla
Part Number:MSP432P401R
Hello!
There is a problem of increased current consumption on msp 432. The problem is repeated on the TI Launchpad MSP-EXP432p401R debug board, and on the finished device with msp432p401r.
On the debug board, a sample program is launched with lpm45 (pcm_lpm45_no_wakeup), all jumpers except the grnd are disabled, I measure in the 3.3v circuit and get floating 1.8 mA+-1 mA.
The board is red, revision C.
lpm3 mode is all the same, PCM_CTL1_FORCE_LPM_ENTRY does not affect.
Sample:
/* DriverLib Includes */
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>
/* Standard Includes */
#include <stdint.h>
#include <stdbool.h>
int main(void)
{
/* Halting the Watchdog */
// MAP_WDT_A_holdTimer();
// /* Configuring P1.1 as an input and enabling interrupts */
// MAP_GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN1);
// MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1);
// MAP_GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN1);
// //MAP_Interrupt_enableInterrupt(INT_PORT1);
// /* Going to LPM3 and waiting for wake-up*/
// MAP_PCM_gotoLPM3InterruptSafe();
MAP_PCM_shutdownDevice(PCM_LPM45);
/* Execution should shut down */
while(1);
}
/* GPIO ISR */
void PORT1_IRQHandler(void)
{
MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1,
MAP_GPIO_getEnabledInterruptStatus(GPIO_PORT_P1));
}
Part Number:MSP430G2553
Hello,
My application is behaving in an odd way and there is a chance that it is related to the MCU error described on the errata of the part as TA12. I am trying to implement the workaround but it is not doing the trick. Could I please have some code example or indications on how to implement this workaround?
Part Number:MSP430G2955
deer ti engineer:
i want store a ram value to flash before a wdt reset. Can it be realized?
i see WDT_VECTOR is for WDTTMSEL = 1 , interval timer mode. but i should use the Watchdog mode, so the watchdog will trig reset vector not the WDT_VECTOR , right? so i can't write my own store code
into reset vector , right?
thank you
Part Number:MSP432P401M
Hello,
I'm sorry for silly question, but I couldn't find restrictions on VRef+/VRef- terminals. So, can I attach 3 volts external reference on this microcontroller?
Thanks
Part Number:MSP430F5438A
Hello,
I am trying to find an I2C example code from where I can understand how to customize it for my purpose. Trying to communicate with a sensor having I2C protocol. I'm using MSP430F5438A Exp board and IDE Code Composer studio. Following are the tasks have to do to communicate the sensor:
1. Need to configure the sensor (In several addresses of the sensor I have to write different values suppose in 0x0E register I write 0x08, in 0x0D I like to write 0x01 and so on)
2. Read raw data from the sensor (Sending the address from where I like to read multiple bytes).
I was trying to understand register level I2C codes from MSP430 ware. I was wondering does any of it doing something similar?
I appreciate any suggestion. Also if none of the register level code doesn't serve the purpose, please help me find similar sort of example code.
Thanks.
Rana
Part Number:MSP432P401R
RunTI-RSLK VerySimpleApplicationProcessorprojectingcode in the AP_Init()function configurationthe configurationconfiguration the.iedifstatements, configurationconfigurationconfigurationconfigurationconfigurationconfigurationby the Ti-RSLK VerySimpleApplicationProcessorprojectingcodes, pingconnections to the change to the change.
Part Number:MSP430FR2355
Tool/software: Code Composer Studio
I am very new to msp430fr2355 microcontroller and I want to send data from this microcontroller to PC with the help of UART but I dont have any idea either about code or connection.Please suggest me how could send data to RealTerm with this microcontroller.Please give me code and Its hardware connection.There is no article on the internet related MSP430FR2355 about UART.
Part Number:MSP430FR2355
Tool/software: Code Composer Studio
Could somebody explain me the codes that is written below:-
void Software_Trim()
{
unsigned int oldDcoTap = 0xffff;
unsigned int newDcoTap = 0xffff;
unsigned int newDcoDelta = 0xffff;
unsigned int bestDcoDelta = 0xffff;
unsigned int csCtl0Copy = 0;
unsigned int csCtl1Copy = 0;
unsigned int csCtl0Read = 0;
unsigned int csCtl1Read = 0;
unsigned int dcoFreqTrim = 3;
unsigned char endLoop = 0;
do
{
CSCTL0 = 0x100; // DCO Tap = 256
do
{
CSCTL7 &= ~DCOFFG; // Clear DCO fault flag
}while (CSCTL7 & DCOFFG); // Test DCO fault flag
__delay_cycles((unsigned int)3000 * MCLK_FREQ_MHZ);// Wait FLL lock status (FLLUNLOCK) to be stable
// Suggest to wait 24 cycles of divided FLL reference clock
while((CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)) && ((CSCTL7 & DCOFFG) == 0));
csCtl0Read = CSCTL0; // Read CSCTL0
csCtl1Read = CSCTL1; // Read CSCTL1
oldDcoTap = newDcoTap; // Record DCOTAP value of last time
newDcoTap = csCtl0Read & 0x01ff; // Get DCOTAP value of this time
dcoFreqTrim = (csCtl1Read & 0x0070)>>4;// Get DCOFTRIM value
if(newDcoTap < 256) // DCOTAP < 256
{
newDcoDelta = 256 - newDcoTap; // Delta value between DCPTAP and 256
if((oldDcoTap != 0xffff) && (oldDcoTap >= 256)) // DCOTAP cross 256
endLoop = 1; // Stop while loop
else
{
dcoFreqTrim--;
CSCTL1 = (csCtl1Read & (~DCOFTRIM)) | (dcoFreqTrim<<4);
}
}
else // DCOTAP >= 256
{
newDcoDelta = newDcoTap - 256; // Delta value between DCPTAP and 256
if(oldDcoTap < 256) // DCOTAP cross 256
endLoop = 1; // Stop while loop
else
{
dcoFreqTrim++;
CSCTL1 = (csCtl1Read & (~DCOFTRIM)) | (dcoFreqTrim<<4);
}
}
if(newDcoDelta < bestDcoDelta) // Record DCOTAP closest to 256
{
csCtl0Copy = csCtl0Read;
csCtl1Copy = csCtl1Read;
bestDcoDelta = newDcoDelta;
}
}while(endLoop == 0); // Poll until endLoop == 1
CSCTL0 = csCtl0Copy; // Reload locked DCOTAP
CSCTL1 = csCtl1Copy; // Reload locked DCOFTRIM
while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // Poll until FLL is locked
}
Part Number:MSP430FR2153
Dear E2E forum member,
I used IAR7.12 version. building&debug MSP430FR2153TRHAT board(part number:MSP430FR2153). Get error message in IAR when download&debug.listed as bellowed lines.
Device configuration data inconsistent. Please discontinue using/replace target device. : (OpenDevice) , Device=MSP430FR2153, PwLength=0 .
I have configured target as "msp430fr2153" in IAR/option/target menu. what's the root cause?
simulator is "MSP-430 USB-Debug-interface \MSP-FET430UIF".
thanks a lot and best regards
yuanxi.wang