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

MSP430F5508: USCI UCBUSY bit behavior

$
0
0

Part Number:MSP430F5508

Hello. Unfortunately, neither in the datasheet nor in the user guide not found the time chart regarding the reset bit USBUSY. What is meant of words "USCI is inactive" in user guide Table 37-20? Experimentally I get that for UCCKPH = 1 and UCCKPL =0, USBUSY reset immediately after the last rising edge. I.e., UNTIL last falling edge. I.e. during USCI still active. As it should be or is this bug?


MSP430G2252: Help selecting the right processor

$
0
0

Part Number:MSP430G2252

I'm looking to migrate a customer from an Atmel based application to one of our processors.

First I need help selecting the right processor. I have pre-selected the MSP430G2252, but there should be better choices available.

The requirements are:

  • Very cost sensitive application
  • Required 14-20pin package available in DIP/SOIC
  • Hardware I2C desirable (but not essential)
  • 1 timer to wake the device from sleep every so often.
  • 1 or 2K Flash memory

The requirements are fairly straightforward. A timer interrupt is used to wake up every so often. Once so, the device reads a HDC1080, processes the data and sends it to a SPI radio. SPI is bit-banged using free I/O's

Second I would like some bare metal examples on how to set the registers to configure the I2C hardware, timer, digital I/O's and, if possible, one ADC.

Any help greatly appreciated.

EVM430-FR6047: MSP430FR6047

$
0
0

Part Number:EVM430-FR6047

Hello,

I have the EVM430-FR6047 v1.0, installed the US Design Center USS-1.70.00.04 and I started the GUI and I can connect. But it stated: "HID Bridge connected -- waiting for device". If I press Start under Waveforms nothing happen.

Thanks

ARUN

Compiler/MSP430FR5739: Is there such a thing as a fault on the MSP430, for example: entering a function that was given as a pointer in C to an invalid address?

$
0
0

Part Number:MSP430FR5739

Tool/software: TI C/C++ Compiler

Hi there,

Is it possible to handle faults like this on the MSP430 5xx FRxx family of MCUs?

I ask because I entered NULL (a pointer to address 0x0000) and called it in C, it assembled into valid instructions and executed placing the chip in an infinite loop through some invalid non-zero address range. Is there such a thing as an interrupt vector for trapping such mistakes?

Of course in the real world, this would be an impossibility but it could prove helpful in development.

I checked through slau208p, slau132q and the specific device datasheet for the MSP430FR5739 and did not find any obvious mention of general fault or error handling so I assume the chip was just produced with the idea in mind that that would not be a field problem.

Thanks.

MSP430FR4133: I2C SDA first bit missing or Leading SCL

$
0
0

Part Number:MSP430FR4133

Hello,

I am developing a hall sensor EVM and for that I need to use some LED light indicators that I plan switch on and off with my GPIO expander that is controlled by the MSP430FR4133.  The GPIO expander is controlled through I2C.  It appears that I am getting a peculiar situation where the SDA drops the first bit or leads the SCL.  I first tried sending the signal to  the GPIO device (TCA9535) and then to a voltage divider (10k and 9Meg from Vcc to GND) emulating the open drain.  In each case the signals are essentially the same, so I am convinced it has something to do with the setup of the MSP430.  I modified the sample code you all  provide: msp430fr413x_euscib0_i2c_15.c, such that it would send the addresses: 0x4E, 0x47, 0x8E, or 0x87.  The leading 0 of 0x4E, 0x47 appears to be dropped as well as the leading 1 of 0x8E,0x87.  All of these measurements were done with a slower frequency (UCB0BRW = 0x82;) .  However, I also repeated at the original frequency as well and the result seemed the same.  Do you know how I can fix this problem?

Figure 1: Address: 0x4E, UCB0BRW = 0x8; 

Fig. 2 Address: 0x4E, UCB0BRW = 0x82;

Fig. 3 Address: 0x4E, UCB0BRW = 0x82;

Fig. 4 Address: 0x87, UCB0BRW = 0x82;

MSP430I2021: MSP430 package is getting wet.

$
0
0

Part Number:MSP430I2021

Hello,

MSP430 of the package is a problem that the wet has occurred.

The problem is what is next set.
MSP-TS430RHB32A

The way in which the problem occurs is as follows.
1. Open the target board box.
2. Put the target board out of the bag.
3. Pick up the MSP430i2021 device from the tape.
4. Open the target board socket.
5. Set the MSP430 device in the socket.
6. Close the socket of the target board.
7. Wait a few minutes. (Within ten minutes)
8. Open the target board socket.
9. The MSP430 device sticks to the lid of the socket.

When the MSP430 is removed from the lid, the part in contact with the socket is wetted.
The place occurred in the office, the humidity was low.

The wet condition is where the socket and MSP430 package are in contact.

This problem occurred in the past, not only this set but also other MSP-TS430RHB32A occurred.


A question
· What is this liquid?
· What happens?
· How can I prevent it from occurring?

Sticking

Expansion comparison.  left wet, right dry(A device not set in the socket.), 

regards,
da

MSP430FR2633: Confirm the way to disable the CapTIvate and to restart this IP

$
0
0

Part Number:MSP430FR2633

Hi TI Experts,

Please let me confirm the following question.

[Question]
Would you please teach me the way to disable the CapTIvate?

Best regards.
Kaka

CCS/MSP-EXP430FR6989: MSP430: Error: MSP-FET / eZ-FET legacy module update failed

$
0
0

Part Number:MSP-EXP430FR6989

Tool/software: Code Composer Studio

I am currently having 2 MSP launchpads of MSP EXP430FR6989 . I am not able to burn the code to one of them. Whenever I try to burn the code an error is popping out saying that 

"MSP430: Error initializing emulator: A firmware update is required for the MSP430 Debug Interface (MSP-FET430UIF / MSP-FET / eZ-FET). Click the "Update" button to update the firmware and launch your debug session (this may require several update steps).  DO NOT UNPLUG THE INTERFACE DURING THE UPDATE."

and when I try updating the drivers, the next error pops out saying "MSP430: Error: MSP-FET / eZ-FET legacy module update failed" what could be the error ?

The other launchpad is working perfectly.


MSP430F5438A: About firmware update

$
0
0

Part Number:MSP430F5438A

Hello.

I have a question.

Is it possible to update the firmware with UART without stopping the operation of the device?

Firmware capacity will be less than 128 KB.

Regards,

MSP430FR6989: SPI slave using DMA to store RX Data in RAM not works

$
0
0

Part Number:MSP430FR6989

hi

I want to use the DMA Ch0 to store the UCA0RXBUF into RAM directly,

each packet of my SPI has 1536 byte, before using the DMA function, I can sure my SPI slave function works well, all the 1536 byte data can store in RAM success in SPI ISR.

But when i switch my code to DMA mode, everything got wrong, 1> it never get into DMA isr, 2> I set UCA0RXIFG as DMA0's trigger source, and using the CCS debug mode I can sure UCA0RXIFG can get high when receive data, but not knowing why DMA not works. 3> no data can success store into the memory space by DMA function.

below is my test code, need your help to find out what's wrong with it, thank you.

#include "msp430.h"
#define DMA 1
#define SPI_RX_BYTE_NUM 1536

void GPIO_Init(void);
void Clock_Init(void);
void SPI_A0_Init(void);
#if(DMA)
void DMA_Init(void);
#endif
#if(!DMA)
static unsigned char RX_BUF[SPI_RX_BYTE_NUM];
static unsigned int RX_Index;
#endif

int main(void)
{
  WDTCTL = WDTPW | WDTHOLD;                 // Stop Watchdog
  GPIO_Init();
  PM5CTL0 &= ~LOCKLPM5;
  Clock_Init();
  SPI_A0_Init();
#if(DMA)
  DMA_Init();
#endif

  __no_operation();
  __bis_SR_register(/*CPUOFF +*/ GIE);
  while(1)
  {
      __no_operation();
  }
}

void GPIO_Init(void)
{
    P1SEL1 |= BIT5 | BIT4;                    // Configure slave select and clk
    P2SEL0 |= BIT0 | BIT1;                    // Configure SOMI and MISO

}
void Clock_Init(void)
{
    FRCTL0 = FRCTLPW | NWAITS_1;
    // Clock System Setup
    CSCTL0_H = CSKEY >> 8;                    // Unlock CS registers
    CSCTL1 = DCOFSEL_4 | DCORSEL;            // Set DCO to 16MHz
    CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK; // Set SMCLK = MCLK = DCO,
    CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1;     // Set all dividers
    CSCTL0_H = 0;                             // Lock CS registers
}
void SPI_A0_Init(void)
{
    // Configure USCI_A0 for SPI operation
    UCA0CTLW0 = UCSWRST;                      // **Put state machine in reset**
                                              // 4-pin, 8-bit SPI slave
    UCA0CTLW0 |= UCSYNC | UCCKPH | UCMSB | UCMODE_2 | UCSTEM;

    UCA0CTLW0 |= UCSSEL__SMCLK;
    UCA0BR0 = 0x01;                           // /1
    UCA0BR1 = 0;                              //
    UCA0MCTLW = 0;                            // No modulation
    UCA0CTLW0 &= ~UCSWRST;                    // **Initialize USCI state machine**
#if(!DMA)
    UCA0IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt
#endif
}

#if(DMA)
void DMA_Init(void)
{
     DMACTL0 |= DMA0TSEL_14;            // UCA0RXIFG trigger
     DMA0CTL = DMADT_4 + DMADSTINCR_3 + DMAEN + DMAIE + DMADSTBYTE + DMASRCBYTE;
    __data16_write_addr((unsigned short) &DMA0SA,(unsigned short) &UCA0RXBUF); // Source single address

    __data16_write_addr((unsigned short) &DMA0DA,(unsigned short) 0x1c00); // Destination array address

    DMA0SZ = 1536;

}
#endif

#if(!DMA)
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
{
  RX_BUF[RX_Index] = UCA0RXBUF;
  RX_Index++;
  if(RX_Index == SPI_RX_BYTE_NUM)
  {
      RX_Index = 0;
      __no_operation();  //set breakpoint here
  }

}
#endif

#if(DMA)
#pragma vector=DMA_VECTOR
__interrupt void DMA0_ISR (void)
{
  switch(__even_in_range(DMAIV,16))
  {
    case  0: break;                          // No interrupt
    case  2:
        __no_operation();  //set breakpoint here
     // __bic_SR_register_on_exit(CPUOFF);     // exit LPM
      break;                                 // DMA0IFG
    case  4: break;                          // DMA1IFG
    case  6: break;                          // DMA2IFG
    case  8: break;                          // Reserved
    case 10: break;                          // Reserved
    case 12: break;                          // Reserved
    case 14: break;                          // Reserved
    case 16: break;                          // Reserved
    default: break;
  }
}

#endif

MSP430FR2000: Is BSL invoked on "blank device"?

$
0
0

Part Number:MSP430FR2000

Hi, 

Documentation about BSL on MSP430FR20xx devices seems to be largely missing. The datasheet points to slau550k (www.ti.com/.../slau550k.pdf), but there, the device is not included in the BSL overview (table 1). 

In chapter 3.3.3 (Blank Device Detection) the device is not listed as included, but can I trust that info, since the device does not seem to be properly represented in the document?

Please point to correct docs, thanks! 

MSP430F67751A: programming via JTAG interface

$
0
0

Part Number:MSP430F67751A

Hi, I need to program MSP430F67751A processor directly from board tester. The tester is connected to JTAG interface. In the SLAU320 manual there are briefly described only following commands:

#define IR_ADDR_16BIT 0xC1 // original value: 0x83

#define IR_ADDR_CAPTURE 0x21 // original value: 0x84

#define IR_DATA_TO_ADDR 0xA1 // original value: 0x85

#define IR_DATA_16BIT 0x82 // original value: 0x41

#define IR_DATA_QUICK 0xC2 // original value: 0x43

#define IR_BYPASS 0xFF // original value: 0xFF

#define IR_CNTRL_SIG_16BIT 0xC8 // original value: 0x13

#define IR_CNTRL_SIG_CAPTURE 0x28 // original value: 0x14

#define IR_CNTRL_SIG_RELEASE 0xA8 // original value: 0x15

#define IR_DATA_PSA 0x22 // original value: 0x44

#define IR_SHIFT_OUT_PSA 0x62 // original value: 0x46

#define IR_PREPARE_BLOW 0x44 // original value: 0x22

#define IR_EX_BLOW 0x24 // original value: 0x24

#define IR_JMB_EXCHANGE 0x86 // original value: 0x61

Using MSP-FET430UIF programmer I realize the use of undocumented JTAG commands. These commands sampled using logic analyzer are in reverse order as in previous #define:

0xB0, 0x30, 0xE1, 0x42, 0xD0

and a 16-bit command 0x0000

Programming happens via mailbox by 32-bit groups of data, but I am not understand how to set target address of programming nor how to erase memory. Is there some description of undocumented commands and mailbox use?

MSP430F2617: XOSC5 , 6 and 8 failure mode -- need some help with details

$
0
0

Part Number:MSP430F2617

Hello,

This has reference to the MSP430F2617 errata sheet. It mentions the following problems XOSC5, XOSC6 and XOSC8.

As an example, XOSC5 is stated below:

"Function LF crystal failures may not be properly detected by the oscillator fault circuitry Description The oscillator fault error detection of the LFXT1 oscillator in low frequency mode (XTS = 0) may not work reliably causing a failing crystal to go undetected by the CPU, i.e. OFIFG will not be set."

I have the following question regarding this:

What does "failing crystal" mean? Does it mean that there is no oscillation at all? 

If so, does it mean that the crystal may not be producing oscillations and yet there is not fault detection by the MSP controller?

What other crystal failure modes exist which go undetected due to XOSC5?

Thanks,

Manohar

 

MSP432P401R: About firmware update

$
0
0

Part Number:MSP432P401R

Hello.

I have a question.

Is it possible to update the firmware with UART without stopping the operation of the device?

Firmware capacity will be less than 128 KB.

Regards,

MSP430FR5969: Multiple Transmitter and single receiver in UART?

$
0
0

Part Number:MSP430FR5969

Hello All,

Is it possible to receive the data on the RX(UART) pin of MSP430, by using 2 different TX lines.?

Like I have MSP1,MSP2, MSP3. MSP3 is a RX and MSP1 & MSP2 is the transmitter (UART). SO both MSP1 & 2's TX pons are connected to RX pin of MSP3. Is it possible? 

if YES then how it works and NO then why no?

Thanks 

Anil D.


CCS/MSP432P401R: ADC14, Multiple Channel Repeat

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

I want to read multiple ADC values simultaneously using the DriverLib provided in MSP432 SDK. 

I edited the adc14_multiple_channel_no_repeat.c for repeating the same operation repeatedly.

All I changed in the example code was the 

    MAP_ADC14_configureMultiSequenceMode(ADC_MEM0, ADC_MEM7, false);

 to

    MAP_ADC14_configureMultiSequenceMode(ADC_MEM0, ADC_MEM7, true);

I think that is all the change to be made to the example code.

I have added the full code below.


/* --COPYRIGHT--,BSD
 * Copyright (c) 2017, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * --/COPYRIGHT--*/
/*******************************************************************************
 * MSP432 ADC14 - Multiple Channel Sample without Repeat
 *
 * Description: In this code example, the feature of being able to scan multiple
 * ADC channels is demonstrated by the user a the DriverLib APIs.  Conversion
 * memory registers ADC_MEM0 - ADC_MEM7 are configured to read conversion
 * results from A0-A7 respectively. Conversion is enabled and then sampling is
 * toggled using a software toggle. Repeat mode is not enabled and sampling only
 * occurs once (and it is expected that the user pauses the debugger to observe
 * the results). Once the final sample has been taken, the interrupt for
 * ADC_MEM7 is triggered and the result is stored in the resultsBuffer buffer.
 *
 *                MSP432P401
 *             ------------------
 *         /|\|                  |
 *          | |                  |
 *          --|RST         P5.5  |<--- A0 (Analog Input)
 *            |            P5.4  |<--- A1 (Analog Input)
 *            |            P5.3  |<--- A2 (Analog Input)
 *            |            P5.2  |<--- A3 (Analog Input)
 *            |            P5.1  |<--- A4 (Analog Input)
 *            |            P5.0  |<--- A5 (Analog Input)
 *            |            P4.7  |<--- A6 (Analog Input)
 *            |            P4.6  |<--- A7 (Analog Input)
 *            |                  |
 *            |                  |
 *
 ******************************************************************************/
/* DriverLib Includes */
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>

/* Standard Includes */
#include <stdint.h>

#include <string.h>

static uint16_t resultsBuffer[8];

int main(void)
{
    /* Halting WDT  */
    MAP_WDT_A_holdTimer();
    MAP_Interrupt_enableSleepOnIsrExit();

    /* Zero-filling buffer */
    memset(resultsBuffer, 0x00, 8);

    //![Simple REF Example]
    /* Setting reference voltage to 2.5  and enabling reference */
    MAP_REF_A_setReferenceVoltage(REF_A_VREF2_5V);
    MAP_REF_A_enableReferenceVoltage();
    //![Simple REF Example]

    /* Initializing ADC (MCLK/1/1) */
    MAP_ADC14_enableModule();
    MAP_ADC14_initModule(ADC_CLOCKSOURCE_MCLK, ADC_PREDIVIDER_1, ADC_DIVIDER_1,
            0);

    /* Configuring GPIOs for Analog In */
    MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P5,
            GPIO_PIN5 | GPIO_PIN4 | GPIO_PIN3 | GPIO_PIN2 | GPIO_PIN1
                    | GPIO_PIN0, GPIO_TERTIARY_MODULE_FUNCTION);
    MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P4,
            GPIO_PIN7 | GPIO_PIN6, GPIO_TERTIARY_MODULE_FUNCTION);


    /* Configuring ADC Memory (ADC_MEM0 - ADC_MEM7 (A0 - A7)  with no repeat)
     * with internal 2.5v reference */
    MAP_ADC14_configureMultiSequenceMode(ADC_MEM0, ADC_MEM7, true);
    MAP_ADC14_configureConversionMemory(ADC_MEM0,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A0, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM1,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A1, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM2,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A2, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM3,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A3, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM4,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A4, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM5,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A5, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM6,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A6, false);
    MAP_ADC14_configureConversionMemory(ADC_MEM7,
            ADC_VREFPOS_INTBUF_VREFNEG_VSS,
            ADC_INPUT_A7, false);

    /* Enabling the interrupt when a conversion on channel 7 (end of sequence)
     *  is complete and enabling conversions */
    MAP_ADC14_enableInterrupt(ADC_INT7);

    /* Enabling Interrupts */
    MAP_Interrupt_enableInterrupt(INT_ADC14);
    MAP_Interrupt_enableMaster();

    /* Setting up the sample timer to automatically step through the sequence
     * convert.
     */
    MAP_ADC14_enableSampleTimer(ADC_AUTOMATIC_ITERATION);

    /* Triggering the start of the sample */
    MAP_ADC14_enableConversion();
    MAP_ADC14_toggleConversionTrigger();

    /* Going to sleep */
    while (1)
    {
        MAP_PCM_gotoLPM0();
    }
}

/* This interrupt is fired whenever a conversion is completed and placed in
 * ADC_MEM7. This signals the end of conversion and the results array is
 * grabbed and placed in resultsBuffer */
void ADC14_IRQHandler(void)
{
    uint64_t status;

    status = MAP_ADC14_getEnabledInterruptStatus();
    MAP_ADC14_clearInterruptFlag(status);

    if(status & ADC_INT7)
    {
        MAP_ADC14_getMultiSequenceResult(resultsBuffer);
    }

}

This seems correct but the ADC is not continuously reading all the pins and some pins such as P5.4 does not even show sampling even when a given input.

And the results are shown only in the first two indices of the resultsBuffer[ ] and not on anything else. 

Am I doing something wrong? I am new to MSP432.

Thank you.

Viswanath.

MSP430F5529: How to test the UART example MSP430F55xx_uscia0_uart_01.c?

$
0
0

Part Number:MSP430F5529

Hello,

I am trying to run the following Code on the MSP-EXP430F5529LP launchpad.  

#include <msp430.h>

int main(void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT

  P3SEL |= BIT3+BIT4;                       // P3.3,4 = USCI_A0 TXD/RXD
  UCA0CTL1 |= UCSWRST;                      // **Put state machine in reset**
  UCA0CTL1 |= UCSSEL_2;                     // SMCLK
  UCA0BR0 = 9;                              // 1MHz 115200 (see User's Guide)
  UCA0BR1 = 0;                              // 1MHz 115200
  UCA0MCTL |= UCBRS_1 + UCBRF_0;            // Modulation UCBRSx=1, UCBRFx=0
  UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
  UCA0IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt

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

// Echo back RXed character, confirm TX buffer is ready first
#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
{
  switch(__even_in_range(UCA0IV,4))
  {
  case 0:break;                             // Vector 0 - no interrupt
  case 2:                                   // Vector 2 - RXIFG
    while (!(UCA0IFG&UCTXIFG));             // USCI_A0 TX buffer ready?
    UCA0TXBUF = UCA0RXBUF;                  // TX -> RXed character
    break;
  case 4:break;                             // Vector 4 - TXIFG
  default: break;
  }
}

The example description tells me that the UART will recieve from the Serial port of PC and echo it back. I am using the Serial terminal present in the CC Studio. But I am not able to recieve any Output. Am I missing any Connections on the Launchpad? Or what is the right way to test the above Code?

Sincerely,

Manoj.

EVM430-I2040S: programming

$
0
0

Part Number:EVM430-I2040S

Hi,

I will be using EVM430I2040 for data acquisition and storing the result on microSD card. The 24 bit ADC needs to be configured and the SPI module needs to be configured to interface the evaluation kit with a microSD breakout board. Is there any example programs available which implements these applications or the program needs to developed using API available.

Best Regards,

Abhishek Grover.

MSP430G2253: i2c multiple slave with same address

$
0
0

Part Number:MSP430G2253

Hi

I want to use a couple of MAG3110 and it can only communicate using i2c. But I can't change the address. Is there any way to communicate with multiple sensors of the same address in the same i2c bus. I have access to MSP430G2553 and MSP430F5529, both of them has one module for i2c. I could try controlling both sensors' active period using a timer, but I want them to show data of same time period as I will later compare them. Any advice will be appreciated.

MSP432P401R: Interrupt Latching

$
0
0

Part Number:MSP432P401R

Hi,

My question is about interrupt handling on the MSP432, and perhaps more specifically to what extent the NVIC latches interrupts. Scenario as follows:

  1. Several Port 4 input interrupts are enabled;
  2. An interrupt occurs on a Port 4 line, and the handler is entered;
  3. While still in the handler, an interrupt occurs on a second Port 4 line - second interrupt is presumably 'pended';
  4. Before the handler exits, the port’s IE bit for the second Port 4 line is cleared;
  5. The handler then exits.

What then happens? It seems to me two possibilities:

  • Either the handler is NOT run again for the second interrupt, because the IE bit is now clear;
  • OR the handler WILL run again, despite the IE bit now being clear, because the IE bit was still set at the time of the second interrupt, so the interrupt went to ‘pending’ and this was latched by the NVIC.

I’ve had a weird bug which I can only really explain if the second answer is correct, but I find it hard to believe that was the design intent…..

Any views appreciated!

Thanks…. Happy Christmas!

John

 

Viewing all 22328 articles
Browse latest View live


Latest Images

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