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

MSP430G2553: msp430g2553

$
0
0

Part Number:MSP430G2553

Hi

I'm using MSP430G2553, CCS v7.0 and i moved recently from GUI Composer V1 to  GUI Composer V2.

Since i have encountered with some difficulties which couldn't be solved (it was discussed in another thread and i was told there to move to the v2 version) i'm now trying to run a simple example in order to improve my skills in this new version.

This is the code i wrote. 

#include <msp430g2553.h> // System define for the micro that I am using
#define LED BIT0

int off_f=0;

void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // off_f Watch dog timer

BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1 MHz
DCOCTL = CALDCO_1MHZ;

P1DIR |= LED; // Enables pullup resistor on button
P1OUT &=~ LED;

while(1) // While 1 is equal to 1 (forever)
{
  if(off_f==1)
   {
    P1OUT |= LED;
    }
  else
    {
    P1OUT &=~ LED;
    }
}

}

I want to bind to off_f variable to a button in order to control the led light.

I'm following the instructions in this link: https://dev.ti.com/gc/designer/help/Tutorials/xds/index.html but

i get stuck at this stage

 Thanks in advance :)


RTOS/MSP430FG6626: Cannot generate TI RTOS driverlib for part MSP430FG6626 but can for MSP430F5529

$
0
0

Part Number:MSP430FG6626

Tool/software:TI-RTOS

I am having problems to create the TI-RTOS drivers for the unusually named part MSP430FG6626 although this is possible. Here are the steps I have done:

STEP 1: download the Windows CCS 7.2.0.00013     from http://processors.wiki.ti.com/index.php/Download_CCS

STEP 2: run webinstaller, select MSP430, Blackhawk emulators, C2000

STEP 3: Run CCS when done using default workspace and do: Help->Check for Updates (no updates found)

STEP 4: Close CCS then Increased the JAVA heap in C:\ti\ccsv7\eclipse\ccstudio.ini as recommended for RTOS (in TIRTOS workshop installation guide)

                                    from –Xms40m to –Xms256m

                                    from –Xmx512m to –Xmx1024m

STEP 5: Launch CCS then Install TI-RTOS 2.20.00.06 (Latest as of June 15 2017) for MSP430 from App Center in CCS

STEP 6: Accept to install dependency XDCTOOLS 3.32.00.06 (NOTE UIA was not installed manually or as a dependency but according to http://processors.wiki.ti.com/index.php/Category:UIA this is installed as a subcomponent of TIRTOS which I assumed was done automatically).

 

I note that from the TI RTOS workshop installation guide: “Keep in mind that tools are MATCHED together. You can’t use an old BIOS release with a new UIA or new XDC, etc. This is actually one of the most common errors new users make.”

 

STEP 7: Now Following the advice in http://processors.wiki.ti.com/index.php/Creating_TI-RTOS_Projects_for_Other_MSP430_Devices to make TI-RTOS work for MSP430FG6626.

STEP 7.1: Edit C:\ti\tirtos_msp43x_2_20_00_06\tirtos.mak and update MSP430DEVLIST separated by commas, to add the MSP430 device MSP430FG6626 and MSP430F5527.

STEP 7.2: Launch CCS prompted to install ti-rtos 2.20.00.06 and xdctools 3.32.00.06. These were installed.

STEP 7.3: Within CCS opened to edit C:\ti\tirtos_msp43x_2_20_00_06\products\tidrivers_msp43x_2_20_00_08\packages\ti\drivers\msp43xOptions.xs and edit as follows to allow the unusual MSP430FG6626 name to be supported:

 

changed lines 39 and 75 from 'else if (part.match(/MSP430F[56][\d\w]*/g))' to 'else if (part.match(/MSP430F[56G][\d\w]*/g))'.

 

STEP 7.4: Adjust the TIRTOS.mak file to reflect the correct directories ect.

 

Was: CCS_COMPILERS_DIR        ?= $(DEFAULT_INSTALL_DIR)/ccsv6/tools/compiler

New: CCS_COMPILERS_DIR        ?= $(DEFAULT_INSTALL_DIR)/ccsv7/tools/compiler

 

Was: ti.targets.msp430.elf.MSP430X ?= $(TI_INSTALL_DIR)/ti-cgt-msp430_15.12.1.LTS

New: ti.targets.msp430.elf.MSP430X ?= $(TI_INSTALL_DIR)/ ti-cgt-msp430_16.9.3.LTS

 

Was: ti.targets.arm.elf.M4F        ?= $(TI_INSTALL_DIR)/ti-cgt-arm_15.12.1.LTS

New: ti.targets.arm.elf.M4F        ?= $(TI_INSTALL_DIR)/ ti-cgt-arm_16.9.3.LTS

 

Was: MSP430HEADERS          ?= $(DEFAULT_INSTALL_DIR)/ccsv6/ccs_base/msp430/include

New: MSP430HEADERS          ?= $(DEFAULT_INSTALL_DIR)/ccsv7/ccs_base/msp430/include

 

Was: MSP432HEADERS          ?= $(DEFAULT_INSTALL_DIR)/ccsv6/ccs_base/arm/include

New: MSP432HEADERS          ?= $(DEFAULT_INSTALL_DIR)/ccsv7/ccs_base/arm/include

 

MSP430_BUILD ?= true

MSP432_BUILD ?= true

 

STEP 7.5: Compile by launching cmd.exe with administrator privileges and changing to ti-rtos directory

    cd C:\ti\tirtos_msp43x_2_20_00_06

    C:\ti\tirtos_msp43x_2_20_00_06>..\xdctools_3_32_00_06_core\gmake -f tirtos.mak drivers

 

RESULT: Drivers build appears to succeed but MSP430FG6626.lib is not created as expected from: http://processors.wiki.ti.com/index.php/Creating_TI-RTOS_Projects_for_Other_MSP430_Devices

 

What appears to be created are *mak files to make the driverslib located at: C:\ti\tirtos_msp43x_2_20_00_06\products\tidrivers_msp43x_2_20_00_08\packages\ti\drivers\lib

 

drivers_MSP430FG6626.ae430X

drivers_MSP430FG6626.ae430X.mak

drivers_MSP430FG6626_instrumented.ae430X

drivers_MSP430FG6626_instrumented.ae430X.mak

 

STEP 8: Build driver library:

C:\ti\tirtos_msp43x_2_20_00_06>..\xdctools_3_32_00_06_core\gmake -f tirtos.mak build-ccs-msp430-driverlib

 

RESULT: This builds MSP430F5527 library fine but finishes with error for the MSP430FG6626 device as:

 

gmake[2]: *** No rule to make target ‘MSP430FG6626’, needed by ‘all’. Stop.

gmake[2]: Leaving directory ‘c:/ti/tirtos_msp430x_2_20_00_06/products/msp430_driverlib_2_70_01_01a/driverlib’

gmake[1]: *** [all] Error 2

gmake[1] Leaving directory ‘c:/ti/tirtos_msp430x_2_20_00_06/products/msp430_driverlib_2_70_01_01a

gmake: *** [build-ccs-msp430-driverlib] Error 2

 

STEP 9: Verify the driverlib was created. It was created for MSP430F5527 but not for MSP430FG6626 (??)

CCS/MSP432P401R: UCB0CTLW0 |= ~(UCTR) Disabling all Enabled Interrupts

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Need a little help understanding why my interrupts are being disabled when I change mode to receive. Prior to this step all the interrupts are enabled. After stepping through this line, they all disable. Please see hightlighted line and full code shown below.

Thanks

 

if (status & EUSCI_B_I2C_TRANSMIT_INTERRUPT0)

{

  while (TxByteCtr)

{

UCB0TXBUF = TXData;

//UCB0IFG &= ~(UCTXIFG0);

TxByteCtr--;

//MAP_Interrupt_disableSleepOnIsrExit();

}

UCB0IE |= UCRXIE0;

UCB0CTLW0 |= ~(UCTR);      This line of code is disabling all of my interrupts and not allowing the RXIFG to be set after the restart is sent.

UCB0CTLW0 |= UCTXSTT;

 

 

 

#include"driverlib.h"

/* Standard Defines */

#include<stdint.h>

#include<stdbool.h>

#include<string.h>

#include<Si7051.h>

/* Slave Address for I2C Slave */

#define SLAVE_ADDRESS IC_ADDRESS_TMP7051_ADDRESS

#define NUM_OF_REC_BYTES 2

/* Variables */

constuint8_t TXData = {0xE3};

staticuint8_t RXData[NUM_OF_REC_BYTES];

staticuint8_t RxByteCtr, TxByteCtr;

staticvolatileuint32_t xferIndex;

staticvolatile bool stopSent ;

/* I2C Master Configuration Parameter */

consteUSCI_I2C_MasterConfig i2cConfig =

{

EUSCI_B_I2C_CLOCKSOURCE_SMCLK, // SMCLK Clock Source

3000000, // SMCLK = 3MHz

EUSCI_B_I2C_SET_DATA_RATE_100KBPS, // Desired I2C Clock of 100khz

0, // No byte counter threshold

EUSCI_B_I2C_NO_AUTO_STOP // No Autostop

//EUSCI_B_I2C_SEND_STOP_AUTOMATICALLY_ON_BYTECOUNT_THRESHOLD

};

intmain(void)

{

staticvolatileuint32_t ii;

/* Disabling the Watchdog */

MAP_WDT_A_holdTimer();

/* Select Port 1 for I2C - Set Pin 6, 7 to input Primary Module Function,

* (UCB0SIMO/UCB0SDA, UCB0SOMI/UCB0SCL).

*/

MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1,

GPIO_PIN6 + GPIO_PIN7, GPIO_PRIMARY_MODULE_FUNCTION);

//stopSent = false;

memset(RXData, 0x00, NUM_OF_REC_BYTES);

/* Initializing I2C Master to SMCLK at 100khz with no autostop */

MAP_I2C_initMaster(EUSCI_B0_BASE, &i2cConfig);

/* Specify slave address */

MAP_I2C_setSlaveAddress(EUSCI_B0_BASE, SLAVE_ADDRESS);

/* Set Master in transmit mode */

MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_MODE);

/* Enable I2C Module to start operations */

MAP_I2C_enableModule(EUSCI_B0_BASE);

/* Enable and clear the interrupt flag */

MAP_I2C_clearInterruptFlag(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_INTERRUPT0);

MAP_I2C_clearInterruptFlag(EUSCI_B0_BASE, EUSCI_B_I2C_NAK_INTERRUPT);

MAP_I2C_clearInterruptFlag(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0);

//Enable master Transmit interrupt

MAP_I2C_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_NAK_INTERRUPT);

MAP_I2C_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_INTERRUPT0);

MAP_I2C_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0);

//MAP_Interrupt_enableSleepOnIsrExit();

MAP_Interrupt_enableInterrupt(INT_EUSCIB0);

while (1)

{

//for (ii = 4000; ii > 0; ii--);

RxByteCtr = 2;

TxByteCtr = 1;

while (MAP_I2C_masterIsStopSent(EUSCI_B0_BASE) == EUSCI_B_I2C_SENDING_STOP);

UCB0TXBUF = TXData;

UCB0CTLW0 |= UCTR + UCTXSTT;

MAP_PCM_gotoLPM0InterruptSafe();

}

}

/*******************************************************************************

* eUSCIB0 ISR. The repeated start and transmit/receive operations happen

* within this ISR.

*******************************************************************************/

voidEUSCIB0_IRQHandler(void)

{

uint_fast16_t status;

status = MAP_I2C_getEnabledInterruptStatus(EUSCI_B0_BASE);

if (status & EUSCI_B_I2C_STOP_INTERRUPT)

{

UCB0IFG &= ~(UCSTPIFG);

}

if (status & EUSCI_B_I2C_NAK_INTERRUPT)

{

//MAP_Interrupt_disableSleepOnIsrExit();

UCB0IFG &= ~(UCNACKIFG);

UCB1CTLW0 |= UCTR + UCTXSTT;

}

if (status & EUSCI_B_I2C_TRANSMIT_INTERRUPT0)

{

while (TxByteCtr)

{

UCB0TXBUF = TXData;

//UCB0IFG &= ~(UCTXIFG0);

TxByteCtr--;

//MAP_Interrupt_disableSleepOnIsrExit();

}

UCB0IE |= UCRXIE0;

UCB0CTLW0 |= ~(UCTR);

UCB0CTLW0 |= UCTXSTT;

}

if (status & EUSCI_B_I2C_RECEIVE_INTERRUPT0)

{

while (RxByteCtr)

{

RXData[RxByteCtr] = UCB0RXBUF;

UCB0IFG &= ~(UCRXIFG0);

RxByteCtr--;

if (RxByteCtr == 0 )

{

UCB0CTLW0 |= UCTXSTP;

MAP_Interrupt_disableSleepOnIsrExit();

}

}

}

}

MSP430FR2433: Load capacitance of FR2433

$
0
0

Part Number:MSP430FR2433

What is the FR2433's load capacitance when it is loaded with a 32K clock from a temperature compensated crystal oscillator (TCXO)? Is this information readily available in some documentation or will it require further testing?

MSP430F6779: SYS module with Fast Vcc

$
0
0

Part Number:MSP430F6779

MSP430F67xx has BOR with Device Errata SYS16.

It describes as below:

SYS16

At initial power-up, after Vcc crosses the bownout threshold and reaches

a constant level, an abrupt ramp of Vcc at a rate dV/dT > 1V/100us can cause

a brownout condition to be incorrectly detected even though Vcc does not

fall below the brownout threshold.

 

So,I have a question about ramp up speed.

Is it possible to cause a reset when the inclination of dV/dT also exceeds this price in less than 1 V of fluctuation?

(i.e:0.95V / 95 usec)

best regards,

kyt

CCS/MSP430FR5739: SPI:No MOSI data interrupt in MSP430FR5739 when Master restart

$
0
0

Part Number:MSP430FR5739

Tool/software: Code Composer Studio

Hi guys,

MSP430FR5739 connect with other module(Here I called it A-Module) through SPI.  A-Module is master, it supports SPI clock and control the CS pin, MSP430FR5739 is slaver.Recently, I meet a strange problem.

A-Module is communicate with MSP430FR5739 OK firt time, but When MSP430FR5739 hold the current power on state(Not power off, then power on again), then A-Module restart(power off, then power on again), SPI communication will be fail. Fail means that there is no interrupttion been captured. MSP430FR5739 restart will OK again, but if hold MSP430FR5739 power on state and just start A-module, SPI communication will be fail.

Below is my A-module SPI init and MSP430FR5739 SPI init. Plz help me.

A-modle:

 vl_ssidevcfg.clkFreq = SSI_SYSTEM_DIV_256; //101562HZ
 vl_ssidevcfg.gpioNumber = CUST_GPIO_SSI_SEL0;
 vl_ssidevcfg.lag = SSI_LAG_1;
 vl_ssidevcfg.lead = SSI_LEAD_1;
 vl_ssidevcfg.clkOn = SSI_SSIMCLK_ON;
 vl_ssidevcfg.mode = SSI_BYTETRANSFER;
 vl_ssidevcfg.rxWidth = 8;
 vl_ssidevcfg.txWidth = 8;
 vl_ssidevcfg.format = SSI_MSBFIRST;
 vl_ssidevcfg.cycleDelay = SSI_ONECYCLE;
 vl_ssidevcfg.clkPolarity = SSI_IDLE_LOW ;//-----------------------------SPI_CLOCKPOLARITY_INACTIVITY_LOW
 vl_ssidevcfg.wrPolarity = SSI_RISING_EDGE;//--------------------------SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
 vl_ssidevcfg.rdPolarity = SSI_FALLING_EDGE;//-------------------------SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
 vl_ssidevcfg.enPolarity = SSI_ACTIVE_LOW;//--------------------cs
 vl_ssidevcfg.wireMode = SSI_4WIRE; //------------------------------4 wire
 vl_ssidevcfg.pIsrCallbackFct = NULL;
 cust2_0spiinit(&vl_ssidevcfg);

MSP430FR5739:

/*-----------clock------------------*/

    //Set DCO Frequency to 8MHz
    CS_setDCOFreq(CS_DCORSEL_0,CS_DCOFSEL_3);

    //configure MCLK, SMCLK and ACLK to be source by DCOCLK
    CS_initClockSignal(CS_ACLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_32);

/*-----------spi init-----------------*/

void EUSCI_B0_graceInit(void)
{
    EUSCI_B_SPI_initSlaveParam param = {0};
    param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
    param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
    param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_LOW;
    param.spiMode = EUSCI_B_SPI_4PIN_UCxSTE_ACTIVE_LOW;

    EUSCI_B_SPI_initSlave(EUSCI_B0_BASE, &param);

    /* enable eUSCI SPI */
    EUSCI_B_SPI_enable(EUSCI_B0_BASE);

    EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE, EUSCI_B_SPI_RECEIVE_INTERRUPT);

    /* enable eUSCI SPI receive interrupt */
    EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE, EUSCI_B_SPI_RECEIVE_INTERRUPT);
}

/*
 *  ======== eUSCI_B0 Interrupt Service Routine ========
 */
#pragma vector=USCI_B0_VECTOR
__interrupt void USCI_B0_ISR_HOOK(void)
{
    /* USER CODE START (section: USCI_B0_ISR_HOOK) */
    switch(__even_in_range(UCB0IV,4))
    {
        //Vector 2 - RXIFG
        case 2:
            //USCI_A0 TX buffer ready?
            g_ReceiveData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
            ring_buffer_queue(&g_RingBuffer, g_ReceiveData);
            if(g_ReceiveData == TYPE_SYNC_END)
            {
                ring_buffer_size_t length = ring_buffer_num_items(&g_RingBuffer);
                Timer_B_stop(TIMER_B0_BASE);
                ring_buffer_dequeue_arr(&g_RingBuffer, (char *)g_SPI_RxBuffer, length);
                u8 crc = g_SPI_RxBuffer[length - 2];
                while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE, EUSCI_B_SPI_TRANSMIT_INTERRUPT)) ;
                {
                    //send crc data to SIMCOM
                    EUSCI_B_SPI_transmitData(EUSCI_B0_BASE, crc);
                }
                messageParser(g_SPI_RxBuffer, length);
            }
            //printf("recv %c", g_ReceiveData);
            break;

        default: break;
    }
    /* USER CODE END (section: USCI_B0_ISR_HOOK) */
}

MSP430G2553: MSP getting reset automatically

$
0
0

Part Number:MSP430G2553

Hello,

We are working on a inventory update system which has MSP430G2553 + TRF7970A for reading rfid tags and CC2650 for updating the tag details to a mobile app.

We have followed the reference design and have designed our custom board.

Board works perfect as desired but with only an issue which is, MSP gets reset automatically while reading the tags and it happens in a random.

Below is the schematic for the msp + trf circuit 

We just had a doubt that may be we are missing something related to the oscillator as many functionalities are using it.

Posting the blocks for the related code where we are initializing the frequency for each functionality.

MSP oscillator calibration:

void 
McuOscSel(void)
{
// select DCO to 8MHz

if (CALBC1_8MHZ != 0xFF)
{
// Follow recommended flow. First, clear all DCOx and MODx bits.
// Then apply new RSELx values. Finally, apply new DCOx and MODx bit
// values.
DCOCTL = 0x00;
BCSCTL1 = CALBC1_8MHZ;
DCOCTL = CALDCO_8MHZ;
}

// Disable XT1 pins
P2SEL &= ~(BIT6 + BIT7);

// Disable XT1 high frequency mode, ACLK = 12kHz/4 = 3kHz
BCSCTL1 &= ~XTS;
BCSCTL1 |= DIVA_2;

// Set XT1 to VLO
BCSCTL3 |= LFXT1S_2;

return;
}

SPI configuration:

void
SpiUsciSet(void) //Uses USCI_B0
{
UCB0CTL1 |= UCSWRST; // Enable SW reset
UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master
UCB0CTL0 &= ~UCCKPH;
UCB0CTL1 |= UCSSEL_2; // SMCLK

UCB0BR0 = 0x04;
UCB0BR1 = 0;
P1SEL |= BIT5 + BIT6 + BIT7; // P1.5,1.6,1.7 UCBOCLK,UCB0SIMO,UCB0SOMI, option select
P1SEL2 |= BIT5 + BIT6 + BIT7; // P1.5,1.6,1.7 UCBOCLK,UCB0SIMO,UCB0SOMI, option select

SLAVE_SELECT_PORT_SET; // P2.1 - Slave Select
SLAVE_SELECT_HIGH; // Slave Select - inactive ( high)

UCB0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
}

UART initialization:

void
UartSetup(void) // uses USCI_A0
{
// modified for using the ez430-RF256x on the -G2553 LaunchPad
P1SEL |= (BIT2 + BIT1); // P1.2=TXD
// this is for TX only... (short TX & RX on the board P1.1 to P1.2)
P1SEL2 |= (BIT2 + BIT1); // P1.2=TXD

UCA0CTL1 |= UCSWRST; // disable UART

UCA0CTL0 = 0x00;

UCA0CTL1 |= UCSSEL_2; // SMCLK

UCA0BR0 = 0x45; // Baud Rate = 115200
UCA0BR1 = 0x00;

UCA0MCTL = 0; // Modulation UCBRSx = 2

UCA0CTL1 &= ~UCSWRST; // Initialize USCI state machine
UC0IE |= UCA0RXIE;
}

TimerA initialization:

void 

McuCounterSet(void)
{
TACTL |= TASSEL_1 + TACLR; // ACLK = 1.5 kHz, timer stopped

TACCTL0 |= CCIE; // compare interrupt enable
}

Thank you

Regards,

Maddineni

MSP432P401R: What modules do AVCC1, AVCC2, DVCC1 and DVCC2 power seperately?

$
0
0

Part Number:MSP432P401R

Hi,

As the title shows, what modules do AVCC1, AVCC2, DVCC1 and DVCC2 power seperately? I have 2 samples of which the impedance between DVCC2 and DVSS2 is 10 ohms or so. I want to know which module or which I/Os caused this.


RTOS/MSP432P401R: MSP432P401R cannot enable performance scaling feature

$
0
0

Part Number:MSP432P401R

Tool/software:TI-RTOS

Hi,

I have a working code with TI-RTOS with SPI and UART drivers working on MSP-EXP432P401R launch pad. I'm currently trying to run this code on another board that we recently designed similar to MSP-EXP432P401R design. However the code stuck when running using CCS and the code can run only if I disable "enablePerf " (enable performance scaling feature) and then the SPI driver doesn't initialize properly at 8MHz because of SMCLK being 3MHz which is lower than the bit-rate . However the same code runs perfectly fine with MSP-EXP432P401R

Could someone tell me a possible reason or hardware/software error that might cause this problem?

Please let me know if you need more details.

Thanks,

Nalika.

TIA Leakage current 50pA or 5nA?

$
0
0

In  www.ti.com/lit/ds/symlink/msp430fr2311.pdf  p.38 it reads that for the transimpedance amplifier TIA to have 50pA leakage current (IB - Input Bias current) one must use a TSSOP16 package device with a dedicated TRI0- inverting input pin (see p. 8). The TSSOP20 package seems to have IB 5nA.

The MSP-EXP430FR2311 LaunchPad Development Kit does as far as I can see use a TSSOP20 device which has TRI0- muxed and hence gives an IB of 5nA. Moreover - the schematic for the launchpad on p. 24 in www.ti.com/lit/ug/slau664a/slau664a.pdf shows that the TIA (TRI0) is not even used on the launchpad, it is the GP op amp OA0 that is used in a transimpedance configuration. This op amp has IB 5nA.

Is it correct to say that the launchpad (www.ti.com/tool/msp-exp430fr2311) neither uses the targets TIA nor has a photo-diode current amplifier leakage current of 50pA?

Thank you.

Roy

EZ430-RF2500T: Is this an appropriate board for my needs?

$
0
0

Part Number:EZ430-RF2500T

Hello all!

I am working on a wireless telemetry project, and I am hoping I could get your input on whether the MSP430 would be the appropriate board for my project.

Currently, I have a CC3200 and an AMS position sensor that sit off by themselfs powered by a battery.  The CC3200 hosts a webserver, and when I log in and tell it to start, it will begin to take readings (over SPI) from the AMS position sensor.  It is currently collecting 20k readings per second and storing them on an SD card (well actually that part isn't working... yet!)  I am then sending the collected data to my computer via Wi-Fi where I can crunch the numbers.

What I am interested in doing is possibly sending the readings from the AMS board over to my computer in real time, that is 20k samples per second, so I don't have to store any information locally on the board because memory is an issue.

Would the MSP430 (specifically this: http://www.ti.com/tool/EZ430-RF2500?keyMatch=rf2500&tisearch=Search-EN-Products#supportandcommunity) be an appropriate solution?  If not, do you have a better suggestion for me?

Thank you in advance!

Very Respectfully,
James

MSP432P401R: Timer32 sleep routine not working with MAP_PCM_gotoLPM0InterruptSafe()

$
0
0

Part Number:MSP432P401R

Hello! I'm trying to make a sleep routine using Timer32 on a MSP-EXP432P401R Rev. 1.0 board (DriverLib - v4_00_00_11). This is the code I'm using:

void Timer32_sleep_cycles(uint32_t cycles)
{
	/* Configuring Timer32 to "uint32_t cycles" cycles of MCLK in periodic mode */
	MAP_Timer32_initModule(TIMER32_0_BASE, TIMER32_PRESCALER_1, TIMER32_32BIT, TIMER32_PERIODIC_MODE);
	MAP_Interrupt_enableInterrupt(INT_T32_INTC);
	MAP_Timer32_setCount(TIMER32_0_BASE, cycles);
	MAP_Timer32_enableInterrupt(TIMER32_0_BASE);
	MAP_Timer32_startTimer(TIMER32_0_BASE, true);

	MAP_Interrupt_enableSleepOnIsrExit();
	MAP_Interrupt_enableMaster();
	MAP_PCM_gotoLPM0InterruptSafe();
	MAP_Interrupt_enableMaster();
}

void T32_INTC_IRQHandler(void)
{
	Timer32_clearInterruptFlag(TIMER32_0_BASE);
	MAP_Interrupt_disableSleepOnIsrExit();
}

The function works if I use MAP_PCM_gotoLPM0(), but if I use the interrupt safe version, the program hangs in Default_Handler(void).

Why is this happening and, most importantly, how can it be resolved?

MSP430FR5870: How to prevent Info memory from erraneous write access

$
0
0

Part Number:MSP430FR5870

Hi champs,

customer wants to store user application dependent information into INFO memory.

He found, that MPU is not able to prevent INFO memory from write access.

Q: Any idea to lock the memory as putting customer information into FRAM,which is MPU accessible ?

CCS/MSP430F5342: Multiple bytes reception UART problem

$
0
0

Part Number:MSP430F5342

Tool/software: Code Composer Studio

Hi,

I am using the below code for UART. I am trying to send 4 bytes of data from terminal on my PC to P4.5 of MSP430F5342 . It is sent being back to terminal from P4.4 of MSP430. The below code is being used to loop back. I am receiving only 2 bytes back on the terminal(1st and last bytes only).


#include <msp430.h>
unsigned char bytescount=0;
unsigned char received_value=0;
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT

P4SEL |= BIT4+BIT5; // P4.4,5
UCA1CTL1 |= UCSWRST; // **Put state machine in reset**
UCA1CTL1 |= UCSSEL_2; // SMCLK
UCA1BR0 = 9; // 1MHz 115200 (see User's Guide)
UCA1BR1 = 0; // 1MHz 115200
UCA1MCTL |= UCBRS_1 + UCBRF_0; // Modulation UCBRSx=1, UCBRFx=0
UCA1CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA1IE |= UCRXIE; // Enable USCI_A0 RX interrupt

__bis_SR_register( GIE); // Enter LPM0, interrupts enabled
// __no_operation(); // For debugger


// P3.3,4 = USCI_A0 TXD/RXD
while(1);
}

#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
{
volatile unsigned int i;

switch(__even_in_range(UCA1IV,4))
{
case 0: break; // Vector 0 - no interrupt
case 2: // Vector 2 - RXIFG
while (!(UCA1IFG&UCTXIFG)); // USCI_A0 RX buffer ready?
// Send next value
received_value=UCA1RXBUF;
bytescount++;
UCA1TXBUF=received_value;

break;
case 4: break; // Vector 4 - TXIFG
default: break;
}
}

Eg: When I send 0x01 0x02 0x03 0x04 I am receiving only 0x01 and 0x04 back on the terminal

If I send only 0x01 and 0x02 I receive them both correctly.

The count "bytescount" present in ISR increments only twice every time I send the data  IRRESPECTIVE of the length of the data. i tried sent 2 3 4 5 bytes. Whatever may be the number of bytes sent from terminal I am receiving only 1st and last bytes back and ISR is entered only twice every time. Receive ISR is supposed to be entered for every byte received but it is not happening so. Kindly suggest corrections.

MSP432P401R: Timer32 period is configured incorrectly

$
0
0

Part Number:MSP432P401R

Hello! I'm trying to use Timer32 on a MSP-EXP432P401R Rev. 1.0 board (DriverLib - v4_00_00_11). This is the code I'm using to toggle LED1 every 1 second:

int main(void)
{
    // Enabling the FPU with stacking enabled for floating point calculations
    MAP_FPU_enableModule();
    MAP_FPU_enableLazyStacking();

    // Stop Watchdog
    MAP_WDT_A_holdTimer();
    MAP_Interrupt_disableMaster();

    // Setting the external clock frequency
    MAP_CS_setExternalClockSourceFrequency(32768, 48000000);
    MAP_PCM_setCoreVoltageLevel(PCM_VCORE1);

    // Configuring pins for crystal usage
    MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ, GPIO_PIN0 | GPIO_PIN1, GPIO_PRIMARY_MODULE_FUNCTION); // LFXT
    MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ, GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION); // HFXT

    MAP_FlashCtl_setWaitState(FLASH_BANK0, 2); // For 48 MHz
    MAP_FlashCtl_setWaitState(FLASH_BANK1, 2); // For 48 MHz

    // Starting LFXT
    MAP_CS_startLFXTWithTimeout(CS_LFXT_DRIVE0, 10);
    // Starting HFXT
    MAP_CS_startHFXT(false);

    // Initializing MCLK, HSMCLK, SMCLK and ACLK
    MAP_CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_HSMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_SMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_2); // Maximum CS_HSMCLK / 2
    MAP_CS_initClockSignal(CS_ACLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1); // Maximum 128 kHz
    MAP_CS_initClockSignal(CS_BCLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1); // Maximum 32768 kHz

    GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);

    MAP_Interrupt_enableSleepOnIsrExit();
    MAP_Interrupt_enableMaster(); // Enabling MASTER interrupts

    while(1)
    {
        Timer32_sleep_cycles(5000000);
    }
}

void Timer32_sleep_cycles(uint32_t cycles)
{
    /* Configuring Timer32 to "uint32_t cycles" cycles of MCLK in periodic mode */
    MAP_Timer32_initModule(TIMER32_0_BASE, TIMER32_PRESCALER_1, TIMER32_32BIT, TIMER32_PERIODIC_MODE);
    MAP_Interrupt_enableInterrupt(INT_T32_INTC);
    
    if (cycles <= 4294967295) MAP_Timer32_setCount(TIMER32_0_BASE, cycles);
    else MAP_Timer32_setCount(TIMER32_0_BASE, 4294967295);

    MAP_Timer32_enableInterrupt(TIMER32_0_BASE);
    MAP_Timer32_startTimer(TIMER32_0_BASE, true);

    MAP_Interrupt_enableSleepOnIsrExit();
    MAP_Interrupt_enableMaster();
    MAP_PCM_gotoLPM0(); // Go to sleep until timer reaches the number of cycles
}

void T32_INTC_IRQHandler(void)
{
    MAP_Timer32_clearInterruptFlag(TIMER32_0_BASE);
    
    GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);

    MAP_Interrupt_disableSleepOnIsrExit();
}

The problem is that the timer period is approx. 10 times greater than the value set.

E.g., for 48MHz, the MCLK period is ~20.8ns and in order to sleep for 1 second the timer would need to be set with approx. 50 milion cycles. In the code above I use 5 million cycles to get it sleeping for 1 second. If I use 50 million cycles, the period is about 10 seconds.

What is causing this problem and how can it be resolved?


Compiler/MSP430F425: IAR compiler

$
0
0

Part Number:MSP430F425

Tool/software: TI C/C++ Compiler

Hello every one, 

i'm trying to communicate my board (msp430f425) to stm32f401re but it isn't working and my code on msp430f425 become no functional when I connect the stm32 with the board . I don't know the reason . when i connect msp430f425 to the pc ,  i have communication between the board and my pc but it sends and recieves wrong data . also i have communication between the pc and stm32 with correct data. Is there any one who can help me to know the reason  . 

thanks .

MSP430F5528: EZ Fet Lite throwing a Exit: 44 Could not set device Vcc error

$
0
0

Part Number:MSP430F5528

We have implemented an EZFet Lite design and are running MSP Flasher v1.3.14 from Linux.  We are programming a G2553

When running the following command:

./MSP430Flasher -n MSP430G2553 -r [output.txt,MAIN]

We get the following output:

* -----/|-------------------------------------------------------------------- *-r

*     / |__                                                                   *

*    /_   /   MSP Flasher v1.3.14                                             *

*      | /                                                                    *

* -----|/-------------------------------------------------------------------- *

*

* Evaluating triggers...done

* Checking for available FET debuggers:

* Found USB FET @ ttyACM1 <- Selected

* Initializing interface @ ttyACM1...done

* Checking firmware compatibility:

* FET firmware is up to date.

* Reading FW version...done

* Setting VCC to 3000 mV...

# Exit: 44

# ERROR: Could not set device Vcc

* Powering down...done

* Disconnecting from device...

* ----------------------------------------------------------------------------

* ERROR on close: Could not set device Vcc

* ----------------------------------------------------------------------------

*/

Our board is at 3.3v rather than 3.0v.  We did find a note in the user guide saying the EZFet only supports 3.0v, but we are not sure of the ramifications or if we can spoof the software...

Is our problem hardware or the command string we are sending.  Ideas?

MSP430FR6989: Is GUI is possible on MSP430FR6989 Launchpad??

$
0
0

Part Number:MSP430FR6989

Hello,

I would like to know that GUI is possible on the MSP430FR6989

If yes then How do I do it? Please let me know the steps to follow to be able to do that.

Thanks a lot.

Regards,

Shardul Modi

MSP430FR2433: DC characteristics of external clock

$
0
0

Part Number:MSP430FR2433

Hi team,

I'd like to confirm if the DC characteristics of the external clock applied to XIN pin (when LFXTBYPASS = 1) is same as the characteristics of Digital Inputs.

MSP430FR5969: MSP430FR5969

$
0
0

Part Number:MSP430FR5969

Dear All;

I don't think the dimensions in the packaging information are in error. Or I'm not understanding the dimension system of TI. The datasheet mentions that they are all in 'milimeters'. But the seem to be too small. Below is MSP430FR5969's dimension information. Is the width and the height only 7.8mm? That seems to be really small. And also the pitch distance is "44 x 0.50", what does this mean?

Also, what are these dimensions 6.15 over 5.85? 

Please enlighten me.....

Best regards,

Suh, Sukho

Viewing all 22190 articles
Browse latest View live


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