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

TIDM-1018: schematic design on altium

$
0
0

Part Number:TIDM-1018

Need a Power Over Ethernet® (PoE) Reference Design (ACTIVE)TIDM-1018  schematic design on altium

Any one to help me.


MSP430F47187: slightly changing clockrate

$
0
0

Part Number:MSP430F47187

Is it possible to set XT2 in HF mode a little bit higher than specified 16.0MHz?

16.384 MHz will completely meet my requirements and will make me extremelly happy.

MSP430F2274-EP: excessive current draw at low negative temperatures

$
0
0

Part Number:MSP430F2274-EP

See thread https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/729864/2695194#2695194 for original issue.  Thread got locked so posting as related question.

Basically I was getting current draw at cold temps.  

This ended up being a chip configuration issue on the basic registers.  It was key to set up P1DIR and P1OUT in the order shown in the code below.  

From my perspective you HAVE to configure all your ports otherwise you will have unexpected results.

#include "msp430.h"

void configWDT();
void configClocks();
void configGPIO();

static volatile char mode_set;

void main(void)
{                                           //Configuration routines
    configWDT();                            //Watchdog Timer+ Registers
    configGPIO();                           //General purpose pin io registers
    configClocks();                         //Basic Clock Module+ Registers

    mode_set = 0;

    while(1)
    {
        if(mode_set == 0)
            __bis_SR_register(LPM3_bits + GIE);     // Enter Low Power Mode 3 (LPM3) w/interrupt

        else if(mode_set == 1)
            __bis_SR_register(GIE);
    }
}

void configWDT(void)
{
    WDTCTL = WDTPW + WDTHOLD;   // Disable the watchdog timer.
                                // WDTPW        (bits 15 to 8)  = 5Ah.  WDT password.
                                // WDTHOLD      (bit 7)         = 1h.   Disables the WDT.
}


void configClocks()
{
    /* original clock functionality with XTAL and external crystal oscillator */
    DCOCTL = 0x60;
    BCSCTL1 = XT2OFF + DIVA_3;
    BCSCTL2 = SELM_3 + DIVM_3;
    BCSCTL3 = XCAP_3;

    /* clock functionality with VLO */
//    DCOCTL = 0x00;
//    BCSCTL1 = XT2OFF + DIVA_3;
//    BCSCTL2 = SELM_3 + DIVM_3 + SELS;
//    BCSCTL3 = LFXT1S_2 + XCAP_3;
}

void configGPIO(void)       // GPIO Register configuration
{
    //P1
     P1OUT = 0x00; //a1 these two settings hold current fine
     P1DIR = 0xFF; //a2 all ports are set as output

//     P1OUT = 0xFF; //b1 These 3 settings cause current runaway below -10C
//     P1DIR = 0x00; //b2 all ports are set as inputs
//     P1SEL = 0x00; //b3 gpio mode


                           // Configure Switch on P1.2
    P1REN = BIT2;          // P1.2 Enable Pullup/Pulldown
    P1OUT = BIT2;          // P1.2 pullup
    P1IE = BIT2;           // P1.2 interrupt enabled
    P1IES = BIT2;          // P1.2 Hi/lo falling edge
    P1IFG = 0x00;


     //P2               mask for external XTAL config
     P2DIR = BIT1;     // P2.0 is set to out,
     P2REN = 0x3f;      // new; added it after setting p2dir to 0x00
     P2OUT = 0x00;      // was 0x00;
     P2SEL = 0xC0;      //sets up port 6 and 7  for xtal usage
     P2IE = 0x00;
     P2IES = 0x00;
     P2IFG = 0x00;

     //P3
    P3OUT = 0x00;
    P3DIR = 0xFF;

    //P4
    P4OUT = 0x00;
    P4DIR = 0xFF;
}


// Port 1 interrupt service routine
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
    P2OUT ^= BIT0;
    P2IFG &= ~BIT0;
    P1IFG = 0x00;                             // P1.2 IFG cleared

    mode_set = P2OUT;
    __bic_SR_register_on_exit(LPM3_bits);
}

MSP430F5528: Using SBW data line as reset line and vice versa

$
0
0

Part Number:MSP430F5528

We program the microcontroller in the factory via SBW, but I also need the SBWDIO line as a hard reset line.  Is it possible to configure the device to do both? My understanding is that the device enters SBW programming mode by holding the SBW clock line high for some amount of time (I guess this is done automatically by the programmer device).  During normal operating, will a momentary low on the RST/NMI/SBWTDIO line work as a hard reset?  Is this a normal configuration? I plan to add a watchdog timer on another board attached to the board that the MSP430F558 is on, sending a gpio line out as a soft strobe that pulses once per software loop, and i want to attach the reset/sbwdio line on the other board as the WD reset.  The programming via SBW happens with a gang programmer, so the watchdog circuit won't be part of that.

MSP430FR6047: Integrated vs companion chips

$
0
0

Part Number:MSP430FR6047

I am designing an ultrasonic water flow meter and looking at two design choices: use the integrated MSP430 solution or a different micro with the TI ultrasound measurement chips available (for timing and pulse generation). I have a lot of platform firmware for the other micro and so want to stick with that but I am curious on the essential differences between these two approaches? Can I essentially do the same with both solutions, regarding flow measurement, just one is an integrated peripheral and one is external?

My read was that this is the case.

Thanks in advance

Andy.

MSP432P401R: VL6180X Proximity Sensor I2C Problem

$
0
0

Part Number:MSP432P401R

Hi all,

I am attempting to interface my MSP432P401R MCU with a VL6180X proximity sensor on a breakout board purchased from Adafruit. I have gotten it working with an Arduino and the library provided by Adafruit. When I attempt to use the sensor with the MSP432, I can read the registers using I2C. However, I am encountering an error with the sensor that says I have a "VCSEL Continuity Error". I am not sure what this means, but because I am able to successfully read the registers from the sensor, I have to assume that I am having issues writing to the registers on the sensor. Does anyone have experience with this particular sensor?

CCS/MSP430F5528: Can't capture uart receive interruption

$
0
0

Part Number:MSP430F5528

Tool/software: Code Composer Studio

Hi, I am using tdc1000-tdc7200evm to communicate with other board through uart from GPIO3\GPIO4. I can read from the oscilloscope that there is data transmitted, and I connect RX TX with a wire. However, the program cannot jump into RX interrupt.  I found the interrupt enable register was 0 but I enabled interruptions in my code.

By the way, I have enabled system interruptions.

Here are my codes and the value of UART registers:

void InitUART(void){

  UCAxCTL1 |= UCSWRST;                      // **Stops USCI state machine**

  UART_PxREN &= ~(UART_TX_PAD|UART_RX_PAD); //Disable port pull resistors
  UART_PxDIR &= ~UART_RX_PAD;               // Configure P4.5 as input
  UART_PxDIR |= UART_TX_PAD;                // Configure P4.4 as output
  UART_PxSEL |= (UART_TX_PAD|UART_RX_PAD);  // Px.x & Px.X = USCI_Ax TXD & RXD

  UCAxCTL0 = 0x00;                          // No parity, 8-N-1 mode
  UCAxCTL1 |= UCSSEL__ACLK;                 // Select 12MHz ACLK as clock source for the UART
  UCAxBR = UART_BAUDRATE_REG;               // defines baudrate
  UCAxMCTL =  (UCBRF_0|UCBRS_1);          // Modulation UCBRSx = 1 //vishy: 115200  baudrate selection @ 12MHz
//  UCAxMCTL =  (UCBRF_0|UCBRS_0);            // Modulation UCBRSx = 1 //vishy: 230400  baudrate selection @ 12MHz
  UCAxIFG &= ~UCAxRXIFG;          //Clear RX IFG  (Interrupt flag register)
  UCAxIFG &= ~UCAxTXIFG;          //Clear TX IFG  (Interrupt flag register)
  UCAxIE |= UCAxRXIE +UCAxTXIE;             // Enable USCI_A1 RX interrupt
  UCAxCTL1 &= ~UCSWRST;           // **Initialize USCI state machine**


}
#pragma vector=UCAxRX_VECTOR;
__interrupt void receiveUART(void)
{
unsigned short i;
unsigned char TimeOutCounter = 0;

if (UCAxRXIFG)// USCI_A0 RX buffer ready?
{
open_flag=UCAxRXBUF;

} //wait until Tx buffer is empty
UartRx_flag = 1;

}

What can I do?

CCS/MSP430FR5969: HX711 ADC Channel related

$
0
0

Part Number:MSP430FR5969

Tool/software: Code Composer Studio

Hello All,

I am working with loadcell and with hx711  in my project. can anyone help me in clarifying that at a time two channels in one hx711 can be used or not.

Thanks &Regards,

Niharika


CCS/MSP430FR6989: Educational BoosterPack MKII

$
0
0

Part Number:MSP430FR6989

Tool/software: Code Composer Studio

Hi,

I want to use the Educational BoosterPack MKII with my MSP430FR6989 Launchpad in Code Composer Studio as an ASSEMBLY Only project (Not C/C++). Can anyone provide me some examples on how I can get started because right now I have just plugged in the booster pack to my launchpad and now I am completely in the dark on how to at-least test some of its features. I was looking at some examples online but they were all for C/C++ and Energia

CCS/MSP430FR6989: Interrupts

$
0
0

Part Number:MSP430FR6989

Tool/software: Code Composer Studio

How do I define multiple interrupts from a similar type of source (so I want to attach an interrupt to each of the two buttons P1.1 and P1.2 and want something different to happen for each button press). This is somewhat of a general structure of what I have: (The problem is when I press P1.1 the code runs, but when I press P1.2 nothing happens)

          bis.b #BIT1,&P1IES ; Configure P1.1 as a high-to-low interrupt
          bic.b #BIT1,&P1IFG
          bis.b #BIT1,&P1IE

          bis.b #BIT2,&P1IES ; Configure P1.2 as a high-to-low interrupt
          bic.b #BIT2,&P1IFG
          bis.b #BIT2,&P1IE


          nop
          bis.w #LPM0+GIE,SR ; Enter LPM0 w/ interrupt
          nop

PORT1_1_ISR            ;    P1.1 Interrupt Service Routine

                                   bic.b   #BIT1, &P1IFG

                                    ;CODE

                                    reti

PORT1_2_ISR            ;    P1.2 Interrupt Service Routine

                                   bic.b   #BIT2, &P1IFG

                                    ;CODE

                                    reti


;------------------------------------------------------------------------------
; Interrupt Vectors
;------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET ;
.sect ".int37" ; 
.short PORT1_1_ISR
.sect ".int38";
.short PORT1_2_ISR
.end

CCS/MSP430FR2311: adc

$
0
0

Part Number:MSP430FR2311

Tool/software: Code Composer Studio

how can i use 3 pins for  adc

can i get reference voltage of 2v

CCS/MSP430FR6989: LCD Code

$
0
0

Part Number:MSP430FR6989

Tool/software: Code Composer Studio

I am trying to print put "HELLO" in the LCD screen of my MSP430FR6989 MCU. I have included the 

msp430_driverlib_2_91_08_00.zip  

in my project directory as required. While trying to do it, there a prompt came up stating that they need XDC tools to build the build.config file so I clicked Yes on that one. But as I try to build it after including the directory for from the driverlib folder, this error(s) come up:

Building file: "../msp430_driverlib_2_91_08_00/packages/ti/mcu/msp430/driverlib/product/package/build.cfg"
Invoking: XDCtools
"C:/ti/xdctools_3_50_08_24_core/xs" --xdcpath= xdc.tools.configuro -o configPkg -r debug -c "C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.3.LTS" "../msp430_driverlib_2_91_08_00/packages/ti/mcu/msp430/driverlib/product/package/build.cfg"
msp430_driverlib_2_91_08_00/packages/ti/mcu/msp430/driverlib/product/package/subdir_rules.mk:12: recipe for target 'build-24601535-inproc' failed
js: "C:/ti/xdctools_3_50_08_24_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: Error: no target named: please use -t, -b, or --cb
gmake[1]: *** [build-24601535-inproc] Error 1
gmake: *** [build-24601535] Error 2
msp430_driverlib_2_91_08_00/packages/ti/mcu/msp430/driverlib/product/package/subdir_rules.mk:9: recipe for target 'build-24601535' failed
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

The assembly code is given below:

;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file

;--- external references -------------------------------------------------------
.ref myfunc
.ref initGPIO
.ref initClocks
.ref myLCD_init
.ref myLCD_showChar
;----variables -----------------------------------------------------------------
.bss Result, 2

;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.

;-------------------------------------------------------------------------------
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer


;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------

mov.w #11d, R12
mov.w #12d, R13
mov.w #13d, R14
mov.w #14d, R15
calla #myfunc
mov.w R12, &Result

calla #initGPIO
calla #initClocks
calla #myLCD_init

mov.w #'H', R12
mov.w #1, R13
calla #myLCD_showChar

mov.w #2, R13
mov.w #'E', R12
calla #myLCD_showChar

mov.w #3, R13
mov.w #'L', R12
calla #myLCD_showChar

mov.w #4, R13
mov.w #'L', R12
calla #myLCD_showChar

mov.w #5, R13
mov.w #'O', R12
calla #myLCD_showChar

mov.w &Result, R15

end: jmp end

;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack

;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET

What are the possible reasons for this coming up and how can this be fixed?

Thanks in advance. Also if anyone knows a better way to print stuff on the LCD screen USING ONLY ASSEMBLY please let me know. Really need this for a school project!

MSP430FR4133: Segment LCD contrast

$
0
0

Part Number:MSP430FR4133

I took a segment LCD from cheap thermometer which is working with one AAA battery. Using oscilloscope and a function generator I found out that this LCD has 4-mux and 1/3 bias configuration. It has 25 pins in total (21 segment pins and 4 common pins).

I would like to use this LCD with MSP430FR4133 microcontroller because it has LCD driver built-in.

But even if I use 4.096 kHz and 3.50 V internal charge pump (LCDVCTL = LCDCPEN | LCDREFEN | VLCD_15;) the contrast is very low.

How do they got normal contrast with only one AAA battery??

So what else can I try to debug the problem?

furieux

MSP430G2553: MSP430G2553 / - Help with interfacing with HX711 chip for weight sensor

$
0
0

Part Number:MSP430G2553

Hello everyone, I’m currently having an issue getting the SEN0160 weight sensor to work with the MSP430g2553. The SEN0160 uses the HX711 ADC chip (all datasheets attached below). I am not able to read the data coming from the chip and it’s definitely a hardware issue because I measured the voltage at the load cell connections and I’m getting a measured voltage of 2.5 at the E+ port. According to the datasheet the range is 2.6-5.5 V. The load cell itself I think needs 5 volts excitation, but I’m not even reaching the minimum 2.6 volts when I’m powering the hx711 ADC with 5 volts through a 5 Volts DC power supply. I posted some pictures below to help clarify. I actually connected the DOUT and SCK pins to P2.3 and P2.4 not the uart pins as shown below. 

 

https://www.dfrobot.com/wiki/index.php/Weight_Sensor_Module_SKU:SEN0160

 

www.mouser.com/.../hx711_english-1022875.pdf

CCS/MSP430F1101: Does CCS on Linux support the MSP-FET debug probe?

$
0
0

Part Number:MSP430F1101

Tool/software: Code Composer Studio

On this page the most recent MPS430 probe mentioned as supported is the MSP-FET430UIF. My question is whether the current MSP-FET probe for sale by TI is fully supported by CCS on Linux for debugging and programming MSP430F* chips?

Thanks


MSP432E401Y: MSP432E401Y

$
0
0

Part Number:MSP432E401Y

I was trying todo UART Firmware update on MS432E401Y eval board using Boot code. In application I updated BOOTCFG and tried the scenario using LM flash programmer with GPIO pin. Though everything worked but when wanted to try again for some reason my eval board has stopped working. I have few queries related to same:

(1) Which tool to be used for UART firmware update for MSP432E401Y board , because I don't see this option in LM flash programmer list.

(2) Did Update using LM flash programmer on MSP432E board has any issue? Did it corrupt the micro? when I try to flash using CCS , it never comes out of writing to flash, the  RED led on board remains ON forever.

I did try to update using Uniflash programmer. though programming shows successful, the application is not running. Erase flash and read back from flash looks fine but still I don't see the board working..?

Please let me know if there is a way to get the board up..

MSP430FR6047: Schematic of evaluation module is different from that of document

CCS/MSP432P401R: Starting a 3.5 inch TFT display project

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

I am planning to start a project using msp432p401r launchpad with a 3.5 inch TFT touch screen. This is my first time doing such a project. I hope that I can get some advice on following questions,

1.  I have searched for 3.5" TFT touch screen with resolution of 480x320. Most of them are compatible with Arduino and Raspberry PI. Here is the link ('https://www.waveshare.com/wiki/3.5inch_TFT_Touch_Shield" Can anyone provide an idea of choosing the right TFT touch screen?

2. For the program, is there a library that suitable for 3.5 inch TFT touch screen?

Thank you very much,

MSP432P401R: Callback function of UART when using FreeRTOS

$
0
0

Part Number:MSP432P401R

Hi e2e,

My customer wants to use the callback function of UART when running FreeRTOS on MSP432.

Can you give me a demo or show me how to configure the parameters?

Eason

MSP430F5438A: LPM2 & SMCLKOFF - different information on tables

$
0
0

Part Number:MSP430F5438A

Hi!

The User guide for 5xxx-devices claims two different things:

  • According to Table 1-2 SMCLK is always off in LPM2, independent on SMCLKOFF-bit UCSCTL6 and independent on REQEN-bits in UCSCTL8.
  • However, Table 5-1 claims that SMCLK can also be active if the corresponding SMCLKREQEN-bit is set.

Which one is correct? I did not yet measure it but in my circuitry some ADC12-results on certain operating modes give rise to the assumption that SMCLK is really always off in LPM2.

Viewing all 21965 articles
Browse latest View live