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

MSP430F149: In circuit serial programming

$
0
0

Part Number:MSP430F149

Hello,

i am using msp430f149 controller for my products from long time. Now i need to update some features of my sold product and for that i have developed new program.

Since my all sold instruments  are located at different it is not possible to go at site and program it using MSP-FET.

So from now a day i want to include in circuit serial programming in my all products so in feature i will not face this issue again.

It is possible to program MSP430f149 with UART without using MSP-FET ?

can i download .hex file directly to controller using serial communication without any programming tool ?

what hardware i need to add for this functionality ?   

In ti MCU serial programming from UART is known by which word ? is ICSP or any thing else ?

any help is greatly welcomed... 


MSP430FR5994: MSPFlasher unable to access password locked JTAG

$
0
0

Part Number:MSP430FR5994

I was experimenting with locking the JTAG and BSL using the below code with my MSP430FR5994 launchpad board.  Based on my reading of the MSP430FR59xx family users guide [0] (p. 65) I think I should be able to access the device with the jtag password 0x1234 but after flashing my device using MSPFlasher I can't access JTAG and more even with the JTAG password I thought I was setting (0x1234).  I also tried MSPFlasher -e ERASE_TOTAL which some documentation indicates should reset FR5xxx devices even if they are JTAG locked.  That didn't work either I always get the message, "# ERROR: The Debug Interface to the device has been secured" from MSPflasher.  Where did I go wrong, and is my device bricked for good?

#include <msp430.h>

__attribute__((section(".bslsignature"))) unsigned int bsl_signature[2] = { 0x5555, 0x5555 };
__attribute__((section(".jtagsignature"))) unsigned int jtag_signature[2] = { 0x5555, 0x0001 };
__attribute__((section(".jtagpassword"))) unsigned int jtag_password[1] = { 0x1234 };

int main(void) {
    WDTCTL = WDTPW | WDTHOLD;
    PM5CTL0 &= ~LOCKLPM5;

    P1DIR |= (BIT1);

    while (1) {

        P1OUT ^= (BIT1);
        __delay_cycles(1000000);
    }

    return 0;
}

[0] http://www.ti.com/lit/ug/slau367o/slau367o.pdf

[1] http://www.ti.com/lit/ug/slau654/slau654.pdf

MSP430F1611: Utilising two UART ports on TelosB

$
0
0

Part Number:MSP430F1611

Dear all,

I am currently using TelosB(MSP430f1611), and trying to use both UART ports that are available on the board.

I have configured one UART port correctly, and it can transmit and receive with users via PuTTY. Now I am trying to configure another one, which should be easy but I am kind of struggling because I am trying to modify the code that was given to me which forms serial communication with external device.

I have succesfully completed initating the UART configuration but because the given code was written for MSP430fr4133, some of the commands need to be replaced approprittely for msp430f1611. For instance

void dn_uart_txByte(uint8_t byte){
   while(!(UCA0IFG & UTXIFG0));             // wait until TX buffer ready
   UCA0TXBUF = byte;                        // send byte
}

and now I have modified the code to this,  the below is for MSP430f1611Is this correct?

void dn_uart_txByte(uint8_t byte){
   while(!(IFG1 & UXIFG0));             // wait until TX buffer ready
   U0TXBUF = byte;                        // send byte
}

Thank you

Kind regards

Yong Kim

MSP430F1611: RTC

$
0
0

Part Number:MSP430F1611

Dear all,

I am trying to interface TelosB with external device called smartmesh mote "www.linear.com/.../4330".

Here, the example they used for interfacing to the mote was MSP430fr4133 launch pad which is quite different from TelosB(msp430f1611).

Referring to the code, LCD functions are not concerned at initialising board can be done seperately with my existing code. 

The part I am stuck in with is this part of code:

void fsm_scheduleEvent(uint16_t delay, fsm_timer_callback cb) {
   
   // remember what function to call
   app_vars.fsmCb       = cb;
   
   // configure/start the RTC
   RTCCTL               =  0;
   RTCMOD               =  delay;                // delay (in 32kHz clock cycles)
   RTCCTL              |=  RTCIE;                // enable interrupts
   RTCCTL              |=  RTCPS_0;              // divider /1
   RTCCTL              |=  RTCSS_2;              // clock source is XT1CLK
   RTCCTL              |=  RTCSR;                // reset the RTC
}

Please correct me if I am wrong, but as far as I know for MSP430f1611, there is no RTC library available.

Could anyone direct me how to go about with this?

full code is attached in this post.

Thank you

Kind regards

(Please visit the site to view this file)

CCS/MSP430F5529: ADC using MSP430

$
0
0

Part Number:MSP430F5529

Tool/software: Code Composer Studio

Hi,

We are working with MSP430F5529 for ADC and tp store the values in an array using Repeat-single-channel conversion mode.

Can we get a program for that?

MSP430F47197: MSP430F47197

$
0
0

Part Number:MSP430F47197

Hello  

we want to implement DLMS COSEM protocol in our smart meters 

we are using TIDM-THREEPHASEMETER-F449 reference board for this purpose & we have a demo code which have the following libraries in IAR IDE format

iec62056_46_link.r43

packing.r43

server_msg.r43

xframe.r43 

can we get the source code of this core libraries ? 

If it should be obtained under payment then please kindly tell the price and licensing information 

Thanks 

MSP430FR4133: MSP430FR4133

$
0
0

Part Number:MSP430FR4133

Hi,

We are using MSP430FR4133 connected to an Accelerometer vis I2C bus.

We are using IAR 8

We would like to use P5 PIN2 and 3  or P8 PIN2 and 3 - please advice which is preferred.

We are trying to use EUSCI library - with no success:

This part pass:

EUSCI_B_I2C_initMasterParam param = {0};
param.selectClockSource = EUSCI_B_I2C_CLOCKSOURCE_ACLK;
param.i2cClk = CS_getACLK();
param.dataRate = EUSCI_B_I2C_SET_DATA_RATE_100KBPS;
param.byteCounterThreshold = 1;
param.autoSTOPGeneration = EUSCI_B_I2C_NO_AUTO_STOP;
EUSCI_B_I2C_initMaster(EUSCI_B0_BASE, &param);

Not clear how to config the physical PINs  (is that correct?)

EUSCI_B_I2C_remapPins(EUSCI_B0_BASE,2+3 );

GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P5 ,GPIO_PIN2 + GPIO_PIN3,GPIO_SECOND

This part also pass:

// EUSCI B I2C enableInterrupt(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0 + EUSCI_B_I2C_STOP_INTERRUPT);
// Specify slave address
EUSCI_B_I2C_setSlaveAddress(EUSCI_B0_BASE, 0x0D);//SLAVE_ADDRESS);

//Set Master in TX mode
EUSCI_B_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_MODE);

//Enable I2C Module to start operations
EUSCI_B_I2C_enable(EUSCI_B0_BASE);
 

And then I stock on this line:

EUSCI_B_I2C_masterSendSingleByte(EUSCI_B0_BASE,0x00);

Please advise.

In case you have a [pre[ared example I for MSP430FR4133 I would appreciate that.

BR,

Shimon

 

MSP430F5132: MSP430F5132

$
0
0

Part Number:MSP430F5132

Hi,

I'm trying to erase  or program MSP430F5132 device. The error im getting is "  FATAL ERROR  "  COULD NOT FIND DEVICE"  (Device not supported) Session Aborted.

1. Im using eZ-FET launch board.   SBWTCK is connected with MSP430F5132  PIN :  TEST  ( TEST / SBWTCK)

                                                         SBWTDIO is connected with MSP430F5132 PIN  RST ( NMI / SBW TDIO/RST).

Thanks in advance.

- Regards

Rajesh.

                                                        


MSP430F5659: USB BSL Sequence

$
0
0

Part Number:MSP430F5659

Hi,

Is there any timing waveform describing USB BSL sequence covering the following:

  1. Minimum time duration required for PUR pulled high to reset# released.
  2. Minimum time duration required to remove PUR before BOR after flashing the user image.
  3. Minimum duration for generation of VUSB(3V3) after providing VBUS. 
  4. Minimum duration for external VCC to PUR pulled high. 

I could find the BSL sequence in the following  : "http://www.ti.com/lit/an/slaa452c/slaa452c.pdf". But could not find any timing parameters mentioned in this document. Can anyone help me in finding the required information?

MSP430F169: USB to LPT1 parallel connector

$
0
0

Part Number:MSP430F169

My latest PCs do not have a parallel printer connector for Olimex JTAG debugging. 

I find some USB to Parallel printer adapters, but I assume these are just wiring adapters that do not create an LPT1 port.  Looks like they may be part of the solution.

So, is their a solution that connects the latest IAR software to the Olimex MSP420F169 board using the LPT1 connector?

Thanks,

Tom

MSP430FR2311: MSP430FR2311 Microcontroller IR Reflection Sensing Reference Design

$
0
0

Part Number:MSP430FR2311

Can development and production be carried out using the " MSP430FR2311 Microcontroller IR Reflection Reference Design" provided by Ti?

I,m looking forward to your reply. Thank you.  

CCS/MSP432E401Y: CAN port using

$
0
0

Part Number:MSP432E401Y

Tool/software: Code Composer Studio

The MSP432E4 SDK currently does not providing CAN  program,lack the following 4 files:

..\ti\simplelink_msp432e4_sdk_1_60_00_10\source\ti\drivers\can.h;

..\ti\simplelink_msp432e4_sdk_1_60_00_10\source\ti\drivers\can.c;

..\ti\simplelink_msp432e4_sdk_1_60_00_10\source\ti\drivers\can\CANMSP432E4.h;

..\ti\simplelink_msp432e4_sdk_1_60_00_10\source\ti\drivers\can\CANMSP432E4.c;

How can I  get those files? 

Thanks!

MSP430F5528: ISR problem

$
0
0

Part Number:MSP430F5528

Hi,

I am facing a problem with the interrupt handler. After servicing to the interrupt it not coming back to the main program continuously it is running the same isr.

#include <msp430.h>
***********************************
//lcd initialization 
//
//
//
//functions declaration for lcd
***********************************
char data;
int main(void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  lcd_init();
  P4SEL = BIT4+BIT5;                        // P3.4,5 = USCI_A0 TXD/RXD
  UCA1CTL1 |= UCSWRST;                      // **Put state machine in reset**
  UCA1CTL1 |= UCSSEL_2;                     // SMCLK
  UCA1BR0 = 6;                              // 1MHz 9600 (see User's Guide)
  UCA1BR1 = 0;                              // 1MHz 9600
  UCA1MCTL = UCBRS_0 + UCBRF_13 + UCOS16;   // Modln UCBRSx=0, UCBRFx=0,
                                            // over sampling
  UCA1CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
  UCA1IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt

  __bis_SR_register(LPM0_bits + GIE);       // Enter LPM0, interrupts enabled
  send_string(data);
  
}

// Echo back RXed character, confirm TX buffer is ready first
#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
{
  switch(__even_in_range(UCA1IV,4))
  {
  case 0:break;                             // Vector 0 - no interrupt
  case 2: 
    data = UCA1RXBUF;                                  // Vector 2 - RXIFG
    while (!(UCA1IFG&UCTXIFG));             // USCI_A0 TX buffer ready?
    UCA1TXBUF = 52;                  // TX -> RXed character
    break;
  case 4:break;                             // Vector 4 - TXIFG
  default: break;
  }
 __bic_SR_register(LPM0_bits);
}

In the above program I just want to display the received data on an LCD, but it is not executing that instruction,

 

MSP-FET: MSP-FET drivers for IAR 4.50.2 version

$
0
0

Part Number:MSP-FET

Good Morning TI community!

As you can see from the title I have some problems to install the suggested patch for the IAR 4.50.2 version to support MSP-FET Flash Emulation Tool.

I downloaded the patch for IAR from this link:

but when I tried to install I have this problem:

The warning message is very strange for me because in the specified directory I have the 430 folder (as you can see below) so I don't understand why I have this message.

How can I do if I don't want to do the update to the latest version of the IAR IDE?

Thank you very much for your help.

Kind Regards,

Luigi

MSP430F5510: The voltage applied to gpio pin for VBUS on MSP430F5510

$
0
0

Part Number:MSP430F5510

Hello,

Please let me know the voltage applied to gpio pin for VBUS on MSP430F5510.
Especially, I want to get the information for P4.[1:3], P3.[0:4] and P2.[0:7].

I can find the voltage applied to any pin for Vcc; however, I cannot find the parameter for VBUS.

Best Regards,
Nomo


MSP432P401R: Count number of pulses on rising edge triggered

$
0
0

Part Number:MSP432P401R

Hello,

     I want to count number of pulses of encoder on high to low edge triggered on port pin ( rising edge) using MSP432. I have taken variable "a"  in interrupt. when interrupt is occurred on rising edge my count is increment by 1. but my interrupt is triggered on both edge. i got pulses 1000 as i expected is 500 only.

The program is shown below:-


int a = 0;

void main(void)
{
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // stop watchdog timer

P6->DIR &= ~BIT0; // set P6.0 as a input direction
P6->REN = BIT0; // Enable pull-up resistor
P6->IFG &= ~ BIT0; // P1.4 IFG cleared
P6->IES &=~ BIT0; // high to low
P6->IE |= BIT0; // P1.4 interrupt enabled

// Enable Port 1 interrupt on the NVIC
NVIC->ISER[1] = 1 << ((PORT6_IRQn) & 31);

// wake up on exit from ISR
SCB->SCR &= ~SCB_SCR_SLEEPONEXIT_Msk;

for(;;){}
}


// Port 1 interrupt service routine
void PORT6_IRQHandler(void)
{
if(P6IFG & BIT0)
{
a=a+1;
}
P6->IFG &= ~BIT0;
}

please tell me where i am going wrong in code??

Thanks

CCS/MSP430F249: msp430f249

$
0
0

Part Number:MSP430F249

Tool/software: Code Composer Studio

hi, I am using msp430f249 part on code composer studio v7 I have a code and my blink works good but the uart transmit and receive isn't working, and i didn't succeed to build a connection with the msp part, does any one know how to build this uart? and if someone did it before who can share the code with me??

thank you

Best microcontroller for my project

$
0
0

Hello the community, I need you advice ! I don't know really MSP430 series

I have a project but I need you advice to choose the best microcontroller in relation of the price.
Below my specifications :

- low power consumption ( the controlleur wake-up two time a day for 20 seconds)

- I need 4 capacitives touch

- internal RTC to manage and calculate time every time the controller wake-up ( calculate sun set and sunrise hours ). offset 5 to 10 minutes by year

- manage a H bridge ( it's my own H bridge) for drive a DC motor . I need 1 PWM Output and 1 Digital Output for direction.

- 3 analogs input ( 10 bit definition max) to measure a LDR/ motor stall / battery level

- Manage a TFT 1.44 display ( ST7735 ) thru SPI

Last question : do I use Energia or CCS ? ( don't know in regards with the complexity of the program , debug etc .... )

Regards

 My first choise : MSP430FR2532 

WEBENCH® Tools/MSP430F169: Need to download IAR 5.20.1

$
0
0

Part Number:MSP430F169

Tool/software: WEBENCH® Design Tools

The Olimex USB FET Debugger only works with IAR revs at or below 5.20.1.

How do I download that version or slac050z

Thanks,

Tom

CCS/MSP430G2553: Calculating Heart Beats per Minute

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

So here I have code that gets 10 pulses from the heart beat sensor and averages them out. Can someone give me some sample code/ help me figure out a way to calculate the heart beats per minute(You can assume the default value of the pulse sensor is about 470 when no one is touching it). If you can write me some very simple heart beat per minute code, it will help me tremendously. Thanks!

#include "msp430g2253.h"

// Variables
int adc[50] = {0}; //Sets up an array of 10 integers and zero's the values
int avg_adc = 0;

// Function prototypes
void adc_Setup();
void adc_Sam10();

void main()
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
adc_Setup(); // Fucntion call for adc_setup

while(1)
{
long adctot = 0;
adc_Sam10(); // Function call for adc_samp
// Add all the sampled data and divide by 10 to find average
int i = 0;
for(i = 0; i <= 49; i++){
adctot = adctot + adc[i];
}
avg_adc = adctot/50;
}
}

// ADC10 interrupt service routine
#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR(void)
{
__bic_SR_register_on_exit(CPUOFF); // Clear CPUOFF bit from 0(SR)
}

// ADC set-up function
void adc_Setup()
{
ADC10CTL1 = CONSEQ_2 + INCH_0; // Repeat single channel, A0
ADC10CTL0 = ADC10SHT_2 + MSC + ADC10ON + ADC10IE; // Sample & Hold Time + ADC10 ON + Interrupt Enable
ADC10DTC1 = 0x32; // 1000 conversions
ADC10AE0 |= 0x01; // P1.0 ADC option select
}

// ADC sample conversion function
void adc_Sam10()
{
ADC10CTL0 &= ~ENC; // Disable Conversion
while (ADC10CTL1 & BUSY); // Wait if ADC10 busy
ADC10SA = (int)adc; // Transfers data to next array (DTC auto increments address)
ADC10CTL0 |= ENC + ADC10SC; // Enable Conversion and conversion start
__bis_SR_register(CPUOFF + GIE);// Low Power Mode 0, ADC10_ISR
}

Viewing all 22238 articles
Browse latest View live


Latest Images

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