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

MSP430G2231: Device does not run unless connected to debugger (SBW)

$
0
0

Part Number: MSP430G2231

Yes, the RST pin is pulled up with a 47K resistor. 

Code for the device:#

#include <msp430.h>
#pragma PERSISTENT(chan_count)
#pragma PERSISTENT(sleeper)
unsigned int chan_count = 0;
unsigned int sleeper = 0;
// its all in the ISR
/**
* main.c PULSE OUTPUT DRIVE
*/
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watch-dog timer
DCOCTL = 0; // Select lowest DCOx and MODx
BCSCTL1 = 0x8f;
// BCSCTL1 = CALBC1_1MHZ; // Set range
// DCOCTL = CALDCO_1MHZ; // Set DCO step + modulation
// IFG1 &= ~OFIFG;
__delay_cycles(50);
P1DIR |= 0xFF;
P2DIR |= 0;
P2DIR |= BIT7;
P1OUT = 0;
P2IES = 0;
P2SEL = 0;
P2IE |= BIT6;
__bis_SR_register(GIE);
while(1)
{
if(sleeper==1)
{
__bis_SR_register(LPM0_bits | GIE); // Enter LPM3 w/interrupt
}
__no_operation(); // For debug
}
}
// change pulse width
// if
#pragma vector=PORT2_VECTOR
__interrupt void P2_ISR(void)
{
__bic_SR_register_on_exit(LPM0_bits); // Clear LPM3 bits from 0(SR)
//P2OUT = BIT7; // fire pulse to ack
//__delay_cycles(10);
//P2OUT &= ~BIT7;
P2IFG = 0; // clear vector
__delay_cycles(85);
switch(chan_count)
{
case 0:
P1OUT |= BIT3;
__delay_cycles(120);
P1OUT &= ~BIT3;
chan_count++;
break;
case 1:
P1OUT |= BIT2;
__delay_cycles(120);
P1OUT &= ~BIT2;
chan_count++;
break;
case 2:
P1OUT |= BIT1;
__delay_cycles(120);
P1OUT &= ~BIT1;
chan_count++;
break;
case 3:
P1OUT |= BIT0;
__delay_cycles(120);
P1OUT &= ~BIT0;
chan_count = 0;
sleeper = 1;
break;
default:
break;
}

}

Not another device change for a client, please.

I don't see why this should be a problem. The low power mode must be used or the battery dies, this is for a gas flow system.

Oh, for the 'we care or don't' department. Yet another large(huge) company I am consulting with, trying to make an upgrade to about 2.6 million gas flow meters.


MSP-EXP432P4111: oad_firmware_update_MSP432P4111

$
0
0

Part Number: MSP-EXP432P4111

Hi,

we ran 'oad_firmware_update_MSP432P401R' on the required hardware and managed to see that 'subsequent' updates work! So thats ok. The we did the same with 'oad_firmware_update_MSP432P4111' on the required hardware and notice that the first update indeed works. However a second update doesn't.
We also notice that we need to realy close the 'SimpleLink SDK Explorer' App on the smartphone to work properly.

Is this correct? We find no answers on this forum but, its hard to believe we are the only one that notice this behaviour on different hardware(PC, Laptop, smartphones)?

It's a nice feature we definitely  want to use. Therefor also the question if there is a guide explaining this update software, beyond whats in the documentation?

kind regards,

Laurent

2M Engineering

MSP430FR5969: wake-up time variation

$
0
0

Part Number: MSP430FR5969

Hi,

I have a question from my customer who is considering to use MSP430FR5969.

In datasheet, wake-up time is defined as typ and max.
What causes such differences? Clock frequency?
If so, using faster clock results in shorter wake-up time, etc.?


Thanks and regards,
Koichiro Tashiro

CCS/MSP430F5529: Extra code after main() function

$
0
0

Part Number: MSP430F5529

Tool/software: Code Composer Studio

Hi,

I am referring to TI's demo code (MSP430F55xx_uscia0_spi_09.c) for SPI 3-wire configuration on MSP430, as follows:

#include <msp430.h>

unsigned char MST_Data,SLV_Data;
unsigned char temp;

int main(void)
{
.... // setting up of 3-pin, 8-bit SPI master and other settings done

  __bis_SR_register(LPM0_bits + GIE);    // CPU off, enable interrupts
}

#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

{
  volatile unsigned int i;

  switch(__even_in_range(UCA0IV,4))
  {
    case 0: break;                 // Vector 0 - no interrupt
    case 2:                        // Vector 2 - RXIFG
      ....  // some tasks done

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

From basic programming knowledge, I know that the main() is from where the execution starts.

However, here, we do have a section (coming after "endif") in the code after main(). Can you please explain in what order this portion gets executed with respect to main()?

CCS/MSP430FR5949: PMP40441

$
0
0

Part Number: MSP430FR5949

Tool/software: Code Composer Studio

hi,

we need support in PMP40441 software (we purchased it from TI direct through our US client),

  1. the PMP40441 software.zip
    1. PMP40441 software.zip is extracted
    2. it has 4 project file  within the the folder in different place (see the image 1)
    3. we are working in MSP430fr5949, why you have supplied four project files? 
    4. even these project files are having more errors while compiling,
    5. in the four project file which is the right file we can use for our application(we are usingmsp430fr5949)
  2. there are two main file, so which main file i have to use
    1. one main file is under PMP40441
    2. another main file is under TUSB422_MSP432P401R
  3. so please guide me to open the right project file for our msp430fr5949 based project; else give me a new correct error free file to operate.

MSP430F5524: Unable to pause the code using the programmer

$
0
0

Part Number: MSP430F5524

The code running on my MSP430F5524 isn't responding to external inputs(such as a keypad) atter running for a short while. On certain occasions the code is able to enter the ISR(Timer, UART).

 On  putting the programmer, I am unable to pause the code. I am getting the message "Break at address "0xd00c4" with no debug information available, or outside of program code". 

Any idea why this is happening and how can I resolve this? Could the code be getting into a "bad state" because of not handling an interrupt/doing an illegal operation like dividing by 0? However, in case of not handling an interrupt the code should enter the "default" ISR provided by TI and enter into a LPM Mode( I have forgotten the exact name of this). 

The same code is working fine on other PCBs with the same schematic. Could this be a hardware issue in terms of design/layout?

We are in a critical stage of our project. Any help would be appreciated.

Thanks and Regards

Abhishek

MSP430F169: ADC was not working

$
0
0

Part Number: MSP430F169

Hi,

I wrote a c code for accessing the internal ADC of MSP430F169.

Here is my code.

void main(void)
{

unsigned int adc_count;

WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer

DCOCTL = DCO0 + DCO1 + DCO2;

BCSCTL1 = XT2OFF + DIVA_3 + RSEL0 + RSEL1 + RSEL2;

BCSCTL2 = SELM_0 + DIVM_1 + DIVS_1;

P2DIR |= 0x01; // configure P1.0 as output

P6SEL |= 0x01;

ADC12CTL0 = ADC12ON + REF2_5V + REFON;

ADC12CTL1 = ADC12SSEL_0 + ADC12DIV_3;

ADC12MCTL0 = 0x90;

ADC12CTL0 |= ENC;

while(1)

{

ADC12CTL0 |= ADC12SC;

while(!(ADC12IFG & 0x0001));

ADC12MEM0;

P2OUT ^= 0x01;

}

}

But I didin't getting the ADC A0 interrupt flag so the execution was stopping at while loop.

Is my configuration correct ?

Thanks

Regards

CCS/MSP-EXP432E401Y: MSP-EXP432E401Y UART issues

$
0
0

Part Number: MSP-EXP432E401Y

Tool/software: Code Composer Studio

Hi,

We are porting the TI-15.4 stack sensor.c example to our MSP-EXP432E401Y platform removing all 15.4 stack-related calls and using instead the Ethernet stack. We are using a mmWave sensor from TI so we have defined two UARTs for configuration purposes and for actual sensor data (MSS_LOGGER). A main task will handle events triggered by a mmwaveTask as explained in the demo code provided by TI. We are the stage of integrating the mmWave sensor and MSP-EXP432E401Y and we are having issues with the UART mapping between boards. This is a snippet of the code:

void mmwaveTaskInit(void)
{
    /* Construct Semaphore */
    Semaphore_Params semParams;
    Semaphore_Params_init(&semParams);
    Semaphore_construct(&mmwaveSemStruct, 0, &semParams);
    mmwaveSemHandle = Semaphore_handle(&mmwaveSemStruct);

    /* Configure display task. */
    Task_Params taskParams;
    Task_Params_init(&taskParams);
    taskParams.stack = mmwaveTaskStack;
    taskParams.stackSize = MMWAVE_TASK_STACK_SIZE;
    taskParams.priority = MMWAVE_TASK_PRIORITY;
    Task_construct(&mmwaveTask, mmwaveTaskFxn, &taskParams, NULL);


    /* Open mmwave configuration UART port */
    UART_Params_init(&mmwaveUartParams);
    mmwaveUartParams.writeDataMode = UART_DATA_BINARY;
    mmwaveUartParams.readDataMode = UART_DATA_BINARY;
    mmwaveUartParams.readReturnMode = UART_RETURN_FULL;
    mmwaveUartParams.readEcho = UART_ECHO_OFF;
    mmwaveUartParams.baudRate = 115200;  //Configuration baud rate
    mmwaveUartParams.readTimeout = 500000 / Clock_tickPeriod;

    mmwaveUartHandle = UART_open(Board_UART0, &mmwaveUartParams);

    if (mmwaveUartHandle == NULL) {
        /* UART_open() failed */
        while (1);
    }

    /* Open mmwave logger UART port */
    UART_Params_init(&mmwaveLoggerUartParams);
    mmwaveLoggerUartParams.writeDataMode = UART_DATA_BINARY;
    mmwaveLoggerUartParams.readDataMode = UART_DATA_BINARY;
    mmwaveLoggerUartParams.readReturnMode = UART_RETURN_FULL;
    mmwaveLoggerUartParams.readEcho = UART_ECHO_OFF;
    mmwaveLoggerUartParams.baudRate = 921600;
    mmwaveLoggerUartParams.readTimeout = 500000 / Clock_tickPeriod;

    mmwaveLoggerUartHandle = UART_open(Board_UART2, &mmwaveLoggerUartParams);

    if (mmwaveLoggerUartHandle == NULL) {
        /* UART_open() failed */
        while (1);
    }
}

However, we end up in having a wrong mmwaveLoggerUartHandle. As far as I know, hypothesis are either 1) UART was already initialized or 2) An error happened during initialization. UART_init() is called in the main task. 

int main()
{
    /* Call driver init functions */
    Board_init();
    GPIO_init();
    UART_init();

So we assume the error happened because of being previously initialized. As a sidenote, all UART interfaces have been defined in Board.h, MSP_EXP432E401Y.c and its header file accordingly.

/* UART configuration structure */
const UARTMSP432E4_HWAttrs uartMSP432E4HWAttrs[MSP_EXP432E401Y_UARTCOUNT] = {
    {
        .baseAddr = UART0_BASE,
        .intNum = INT_UART0,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART0],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART0]),
        .rxPin = UARTMSP432E4_PA0_U0RX,
        .txPin = UARTMSP432E4_PA1_U0TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART1_BASE,
        .intNum = INT_UART1,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART1],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART1]),
        .rxPin = UARTMSP432E4_PB0_U1RX,
        .txPin = UARTMSP432E4_PB1_U1TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART2_BASE,
        .intNum = INT_UART2,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART2],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART2]),
//        .rxPin = UARTMSP432E4_PD4_U2RX,
        .rxPin = UARTMSP432E4_PD4_U2RX,
        .txPin = UARTMSP432E4_PD5_U2TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART3_BASE,
        .intNum = INT_UART3,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART3],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART3]),
        .rxPin = UARTMSP432E4_PA4_U3RX,
        .txPin = UARTMSP432E4_PA5_U3TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART4_BASE,
        .intNum = INT_UART4,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART4],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART4]),
        .rxPin = UARTMSP432E4_PA2_U4RX,
        .txPin = UARTMSP432E4_PA3_U4TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART5_BASE,
        .intNum = INT_UART5,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART5],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART5]),
        .rxPin = UARTMSP432E4_PC6_U5RX,
        .txPin = UARTMSP432E4_PC7_U5TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART6_BASE,
        .intNum = INT_UART6,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART6],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART6]),
        .rxPin = UARTMSP432E4_PP0_U6RX,
        .txPin = UARTMSP432E4_PP1_U6TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    },
    {
        .baseAddr = UART7_BASE,
        .intNum = INT_UART7,
        .intPriority = (~0),
        .flowControl = UARTMSP432E4_FLOWCTRL_NONE,
        .ringBufPtr  = uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART7],
        .ringBufSize = sizeof(uartMSP432E4RingBuffer[MSP_EXP432E401Y_UART7]),
        .rxPin = UARTMSP432E4_PC4_U7RX,
        .txPin = UARTMSP432E4_PC5_U7TX,
        .ctsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .rtsPin = UARTMSP432E4_PIN_UNASSIGNED,
        .errorFxn = NULL
    }
};

At this stage, we want to use the backchannel UART (UART0) for either configuration of the mmWave sensor or data logger, just for debugging and understanding the whole architecture. Thus we have to define them properly UART_open().

My questions are:

  • Why do we get a wrong UARTHandle mmwaveLoggerUartHandle when setting up the second UART -for the MSS logger- only?
  • If we are planning to use the 40-pin BoosterPack header 1, we will map the config UART from the mmWave sensor to U7Rx and U7Tx of the MSP-EXP432E401Y, while the MSS_LOGGER (once a 0-Ohm resistor is removed) will be mapped to pin PL4. Is that correct? Is it enough to do the following changes?
mmwaveUartHandle = UART_open(Board_UART7, &mmwaveUartParams);

and define in gpioPinConfigs:

    GPIOMSP432E4_PL4 | GPIO_CFG_IN_PD,

and map it also to any .rxPin of any UART to that pin?

Thanks for your help in advance.

Regards,

Mario

CCS/TIDM-BPM: Site support forum

$
0
0

Part Number: TIDM-BPM

Tool/software: Code Composer Studio

Hello,

I have contacted one of your colleagues by email and he suggested me to contact TI's MCU team by posting on E2E, so TI engineers will be more helpful and will give more details about our request.
So basically we are a university called HEPIA based in Geneva (Switzerland) and we are interested in the TIDM-BPM device; We have two questions :

1) First one concerns the debug connection between the MSP430F6638 MCU integrated in the TIDM-BPM device. Is there any connection scheme showing which pins of the MCU should be connected to the 14-conductor cable which comes with the MSP-FET debugger ? I have taken a look on the MSP430 Hardware Tools PDF but we found a lot of informations and we still don't know which MSP430F6638's pin we have to connect to the debug connector of the MSP-FET debugger. Therefore, we really need some help about this point especially since the debug connection are often a source of error.

2) Second question concerns the source code provided for the TIDM-BPM device. We have downloaded the CCS IDE as well as the source code zip file, and we noticed that the most important library which is the "msp430f6638.h" is not provided. Could you please provide this header file ? It will be a big help for us for the program comprehension. Same thing for the SPI header file and ADC header file, because we think that all the libraries are not provided and this is a real issue for us for the program comprehension and if we want to modify the program or write a new one, it will be really difficult for us without all these libraries (header files). 

Thank you very much.

Mike Jaber

HEPIA Geneva, Switzerland.

CCS/MSP430F5529: UART configuration in FreeRTOS

$
0
0

Part Number: MSP430F5529

Tool/software: Code Composer Studio

Hello. I am working with NEO 6M, GPS6MV1 and msp430f5529. I am using FreeRTOS and I have problem with UART. 

Without RTOS works fine. Code is below.

P3SEL |= BIT3+BIT4;            // P3.3,4 = USCI_A0 TXD/RXD
UCA0CTL1 |= UCSWRST;           // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_2;              // SMCLK
UCA0BR0 = 104;                        //  9600 baud rate
UCA0BR1 = 0;                          // UCOS16 = 0
UCA0MCTL |= UCBRS_1; 
UCA0CTL1 &= ~UCSWRST; 
UCA0IE |= UCRXIE;

What I am missing with RTOS?

Thanks, 

Ana

CCS/MSP430F5529: Build failure

$
0
0

Part Number: MSP430F5529

Tool/software: Code Composer Studio

Did an install with no problems indicated. Getting the following error from linker

undefined first referenced
symbol in file
--------- ----------------
ADC12CTL0 ./RS V9.obj
ADC12CTL1 ./RS V9.obj
ADC12IE ./RS V9.obj
ADC12IFG ./RS V9.obj
ADC12IV ./RS V9.obj
ADC12MCTL0 ./RS V9.obj
ADC12MEM0 ./RS V9.obj

error #10234-D: unresolved symbols remain

MSP432E401Y: MSP432E401Y MCU Launchpad has experienced repeated failures

$
0
0

Part Number: MSP432E401Y

We have experienced repeated failures of this launchpad while using it essentially for SPI communication and control of a few GPIO's. The common use case before failure is:

i) Launchpad is flashed and operates correctly.;Sometimes for days or sometimes for weeks/months.

ii)Launchpad is being exercised and then a break from use is taken... like the day is over or as short as a lunch break.

iii)On return to the launchpad, it will no longer communicate with the PC. 50% of the time the 432 IC (U1) is very hot.

iv)The launchpad has never failed during live operation. It is always that it has been working fine and then after a break and a return to the device use, it no longer works. It has never suddenly stopped working in the middle of a use session.

We are using the launchpad to communicate with power supply controllers with SPI ports. We believe we have good grounding and are not stressing any pins. Recently we have had several EVM's arrive and they will not flash. After flashing we have been running the launchpad with jumper JP1 populated with 5V-OTG, 5V-XDS jumpers and 5V-EXT not populated to allow use to use the launchpad without the USB cable connections (using U7 only)   Any assistance someone could provide would be appreciated.

Compiler/MSP430FR2633: Compilation Error: error #18: expected a ")"

$
0
0

Part Number: MSP430FR2633

Tool/software: TI C/C++ Compiler

Hi,

I'm trying to get my MSP430 code compiled inside of a docker image.  I've made good progress...I'm pulling down the MSP430 compiler and library and then attempting to build my code using the MSP430 compiler.

I get most of the way through my code, but I'm getting an error on the following lines:

`__bic_SR_register(GIE);`

`__bis_SR_register(GIE);`

I'm getting the same error about 4 times throughout the code.  The error just says, `error #18: expected a ")"` and that's it.  I'm not sure if the problem is related to the __bic_SR_register() or the GIE.  Both of those appear on all the lines in question.

I've done some digging around in the compiler source code and I verified the intrinsics.h file exists in there, although I did not rebuild the compiler at all (I'm using the cl430 compiler).  

Any help would be appreciated!

MSP432P401R: MAP_GPIO_setOutputLowOnPin Doesn't Always Work

$
0
0

Part Number: MSP432P401R

On my board I have a debug LED which I flip on when I start a data transfer and in the ISR, when I complete the transfer, I shut it off. Its a nice little "blip" when the board is transmitting data. Except it doesn't always shut off! 

I'm using the drivelib, specifically MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P7, GPIO_PIN5) to turn off the LED. And MAP_GPIO_setOutputHighOnPin(GPIO_PORT_P7, GPIO_PIN5) to turn it on. (Specifically to avoid issues like this.) 

After lots of testing, I suspected that another interrupt might happen during the ISR when I try to shut off the LED, so I turn off the LED twice in a row. (First one gets hit by the interrupt, no problem the second will take care of it.) And I solved the problem! But I thought the routines would protect me from this type of issue. (The MSP430 can atomically set IO but I don't think the MSP432 can? The MSP432 nests interrupts, the MSP430 doesn't?)

Please help me understand!

I did cut my code to the bare minimum and moved it to a launchpad but the problem goes away. That's when I started suspecting an interrupt since the bare version has no other ISR activity. My real board has several additional sources of interrupt. 

I'm using TI v18.12.1.LTS for compiler. SimpleLink 3.10.0.08 for library. CCS9.1. 

CCS/MSP430F247: Would like to know the external clock configuration

$
0
0

Part Number: MSP430F247

Tool/software: Code Composer Studio

I am using an MSP430F247 would like to know the external clock configuration. If you can share code/configuration details whichever is convenient.

I think "P5.4/MCLK" can be used for system clock input.

But I didn't see the corresponding configuration for 

DCO control register             DCOCTL
Basic clock system control 1 BCSCTL1
Basic clock system control 2 BCSCTL2
Basic clock system control 3 BCSCTL3

Or is my understanding wrong?


CCS/MSP432P401R: SPI for BMI160

$
0
0

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hello TI community

I am going to use BMI160 IMU (from Bosch sesnortec) as motion sensor in my application. The interface protocol I want to BMI160/MSP432P401R connect to each other is SPI. Below is the snippet of the code I have written for SPI (eUSCI_B1). 

/************BMI160 SPI*********/
UCB1CTLW0 |= UCSWRST; // **Initialize USCI state machine**
P6SEL0 |= BIT4 + BIT5 +BIT3;
P6SEL1 &= ~(BIT3 + BIT4 + BIT5 ); // | P6.3: UCB1SCLK| P6.4: UCB1SIMO | P6.5: UCB1SOMI (Refer to the datasheet, page: 159).
UCB1CTLW0 |= UCCKPH + UCMST + UCMSB + UCSYNC + UCSSEL_2; // 3-pin, 8-bit, SPI master
UCB1CTL0 |= UCCKPH + UCMST + UCMSB + UCSYNC + UCSSEL_2; // 3-pin, 8-bit, SPI master
/******************************/
P6OUT |= BIT5; /* Pullup on UCB1SOMI */
P6REN |= BIT5; /*Pullup/pulldown resistors*/
/******************************/
P6DIR |= BIT2;
P6OUT |= BIT2; /*CSn on P6.2*/
/*****************************/
/* In case not automatically set */
P6DIR |= BIT3 + BIT4;
P6DIR &= ~BIT5;
UCB1CTLW0 &= ~UCSWRST; // **Initialize USCI state machine**

Are they correct?

Also I found the BMI160 drivers on github. For SPI read function, I have written the code as below:

int8_t user_spi_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
{

int8_t rslt = 0; /* Return 0 for Success, non-zero for failure */

P6OUT &= ~BIT2;/* Pull CS_N low*/

/* send register address byte */

while(!(UCTXIFG & UCB1IFG));  //UCB1 TX buffer ready?

UCB1TXBUF= reg_adr;


/* Storing chip status */
while(!(UCRXIFG & UCB1IFG));//UCB1 RX buffer ready?

rslt= UCB1RXBUF;

/* Communicate len number of bytes: if RX - the procedure sends 0x00 to push bytes from slave*/
for (i = 0; i < len; i++)
{
UCB1TXBUF=0; /* Possible to combining read and write as one access type */

while(!(UCRXIFG & UCB1IFG));//UCB1 RX buffer ready?

*reg_data= UCB1RXBUF;

 /* Store pData from last pData RX */
reg_data++;
}
//}
/* Pull CS_N low*/
P6OUT |= BIT2;;
/* return the status byte value */
return(rslt);
}

It just works for a few times. Does anyone have any idea where the problem is?

Thanks

Saber

Compiler/MSP430FR5969: increasing stack space

$
0
0

Part Number: MSP430FR5969

Tool/software: TI C/C++ Compiler

My application's stack is overflowing and stepping on data in the lower parts of RAM. I thought about trying to move everything except the stack out of SRAM and into FRAM but even in that case, I would only have 2k of stack space which I'm concerned might be insufficient. I therefore believe that moving the stack is the better choice. To do that I've been considering:

Moving stack into HIFRAM
This would be the ideal choice because all I would have to do is point the stack section at the top of HIFRAM and I would have plenty of room. Unfortunately, according to the related post from 2016, it seems that the stack pointer register is only 16bits. Is this still the case or has the register size been increased? If $sp is still 16 bits, is there a work around for this problem?

Moving part of ROM into HIFRAM
This option would be more difficult, but I could potentially allocate a portion of the ROM that is currently in lower memory into HIFRAM. Then I could move the stack into the available space. Does this seem like a realistic option?

CCS/MSP432P401R: BMI160 with SPI

$
0
0

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hello

Does anyone have the resource for programming BMI160 with MSP432P401R with SPI to share with me?

I appreciate it.

Thanks

Saber 

MSP432E411Y: Selecting controller for new development

$
0
0

Part Number: MSP432E411Y

We are electronic instrument manufacturing company
We are currently using Texas LM3s6965 controller in our Product.
We are going to use MSP432E411Y for our need design as we require onchip ethernet

Kindly let us know if this controller is suitable for our new design

also let us know life cycle of the controlller

Regards,
Anushka

MSP430FR5994: Uniflash tool is displaying Microcontroller name by Generate Package method

$
0
0

Part Number: MSP430FR5994

Hi,

I am using Uniflash tool to generate one_time_setup.bat and dslite.bat file for programming my device with out installing any softwares.

My problem is if i execute these files in command line interface my controller identity is been displayed in the debug logs. I don't want to display these file names how can i do these? 

Can any one say how to execute these files with out displaying debug logs.

Thanks and regards

Haricharan 

Viewing all 22090 articles
Browse latest View live


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