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

MSP430F5529: Unable to interface Sd card module with MSP430F5529

$
0
0

Part Number:MSP430F5529

Sd and SPI libraries which I have used in my software(energia) are giving errors. I'm unable to find a proper SD libraries which are compatible with msp430. If anyone has interfaced Sd with mspF5529 can u please share the library files or the codes which worked for you.  


EVM430-F6736: Implementation of EVM430-F6736 with Arduino Uno WiFi Board

$
0
0

Part Number:EVM430-F6736

Hi,

I have received an EVM430-F6736 Kit as my final-year project in my University. My project is to combine the smart meter with the Arduino Uno WiFi to send the necessary data to the Thingspeak cloud.
I found the schematic diagram of the EVM430-F6736 and it has the EZ-RF connect. Will it be possible to connect the Arduino Uno WiFi board to pin 1 (TX0) and pin 6 (RX0) of SV3? If yes, what is the method?

Hope to hear from you soon and many thanks!

Best regards,
Firdaus

MSP430FR6989: MSP430 JTAG interface for ESD protection

$
0
0

Part Number:MSP430FR6989

Hi community member,

I received questions from my customers about MSP430 JTAG interface for ESD protection.
Please let me confirm the following a question.

Device : MSP430FR6989

[Question]

1-1.Is it possible to insert a resistor between the MSP430 and JTAG debugger for ESD protection?
1-2.If answer is possible, is there a recommended range of resistance values?

2.Is there information other than the data sheet for MSP430 internal circuit of RST, TDO, TDI, TMS, TCK, TEST pin?

Best regards.
Cruijff

CCS/MSP430FR2310: I2C at 400 kHz sourced from SMCLK, MSP430 is Master

$
0
0

Part Number:MSP430FR2310

Tool/software: Code Composer Studio

Hello,

What I thought would be a very simple task has now delayed a project by two weeks, and although I think that I have identified the problem, I would like expert advice.

The msp430 is used for a single task when the system is starting up. It delays 30 seconds, then sends 0x1F to an i2c slave at 0x33 at 400 kHz. That's it.

I have read the clock system and i2c sections of the user manual and don't believe that I am missing anything, and have looked through the code examples [here]. 

I tried to stay as close to the examples as possible. My approach was as follows:

1st, I followed one of the examples,  msp430fr231x_CS_01.c "Configure MCLK for 8MHz sourced from DCO." to set DCO to 2.4 kHz (although I am not sure that it wan't taken as 2 kHz)

Then I used CSCTL5 to set MCLK to 2.4 MHz and SMCLK to 400 kHz. Next I configure the I2C pins, then for testing purposed transmit 0x1F to 0x33 every 3 seconds.

I copied-and pasted the interrupt handling and the trimming function from the examples and modified a few parameters.

I have verified that the scl signal exists with an oscilloscope, but I have used an "aardvark" i2c testing device from total phase in addition to a testing tool provided by the manufacturer of the slave device, and neither actually recognizes that information is being sent. Does the code below match the task? Is there anything in the description above that suggests another mistake?

Thanks in advance,

#include <msp430.h> 


void Software_Trim();                       // Software Trim to get the best DCOFTRIM value
unsigned char TXData =0x1F;
unsigned char TXByteCtr;

#define MCLK_FREQ_MHZ 2.4                    // MCLK = 2.4MHz


int main(void)
{
	WDTCTL = WDTPW | WDTHOLD;	    // stop watchdog timer

    __bis_SR_register(SCG0);                // disable FLL
    CSCTL3 |= SELREF__REFOCLK;              // Set REFO as FLL reference source
    CSCTL1 = DCOFTRIMEN_1 | DCOFTRIM0 | DCOFTRIM1 | DCORSEL_3;// DCOFTRIM=3, DCO Range = 2.4MHz
    CSCTL2 = FLLD_0 + 243;                  // DCODIV = 2.4MHz
    __delay_cycles(3);
    __bic_SR_register(SCG0);                // enable FLL
    Software_Trim();                        // Software Trim to get the best DCOFTRIM value


    CSCTL4 = SELMS__DCOCLKDIV | SELA__REFOCLK; // set default REFO(~32768Hz) as ACLK source, ACLK = 32768Hz
                                            // default DCODIV as MCLK and SMCLK source
    
    CSCTL5 |= DIVM_0 | DIVS_3;              // MCLK = XT1CLK = 2.4MHZ,
                                            // SMCLK = MCLK/2 = 0.4MHz = 400 kHz

	// Configure I2C Pins
	P1SEL0 |= BIT2 | BIT3;       //I2C pins

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

    // Configure USCI_B0 for I2C mode
    UCB0CTLW0 |= UCSWRST;                             // put eUSCI_B in reset state
    UCB0CTLW0 |= UCMODE_3 | UCMST;                    // I2C master mode, SMCLK
    UCB0BRW = 0x8;                                    // baudrate = SMCLK / 8
    UCB0CTLW0 &=~ UCSWRST;                            // clear reset register
    UCB0IE |= UCTXIE0 | UCNACKIE;                     // transmit and NACK interrupt enable

while(1){
    //Delay for 3s
    __delay_cycles(300000); //30000000

    //Deployment Algorithm 1 for all 4 antennas
    UCB0I2CSA = 0x33;                                 // configure slave address to 0x33
    TXByteCtr = 2;                                    // Load TX byte counter
    while (UCB0CTLW0 & UCTXSTP);                      // Ensure stop condition got sent
    UCB0CTLW0 |= UCTR | UCTXSTT;                      // I2C TX, start condition

    __bis_SR_register(LPM0_bits | GIE);               // Enter LPM0 w/ interrupts
}
    //return 0;
}

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = USCI_B0_VECTOR
__interrupt void USCIB0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCI_B0_VECTOR))) USCIB0_ISR (void)
#else
#error Compiler not supported!
#endif
{
  switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
  {
    case USCI_NONE: break;                  // Vector 0: No interrupts
    case USCI_I2C_UCALIFG: break;           // Vector 2: ALIFG
    case USCI_I2C_UCNACKIFG: break;         // Vector 4: NACKIFG
    case USCI_I2C_UCSTTIFG: break;          // Vector 6: STTIFG
    case USCI_I2C_UCSTPIFG:                 // Vector 8: STPIFG
      TXData = 0;
      UCB0IFG &= ~UCSTPIFG;                 // Clear stop condition int flag
      break;
    case USCI_I2C_UCRXIFG3: break;          // Vector 10: RXIFG3
    case USCI_I2C_UCTXIFG3: break;          // Vector 14: TXIFG3
    case USCI_I2C_UCRXIFG2: break;          // Vector 16: RXIFG2
    case USCI_I2C_UCTXIFG2: break;          // Vector 18: TXIFG2
    case USCI_I2C_UCRXIFG1: break;          // Vector 20: RXIFG1
    case USCI_I2C_UCTXIFG1: break;          // Vector 22: TXIFG1
    case USCI_I2C_UCRXIFG0: break;          // Vector 24: RXIFG0
    case USCI_I2C_UCTXIFG0:
       UCB0TXBUF = TXData++;
       break;                               // Vector 26: TXIFG0
    case USCI_I2C_UCBCNTIFG: break;         // Vector 28: BCNTIFG
    case USCI_I2C_UCCLTOIFG: break;         // Vector 30: clock low timeout
    case USCI_I2C_UCBIT9IFG: break;         // Vector 32: 9th bit
    default: break;
  }
}

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
}

MSP432E411Y: TLS on Ethernet

$
0
0

Part Number:MSP432E411Y

I understand that we currently have wolfSSL. Will there be software support for TLS v1.2 in the roadmap?

msp430 experimenters board with msp430fg461\ micro on it

$
0
0

hi I have a board and have downloaded the software I am trying to run this code from the examples

#include"msp430x20x3.h"

ORG 0F800h ; Program start

RESET mov.w #280h,SP ; Stack

mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog

bis.b #01h,&P1DIR

Mainloop xor.b #01h,&P1OUT

Delay dec.w R15

jnz Delay

jmp Mainloop

ORG 0FFFEh ; RESET vector

DW RESET

END

it compiles with 10 errors. this is the code that comes in the examples pack please help

MSP430FR5969: Using same timer for sourcing and interrupt

$
0
0

Part Number:MSP430FR5969

Hi,

     I am trying to use the same timer for sourcing the ADC and then running UART int he timer interrupt.But it is not working.If I use two timer interrupts then also no results .

Is it possible to use it in this way.I am not sure about how to go about  it.I am suppose to sample the ADC for 100ms in 1 second and print the data on uart every 10 seconds.

It would be really great if somebody could help me in clearing this concept or give a suggestion for implementation.

Thanks 

Regards

Stuti Jain

MSP430FR6047: Help with MSP430FR6047

$
0
0

Part Number:MSP430FR6047

The version of USS LIB I used is "USSLib_01_40_00_06".I found that after running the program for a while, it seemed to crash,just like this:



and the CPUOFF IS '1',When I manually reset the CPUOFF bit,The program has continued to run.

My question is why the CPU will be OFF while the program is running.No low-power programs are involved in my program.


CCS/MSP430F2274: Error connecting to the target: Could not find device ( or device not supported)

$
0
0

Part Number:MSP430F2274

Tool/software: Code Composer Studio

I'm using the MSP430 eZ430-RF2500 development tool for my project. There are two eZ430-RF2500T wireless target boards in the kit and i need to use both of them in my project. The problem is when I try to debug the program on to one of them, I get this error message: "Error connecting to the target: Could not find device ( or device not supported)". The other target board works fine and I just don't know what the problem is. I'm using version 8 of the CCS. 

MSP430F5659: Can TI's USB VID be used?

$
0
0

Part Number:MSP430F5659

Team,

My customer has the following question:

We are currently working on a project that will use the MSP430F5659 and we intend to use its USB capabilities. I have done some initial research, and I believe LithiumWerks can use TI's USB VID for free and get a PID assigned to us by TI (also free) provided that we don't use the USB logo on our product and that we use an MSP430. Can you confirm this?

 

Also, what RTOSes can you recommend for the MSP430F5659 that either already have USB support or integrate well with your USB stack?

Thanks,

Brian

MSP430FR2633: MSP430FR2633

$
0
0

Part Number:MSP430FR2633

Hi,

I am currently trying to use the the captivate MCU development kit to communicate with our another host MSP430F149 controller.

I am using the 8 button of the BSWP demo bard to mimic our touch display.

I know that with the captivate design tool, you can select either UART, BulkI2C or register I2C communication mode.

As per your design guide, if we want to use the captivate microcontroller MSP430FR2633 with the another host processor, the ideal communication mode will be  the Register I2C mode.

Actually my question is, if we do not want to use the register I2C mode and if we want to use the MSP430FR2633 as the Slave to our master MSP430F149 micro, how should initialize the MSP430FR2633 as the slave ?? 

The whole idea is that our host micro MSP430F149 read the captivate MCU MSP430FR2633  at every 33 millisecond, and depending upon the button touched our host micro will do different functions.

To read the data from MSP430FR2633, the MSP430F149 sent the slave address of the MSP430FR2633 with READ byte. Once the captivate MSP430FR2633 recevied the address it will transmit the six bytes of data with information of which button recently touched.   

Compiler/MSP430F5335: Why does driverlib take so much flash

$
0
0

Part Number:MSP430F5335

Tool/software: TI C/C++ Compiler

Looking at the project.map file, I have the following lines:

.const     0    0000a110    00005782     
                  0000a110    00000916     driverlib_msp430.lib : ucs.obj (.const:.string)
                  0000aa26    000008da     debug.obj (.const:.string)
                  0000b300    000004f4     modem_sm.obj (.const:.string)
                  0000b7f4    00000232     modem.obj (.const:.string)

The driverlib_msp430.lib is the drivelib that I compiled as a library.  So my question is, it looks like it takes up 0x916 bytes, thats 4.5K of flash, why so much?  any way to reduce it?

MSP430FR5994: UART Hardware Flow Control Example (RTS & CTS)

$
0
0

Part Number:MSP430FR5994

Hi team,

We are using the MSP430FR5994 in our design and are looking to implement hardware flow control (RTS & CTS). Do we have an example that has this implementation? (preferably RTOS if available)

Regards,

Akash Patel

Compiler/MSP430G2553: I2c Problem using Energia

$
0
0

Part Number:MSP430G2553

Tool/software: TI C/C++ Compiler

Hello,

I have a question regarding using Arduino ode on Energia.

I am trying to use the sample code from Single tact which is in Arduino in MSP430 using Energia.

I am using P1_7 as SDA abd P1_6 as SCL. I am not able to use I2C communication?

Is there any modification required for using it in Energia?

Here is the sample code:

#include <Wire.h> //For I2C/SMBus

void setup()
{
Wire.setModule(0);
Wire.begin(); // join i2c bus (address optional for master)
//TWBR = 12; //Increase i2c speed if you have Arduino MEGA2560, not suitable for Arduino UNO
Serial.begin(57600); // start serial for output
Serial.flush();
}

void loop()
{
byte i2cAddress = 0x04; // Slave address (SingleTact), default 0x04
short data = readDataFromSensor(i2cAddress);
Serial.print("I2C Sensor Data:");
Serial.print(data);
Serial.print("\n");
delay(100); // Change this if you are getting values too quickly
}


short readDataFromSensor(short address)
{
byte i2cPacketLength = 6;//i2c packet length. Just need 6 bytes from each slave
byte outgoingI2CBuffer[3];//outgoing array buffer
byte incomingI2CBuffer[6];//incoming array buffer

outgoingI2CBuffer[0] = 0x01;//I2c read command
outgoingI2CBuffer[1] = 128;//Slave data offset
outgoingI2CBuffer[2] = i2cPacketLength;//require 6 bytes

Wire.beginTransmission(address); // transmit to device
Wire.write(outgoingI2CBuffer, 3);// send out command
byte error = Wire.endTransmission(); // stop transmitting and check slave status
if (error != 0) return -1; //if slave not exists or has error, return -1
Wire.requestFrom(address, i2cPacketLength);//require 6 bytes from slave

byte incomeCount = 0;
while (incomeCount < i2cPacketLength) // slave may send less than requested
{
if (Wire.available())
{
incomingI2CBuffer[incomeCount] = Wire.read(); // receive a byte as character
incomeCount++;
}
else
{
delayMicroseconds(10); //Wait 10us
}
}

short rawData = (incomingI2CBuffer[4] << 8) + incomingI2CBuffer[5]; //get the raw data

return rawData;
}

MSP432P401R: Signal deterioration at ADC Pin

$
0
0

Part Number:MSP432P401R

I have a MSP43P401R Launch Pad kit. I have configured Pin 4.7 as my ADC-0 Pin and am using it to read data from a filter which I have made myself.

The issue is that when the output of the filter is measured on the MSO, the signal is clear without noise/distortion.

However, when I connect this output of my filter to the ADC configure Pin 4.7, the same signal reduces in amplitude to a value far below the input signal value.

For instance, I have provided a 6Hz 100mVpp Sine wave to my filter designed as a LPF with Fc at 20Hz. The waveform is as shown below,the yellow wave is the output of the filter.

However, when the output is connected to P4.7(ADC0) pin this is the outcome,the yellow output signal line falls almost flat:

Certain points of clarification:

  1. The filter has been designed with a cut-off of 20Hz and is a 6th order filter with an amplification stage at its output. It has been tested separately and works.
  2. The ADC has been used without interrupt and the value from ADC14MEM0 register is read via a function call by polling.
  3. The function generator when connected directly at the ADC pin provides, a clear output signal without attenuation.
  4. I have attached a Coupling capacitor of value 1uF at the output of my filter to remove the DC offset. 

What could be the cause of this deterioation?


EVM430-F6736: IAR Embedded Workbench IDE crashes every time I open the emeter.eww IAR IDE Workspace (project)

$
0
0

Part Number:EVM430-F6736

Namaste Support Executive,

We've recently purchased the MSP430-F6736 EVM Kit for E-metering. For software, I've downloaded the IAR Embedded Workbench v7.11 (Kickstarter 8k code limited). Details are as below.

 


When I double click and attempt to open the ..\slaa517e\slaa517\SLAA517\Source\emeter-ng\emeter.eww, I'm prompted for a conversion twice, to which I agree. However, the IAR Workbench crashes and prompts me to send the error dump before auto closing. Details are as below.

 



The ZIP of the Crash dump is additionally enclosed below.

(Please visit the site to view this file)


My questions:

1. I'm unable to find the emeter-6736.epw project in the slaa517 folder. Everything is specific to 6733. Is the same code valid for evm6736 kit? The slaa517e PDF under Section 5.2.1 reads as below -

"The folder "emeter-ng" contains multiple project files. For this application, the emeter-6736.ewp project file is to be used. The folder "emeter-toolkit" has corresponding project file emeter-toolkit-6736.ewp. Choose only the projects that have the succeeding terms 6736 for this application. For first time use, it is recommended that both the projects be completely rebuild."

2. ‎How do I resolve this issue to open the emeter.eww workspace?

3. ‎How do I migrate the code to TI's Code Composite Studio? What is the recommended version of this IDE for building the existing sample code?

Thanks | Regards,
Dipen Shah

MSP430F2112: The behavior for incorrect password in the BSL mode on MSP430F2112

$
0
0

Part Number:MSP430F2112

Hello,

Despite the following description, my customers mention that incorrect password erases Information Memory.
"When an incorrect password is given, a mass erase is initiated. This means all code flash is erased, but not Information Memory."
The description is in chapter 3.5.2 of the following document.
www.ti.com/.../slau319r.pdf

My customers use MSP430F2112.
In case of MSP430F2112, is Information Memory erased by the incorrect password?

Best Regards,
Nomo

Can replace MSP430F5418A single chip MSP430FR series and MSP432 series MSP432

MSP430F5659: The problem of RTC_B Calendar feature

$
0
0

Part Number:MSP430F5659

Hello TI Expert,

 

I have got a question from our customer and they are seeing some problems about the Calendar function of RTC_B of MSP430FR5659.

 

[Problem]

They sometimes see the problem that the RTC Calendar value becomes strange.

Please see the attached log file that they are issuing "time" command every seconds.

This is their firmware command that can get Year, Month, Day, Hour, Minutes and Seconds.

Normally, it should increase 1 second but it is increasing 87 or 97 years every 1 second.

After reaching at 4095 years, it goes back to 0 year and increasing 87 or 97 years again.

 

[Question]

This calendar function is normally working correct but they sometimes see this problem.

They do not think there is any mistake in the configuration of UCS or RTC register.

They are also reading some RTCCTL registers when the problem occurs. But we do not think there are any problem in these register values.

Thus, we do not know what the problem is. Do you have any comment to this problem and give any advice?

 

It would be helpful if you can tell us any advice or tell us what point they should check.

 

Best Regards,

Nobu Arai

(Please visit the site to view this file)

MSP430F6736: MSP430F6736 in bare die version

Viewing all 22138 articles
Browse latest View live


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