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

MSP430FR6989: MSP430FR6989 wait for SPI

$
0
0

Part Number: MSP430FR6989

Hello,

I try to send a register via SPI. I initialized the SPI Module. Unfortunatly some Bits seem to flip. I used some functions of the driverlib. Is this the correct way to transmit data via SPI?

    //USCI_B0 TX buffer ready?
    while(!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,EUSCI_B_SPI_TRANSMIT_INTERRUPT)) // (, EUSCI_B_SPI_TRANSMIT_INTERRUPT  = UCTXIE)
    {
           ;
    }

            EUSCI_B_SPI_transmitData(EUSCI_B0_BASE, reg[row][col]);
            while(EUSCI_B_SPI_isBusy(EUSCI_B0_BASE) == EUSCI_B_SPI_BUSY){} //Wait until SPI transmission finished

I want to send 32 bits at a time, but some times the MOSI signal has a spike.

Best regards,
Tobi




I need a help to develop neural network in MSP430 microcontroller

$
0
0

Dear Sir

I have two different input data (voltage, current) and output data in excel file. I need help to training the data using neural network method and how to program this in micro-controller and tested with real-time (machinery) input datas.

Note: I am very new to this field. So please give the details briefly and send the sample examples.

 

Regards

Hemavathi

CCS/MSP-EXP430G2ET: Running MSP430G2553 OOB Demo... using CCS ver 8.3.0... Cannot find C:\Users\XXX\AppData\Local\Texas

$
0
0

Part Number: MSP-EXP430G2ET

Tool/software: Code Composer Studio

Hello Everyone,

Basic Questions on using MSP430G2ET and its demo.  

1) Error:  "Cannot find C:\Users\XXX\AppData\Local\Texas "
2) Trouble loading/running  the OOB GUI demo
3) Inconsistent behavior with other serial termnials (Realterm)
4) ESD issues?
5) Swapping chips in/out of Launchpad, How long should power be off?  

I am a beginner at using TI microcontrollers.  The 430 series looks ideal from a
low current standpoint. I had some success using CCS at work using an older
version of CCS ver 8.3.0. 

I installed that same version at home get the error...
"Cannot find C:\Users\XXX\AppData\Local\Texas" 

From reading the forum, it would appear that although CCS ver 8 works at work,
updataing to ver 9 at home may solve the problem with (1).  I will try that. 

I have the MSP430G2ET launch pad, actually two of them.
One seems not to be recognized as a serial port. I am wondering
if these are especially sensitive to ESD? I would expect that could
be possible with a 3V6 volt limit and everything being high impedance!  

My three MSP430G2553 chips all seem to run blink LED, or the temp 
monitoring on the launchpad once they are loaded, but the connection 
to the serial terminal or OOB GUI via the USB port appears to be inconsistent.
(This is at work, where I don't have error (1).  )
Often I can't see port numbers that look appropriate. 

I have not been able to reproduce my serial terminal OOB GUI
symptoms consistently.  Which means troubleshooting is... impossible? 
Sometimes Realtem reads out, but OOB GUI does not... same board and chip.

I plan on being consistent with ESD protection, ungrading to
CCS 9.1.0, and use the Resource Explorer to load the
OOB GUI since that worked at work. I have tried installing the 
OOB GUI in a couple places and will try to uninstall all of them 
before reinstalling. Cloud vrs. local?  I am not sure which version I 
was working with, maybe both? 

I may order another launch pad board to see how it behaves.
I am using 64 bit Windows 10 at home.

I saw the advice about closing all screens and opening just *one*,
that may help resolve the serial terminal/OOB GUI issue?

Any *short* advice for newbies to this family of chips and their
supporting software is appreciated.

Thank you all for your time consideration.  



 

 

CCS/MSP430F5529: UART receive is interrupted by timer interrupts

$
0
0

Part Number: MSP430F5529

Tool/software: Code Composer Studio

Hello, 

I'm using USCI_A0 to send/receive through UART and timer A0. However, I'm missing some bytes when I receive UART when I have timer interrupts enabled. If they aren't enabled, I have no issues. I thought that UART interrupts are higher priority interrupts which means that this shouldn't really be the case. I'm not sure how to fix this? 

MSP430FR2433: SYSRIVECT "Top of RAM"

$
0
0

Part Number: MSP430FR2433

Hi,

What is the memory range for the vector table when the SYSRIVECT bit is set?  I expect I need to carve this memory out from the linker command file.

Regards,

-Mike

CCS/MSP430FR5994: Use UART to talk to PC

$
0
0

Part Number: MSP430FR5994

Tool/software: Code Composer Studio

Hello everyone,

I'm a student learning embedded C and MCUs, so I am working on a project to use PC to communicate with the MCU.

The idea is to use python code through PySeial to send signals to the msp430 to change the PWM duty cycle and read the power value through ADC and send it back to the PC terminal to verify. 

I have my PWM code working ( TA0CCR0 = 1000-1; TA0CCR1 = 500; with a 50% duty cycle), I think somehow the signal from PC needs to change the TA0CCR1 value in order to change the duty cycle, but I have no idea how to implement that and I can't really understand the UART setup from the TI example. Please try to make as simple as possible. Thank you!

Compiler/MSP430-GCC-OPENSOURCE: MSP430 GCC Stand-Alone Packages

$
0
0

Part Number: MSP430-GCC-OPENSOURCE

Tool/software: TI C/C++ Compiler

I'm transitioning my project out of CCS. I build from a makefile, I'm planning to load my MSP430FR5969 using MSP Flasher, and I'm planning on debugging using gdb.

I'm attempting to follow along with the MSP430 GCC User Guide. The following section seems to contain the info I need regarding stand-alone packages:

However, those download options don't exist on the MSP430 GCC Software Download Page. The only options I have are shown below:

I've downloaded the msp430-gcc-8.2.0.52 source-full, linux64, and support-files packages. After building the full gcc compiler from source and searching through all of the packages, I am unable to find the gdb_agent referenced in the user guide. What am I missing?

MSP432E401Y: Link Local Address and DHCPC service Simplelink 3.20.00.10

$
0
0

Part Number: MSP432E401Y

Hi,

I want a link local IP address assigned while the DHCPC service is waiting for an address to be assigned to it.

If I use something like:

void* pIpAddrEntry = NULL;
CI_IPNET NA;
char *ipAddr = "169.254.1.2";
char *ipMask = "255.255.0.0";
NA.IPAddr = inet_addr(ipAddr);
NA.IPMask = inet_addr(ipMask);
if(CfgGetEntryCnt( phCfg, CFGTAG_IPNET, 1 )==0)
	CfgAddEntry(phCfg, CFGTAG_IPNET, 1, 0, sizeof(CI_IPNET),(unsigned char *)&NA, &pIpAddrEntry);

the DHCPC service no longer works.

There are multiple previous requests for RFC3927 conforming link local address behavior, with reponses that there is no plan for this. For my purposes, I don't need the address conflict resolution. Just some address assigned to the MSP432 when a DHCP server is not connected.

Can the DHCPC service assign an address to an interface that already has an address (even if it clobbers the existing address)?

Thanks,

Edward


MSP430F5438: ACLK not triggering capture of Timer B

$
0
0

Part Number: MSP430F5438

With Timer B driven by SMCLK configured for DCO at 12 MHz, and ACLK driven from XT1 crystal at 32768 Hz, using capture/compare module block 6 with CCIS = CCI6B, trying to latch TB0R into TB0CCR6 at every falling edge of ACLK.

No joy; CCI never appears non-0 (in debugger); interrupt for TB0CCR6 capture never fires.

Manually (in debugger) toggling CCIS from 10 to 11 and back, forcing CCI source from VCC to GND and back, forces falling edge detection in CCI and TB0R value gets latched into TB0CCR6.

Plenty of evidence elsewhere (Timer A sourced from ACLK) that ACLK is running and falling edges should be available.

static void vInitializeTimerB0CCR6( void ) {
    // Disable Interrupts
    _DINT() ;
    // run TB0R from SMCLK continuous
    /* [Already done by osal_init_system()->osalTimerInit()!]
    TB0CTL = TBSSEL__SMCLK + MC__CONTINUOUS + TBCLR ;
    */
    // set CCR6 to latch TB0R on falling edges of ACLK
    TB0CCTL6
        = CAP // Capture mode
        + CCIS_1 // Capture input (trigger) select: 1 - CCIxB ( = ACLK )
        + CM_2 // Capture mode: 1 - neg. edge */
        + CCIE // Capture/compare interrupt enable
        + SCS // Capture sychronize
        ;
    // "Setting the SCS bit to synchronize the capture signal with the timer clock is recommended."
    // Enable Interrupts
    _EINT() ;
}

Compiler/MSP430-GCC-OPENSOURCE: small documentation error in slau646e

$
0
0

Part Number: MSP430-GCC-OPENSOURCE

Tool/software: TI C/C++ Compiler

Both warning options for missing NOPs around interrupt enable/disable instructions are listed as "-mY". Presumably one of these is meant to be "-my" based on the other options in table 22.

Very minor but probably worth correcting in the next doc rev.

MSP430F6779: Using TI tools for mass production: MSP-TS430PEU128, UNIFLASH, MSP-FET, MSP-GANG

$
0
0

Part Number: MSP430F6779

Hello,

My customer asked me whether the following items are good to build a mass production uC programmer or not. Could you please advise ?

Please tell me about each the item:

1. MSP-TS430PEU128: A socket board.

2. UNIFLASH: A GUI or command-line based programming application for PC.

3. MSP-FET: USB-JTAG box.

4. MSP-GANG: A stand-alone programmer.

 

The target uC is MSP430F6779IPEU.

 

The point “good to build a mass production system or not” may be not clear or not easy to agree, therefore it would be better for everyone to use different words like:

[a] The product is intended for mass-production.

[b] Neutral. It is up to users. The product is Not intended for mass-production. On the other hand, none of known fatal issues to stop it.

[c] We would advise customers not to use it for mass-production.

  

MSP430FR2155: Noise to the output port of MSP430

$
0
0

Part Number: MSP430FR2155

Hello,

When noise is input during high output with MSP430, it appears that the output signal is temporarily low.
Is there any possibility that MSP430 will show some behavior when noise is input to the output port on MSP430FR2155?

Regards,

U-SK

MSP430F67641: GUI application source code

$
0
0

Part Number: MSP430F67641

Hello,
Good morning.
We have used the MSP430F67641IPN as the power meter application, we are intend to  write a programm to verify the meter alike the GUI software that you provided, whether can you provide the source code of the GUI to us for refer?
 
Thanks and best regards
Lucy zhou

MSP430FR4133: What can be the reset cause?

$
0
0

Part Number: MSP430FR4133

Hi team,

IDE: tested with both CCSv9.1 & CCSv8.2.

Compiler versions: tested with both TI v18.12.1 LTS and TI v18.12.3 LTS

HW: MSP430FR4133 LaunchPad. Tested on 2pcs.

FW:

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

    ConfigClock();                  // MCLK/SMCLK to 8MHz
    ConfigGPIO();
    ConfigTimer();
    ConfigADC();
    ConfigUART();
    PM5CTL0 &= ~LOCKLPM5;           // Disable the GPIO power-on default high-impedance mode
                                    // to activate previously configured port settings
    __bis_SR_register(GIE);         // interrupts enabled
    while(1)
    {
        Function1();
        Function2();
        Function3();
    }
}
void ConfigClock(void)
{
    FRCTL0 = FRCTLPW | NWAITS_3;

    // set system clock to 8MHz, sourced from the internal DCO, no external crystal
    __bis_SR_register(SCG0);                // disable FLL
    CSCTL3 |= SELREF__REFOCLK;              // Set REFO as FLL reference source
    CSCTL0 = 0;                             // clear DCO and MOD registers
    CSCTL1 &= ~(DCORSEL_7);                 // Clear DCO frequency select bits first
    CSCTL1 |= DCORSEL_3;                    // Set DCO = 8MHz
    CSCTL2 = FLLD_0 + 243;                  // DCODIV = 8MHz
    __delay_cycles(3);
    __bic_SR_register(SCG0);                // enable FLL
    while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // Poll until FLL is locked


    CSCTL4 = SELMS__DCOCLKDIV | SELA__REFOCLK; // set default REFO(~32768Hz) as ACLK source, ACLK = 32768Hz
                                            // default DCODIV as MCLK and SMCLK source
}

I don't use WDT.

I tried with some different clocks and FRAM wait states, same result.

In the while(1) loop:

Function1() reads ADC. Function2() does some calculation (no HW involved, no divide by 0). Function3() controls a stepper using GPIO.

case 1: remove all 3 functions --> the MCU work well (does NOT reset after some time)

case 2: keep any 1 or 2 functions -->  the MCU work well (does NOT reset after some time)

case 3: keep ALL 3 functions --> the MCU keep resetting after some time. FRAM / RAM usage in this case is only 2936 / 334 bytes.

Using the onboard debugger, I can see the SYSRSTIV = 0x02 everytime the MCU resets.

Flags: SVSHIFG, PMMPORIFG, PMMBORIFG, WDTIFG = 0.

OFIFG, PMMRSTIFG = 1

Could anyone please tell me what can be the reset cause in this case?

MSP430G2001: Cannot link with msp430-elf-ld; the MCU has no upper memory capability

$
0
0

Part Number: MSP430G2001

I managed to install msp430 gcc version 8.2.0 on Linux by compiling in accordance with §5.2 of SLAU646E, followed by a "chmod -R 0:0 install" and a "cp -a install/* /". I upgraded the support files to version 1.207 with the command as root: "install -m755 -d /usr/local/msp430-elf/sys-include" followed by "install -m644 include/* /usr/local/msp430-elf/sys-include".

When trying to make a simple project, everything compiles fine, and a view with the "msp430-elf-size" command shows no components in the ".data" segment.

When trying to use msp430-elf-ld to link everything together using my canned Makefile, I get the following output:

msp430-elf-gcc -mmcu=msp430g2001 -msmall -mrelax -L/usr/local/msp430-elf/sys-include \
 -Wl,-Map,g2_01blink.map -o g2_01blink.elf g2_01blink.o bcm+.o io.o wdt+.o
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: error: g2_01blink.elf uses the upper region for data, but g2_01blink.o assumes data is in lower memory.
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: failed to merge target specific data of file g2_01blink.o
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: error: g2_01blink.elf uses the upper region for data, but bcm+.o assumes data is in lower memory.
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: failed to merge target specific data of file bcm+.o
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: error: g2_01blink.elf uses the upper region for data, but io.o assumes data is in lower memory.
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: failed to merge target specific data of file io.o
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: error: g2_01blink.elf uses the upper region for data, but wdt+.o assumes data is in lower memory.
/usr/local/lib/gcc/msp430-elf/8.2.0/../../../../msp430-elf/bin/ld: failed to merge target specific data of file wdt+.o
collect2: error: ld returned 1 exit status
make: *** [makeg2001.mk:19: g2_01blink.elf] Error 1

I have the resulting load map.

I may have to revert back to version 7 if I still have problems.


MSP430FR2512: Proximity state not properly registering

$
0
0

Part Number: MSP430FR2512

I have a couple of questions related to the settings of the proximity threshold. I have a proximity sensor with the following parameters:

tSensor PRX00 =
{
    // Basic Properties
    .TypeOfSensor = eProx,
    .SensingMethod = eSelf,
    .DirectionOfInterest = eDOIDown,
    .pvCallback = NULL,
    .ui8NrOfCycles = 1,
    .pCycle = PRX00_Cycles,
    .pSensorParams = (tGenericSensorParams*)&PRX00_Params,
    // Conversion Control Parameters
    .ui16ConversionCount = 800,
    .ui16ConversionGain = 100,
    .ui8FreqDiv = 4,
    .ui8ChargeLength = 0,
    .ui8TransferLength = 0,
    .bModEnable = true,
    .ui8BiasControl = 3,
    .bCsDischarge = true,
    .bLpmControl = false,
    .ui8InputSyncControl = 0,
    .bTimerSyncControl = false,
    .bIdleState = true,
    // Tuning  Parameters
    .ui16ProxThreshold = 20,
    .ui16NegativeTouchThreshold = 20,
    .ui16ErrorThreshold = 900,
    .ui16TimeoutThreshold = 65535,
    .ProxDbThreshold.DbIn = 0,
    .ProxDbThreshold.DbOut = 3,
    .TouchDbThreshold.DbIn = 0,
    .TouchDbThreshold.DbOut = 3,
    .bCountFilterEnable = true,
    .ui8CntBeta = 1,
    .bSensorHalt = false,
    .bPTSensorHalt = true,
    .bPTElementHalt = true,
    .ui8LTABeta = 7,
    .bReCalibrateEnable = true,
};

The sensor has one element, with a touch threshold of 7.

Sometimes when I touch the sensor, the value of the delta is greater than the proximity threshold (which I understand from the docs is an absolute value), and even greater than the touch threshold, however the sensor does not register as being in a proximity state, and the LTA adjusts downwards.

I have attached the graph below to demonstrate.  The LTA, Count and Proximity state were sampled at 50ms, the active scan mode measurement period is 25ms. The touch and proximity thresholds are shown on the graph as I understand them (i.e. 20 less than the LTA for the prox and 7/128 * LTA less than the LTA for touch).

As far as I can see from the graph, the sensor goes out of proximity state even though the delta is sufficiently high. Even if the sensor value changed signifcantly in the measurement between samples (which seems unlikely given the neighbouring measurements), I would expect the debounce parameters to handle this.

My questions are:

1) Have I correctly understood how the proximity and touch thresholds work?
2) If so, why does the sensor not register as in proxmity and why the LTA continue to adjust downwards?

I have wake-on-proximity enabled if this is relevant

Thanks!

MSP430F5328: Thermal Pad connection to GND?

$
0
0

Part Number: MSP430F5328

Dear MSP430-BU,

can you please clarify if the Thermal Pad of the MSP430F5328IRGC is recommended to be connected to GND?

There is nothing mentioned in the datasheet (SLAS678E).

For similar devices like the F5528 it is mentioned in the terminal function table (table 3) that the QFN Pad should be connected to Vss (GND).

Can you please clarify how this is supposed to be handled for the F5328?

Thanks,
BR,
Matthias

CCS/MSP430I2040: MSP430I2040

$
0
0

Part Number: MSP430I2040

Tool/software: Code Composer Studio

Hello ,

I have generated code using EMDC for EVM MSP430i2040 and from CCS burned the code in EVM, but when connected to GUI (using DB-9 connector) not showing any measuring parameters?

Tried with sample code which is readily available in EMDC " EVM430-i2040S_SH_1V_1C_50Hz " . But not showing any data on GUI.

Please help me out.

Thanks,

Anuradha.

MSP430FR6047: Ultrasonic Sensing Solution

$
0
0

Part Number: MSP430FR6047

Hi E2E,


Good day.


Is the subsystem of the TDC1000 are also incorporated in the MSP430FR6047 for the ultrasonic sensing solution? In terms of performance and functionality of the USS module, what is the difference between MSP430FR6047 and TDC1000?

Regards,
Carlo

MSP432P401R: SVSMH Threshold Voltage settings for non-3.3V Vcc system

$
0
0

Part Number: MSP432P401R

Hi all,

I'm implementing a brownout detection on my project using the SVSMH module on the MSP432P401r. Everything is really straight forward and I've gotten excellent results in a short amount of time. I've tried a few different voltage levels for the SVSMH threshold level setting (as described on pg. 55 of the datasheet, "Table 5-22. PSS, SVSMH") and I can see the processor going into Reset when I step the VCC voltage down below the thresholds and comes back when I step back above that threshold.

My question is this: My company has several MSP432P401r-based projects where some run on 3.3V and others at 2.85V. Are the Threshold levels spelled out in the datasheet permanent values that will work even if a project has a 2.85V maximum VCC? For example, if I were to set the SVSMHTH = 7 on the project that only had a 2.85V VCC, it would always be held in Reset?

Thanks,

Viewing all 22233 articles
Browse latest View live


Latest Images

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