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

MSP430FR6989: MSP430FR6989: About the FRAM writting

$
0
0

Part Number:MSP430FR6989

Hello 

I set  to divide the segments by setting addresses in MPUSEGB 1 and 2.

It was written to FRAM to set MPUSAM.

However, even if MPUSEGxWE of MPUSAM is prohibited to write, it writes.

Program Example

#pragma LOCATION (Udata,0x4400)

int Udata [32][8]={
{0},
{0},
{0},};

int main(void)

MPUCTL0 = MPUPW;
MPUSEGB1 = 0x1000; 
MPUSEGB2 = 0x1A00;

MPUSAM = MPUSEG1RE | MPUSEG1XE |MPUSEG1WE|
MPUSEG2RE | MPUSEG2XE |MPUSEG2WE|
MPUSEG3RE | MPUSEG3XE |MPUSEG3WE|
MPUSEGIRE | MPUSEGIWE| MPUSEGIXE;

for(i=0;i<32;i++){

    for(j=0;j<8;j++){

        Udata [i][j] = i;

            if(j==8){

                j=0;

    }

}

}

MPUSAM &= ~MPUSEG1XE;
MPUSAM &= ~MPUSEG1WE;
MPUSAM &= ~MPUSEG2XE;
MPUSAM &= ~MPUSEG2WE;

for(i=0;i<32;i++){

    for(j=0;j<8;j++){

        Udata [i][j] = i+j+0x1000;

            if(j==8){

                j=0;

    }

}

}

In this program I think that 0 will be written from 0x4400, but the value after prohibition will be written.

I confirmed that writing with MPUSAM is prohibited.

Regards.


MSP430I2031: Want to know the detailed description of reason of controller reset

$
0
0

Part Number:MSP430I2031

Want to know the detailed description of reason of controller reset.

I am getting the controller reset reason as 02h ( Brownout -BOR) and 0Ah (Security violation -BOR). What is the difference between the two?

Also i have complete list of reset reason and i want to know the detailed description of each of them -

nBit Field Type Reset Description
15-0 SYSRSTIV R 02h- Reset interrupt vector. Generates a value that can be used as address offset for
3Eh(1) fast interrupt service routine handling to identify the last cause of a reset (BOR,
POR, PUC) . Writing to this register clears all pending reset source flags.
00h = No interrupt pending
02h = Brownout (BOR) (highest priority)
04h = RST/NMI (BOR)
06h = PMMSWBOR (BOR)
08h = Wakeup from LPMx.5 (BOR)
0Ah = Security violation (BOR)
0Ch = SVSL (POR)
0Eh = SVSH (POR)
10h = SVML_OVP (POR)
12h = SVMH_OVP (POR)
14h = PMMSWPOR (POR)
16h = WDT time out (PUC)
18h = WDT password violation (PUC)
1Ah = Flash password violation (PUC)
1Ch = Reserved
1Eh = PERF peripheral/configuration area fetch (PUC)
20h = PMM password violation (PUC)
22h to 3Eh = Reserved

 

MSP430FR2153: MSP430FR2153 code for BQ24770

$
0
0

Part Number:MSP430FR2153

Dear Champs,

Our customer hope to use MSP430FR2153 to control BQ24770

Do we have any source code for this or any reference code we could modify it?

If you have any suggestion, please feel free to let me know.

Thanks a lot.

MSP430FW427: The MSP430FW427scanif module does not work properly

$
0
0

Part Number:MSP430FW427

1:The non-magnetic water meter made by our company with MSP430FW427 can be measured when it is delivered for inspection. It will not be measured when it is installed with the client in a few days. Close the scanif module (SIFCTL1=0) and open it again, then it will be measured normally.Could you please prove that the ScanIF module is indeed in trouble?

2:Single chip internal FLASH, which location is stored in the production date, how can we read this date?

3:What caused the scanif module failure?How to solve this problem?Thank you very much!

MSP430G2553: How to use this timer class with a button?

$
0
0

Part Number:MSP430G2553

Hello! I am currently taking a class in programming embedded systems and we recently got this device to do our labs/tasks on.

This week's task is to toggle the red light on and off using the Button (BIT3) and also to write the code in seperate files using header files and classes. 

Anyway, I have got the functonality to work, as in button press --> on, press again --> off. My problem is, I don't understand how to use this timer.c class that we were given. I suppose it's meant to be used in a way so that the debounce problem is fixed?

Here is the code for timer.c

#include "project.h"
#include "led.h"

#include "timer.h"

#define DIVIDER 8
#define TMRC (DCO_FREQ / DIVIDER / 1000 * TIMER_INTERVAL)

static tWord tickCount=0;

void Timer_Init() {

        BCSCTL1 = CALBC1_16MHZ;
        DCOCTL = CALDCO_16MHZ;
        BCSCTL2 = 0x0 ; // MCLK clock source DCOCLK, MCLK divider 1, SMCLK source DCOCLK, SMCLK divider 1

        // Set up interrupts and timer 0

        // Enable interrupts on timer
        CCTL0 = CCIE;

        // Use clock SMCLK, UP counting, divided of 8
        TACTL = TASSEL_2 + MC_1 + ID_3;
       
        // Set compare value
        CCR0 = TMRC;
}

__attribute__((interrupt(TIMER0_A0_VECTOR))) void Timer_A(void) { 
timer_run(); 
} 

tWord getTick() {return tickCount;}

timer_run() {
	tickCount++;
	Led_Update();
}

tWord == unsigned int

#define TMRC (DCO_FREQ / DIVIDER / 1000 * TIMER_INTERVAL) <-- In this lie, nothing is defined and I don't even understand what DCO_FREQ is? TIMER_INTERVAL I think has to be set by the main function which I actually do.

Led_Update is written by me:

void Led_Update() {
	if(status==LED_STAT_ON) {
		RED_LED_PORT |= RED_LED_PIN;
	}
	else {
		RED_LED_PORT &= ~RED_LED_PIN;
	}
}

The status variable changes on button press.

Can anyone give me some tips on how to use the timer class? I also obviously use __enable_interrupt(); in my main class. I have noticed the Timer_A interrupt method runs quite frequently if I manually set CCR0 = 10000; for ex....

Thanks!

MSP-EXP430FR6989: MSP-EXP430FR6989 Data Logging FRAM

$
0
0

Part Number:MSP-EXP430FR6989

Hi there,

im pretty much starting from the scratch when it comes to MCU's and programming. At the moment Im playing around with my MSP-EXP430FR6989 and a simple DHT22 reading temp. and humidity. 
Actually I was wondering how to store the incoming serial data with an additional timestamp e.g. on the board (FRAM?)?

I currently read the data on port 11 with the following loop: 

void loop() { 

   delay(delayMS);
   sensors_event_t event;  
   dht.temperature().getEvent(&event); /* Read temperature value */
   if (isnan(event.temperature)) { /* If temperature value is not a number */
      Serial.println("Error reading temperature!");
   }
   else {
      Serial.print("Temperature : ");
      Serial.print(event.temperature);
      Serial.println(" *C");
   }    
   dht.humidity().getEvent(&event); /* Read humidity value */
   if (isnan(event.relative_humidity)) { /* If humidity value is not a number */
      Serial.println("Error reading humidity!");
   }
   else {
      Serial.print("Humidity : ");
      Serial.print(event.relative_humidity);
      Serial.println("%");
   }
}

ps: I dont need a high sample frequency and also dont need to store data for a long time. 

Regards
Hendrik 

MSP430F5510: BSL via USB : SLAA452C

$
0
0

Part Number:MSP430F5510

Hello All,

Further question from customer:

On the board customer inserted a 2x7 connector to be used with the MSP430 USB-Debug-Interface (MSP-FET430UIF) emulator.
Do you confirm that the migration of CCS Studio to windows 64bit has no impact with the use of the emulator?

Many Thanks,

Antonio
 

MSP430F2616: BGA Programming Adapter

$
0
0

Part Number:MSP430F2616

Hello,

I am trying to find a programming adapter for the 113 pin BGA MSP430F2616TZQWR. I need to build my own programmer for these parts, but nobody seems to be making such things.

Could anybody please lead me to the place where I could get the adapter?

Thank you,

Eugene


MSP430FR5969: Clarification of tSBW, En parameter in UART BSL

$
0
0

Part Number:MSP430FR5969

There appears to be confusion about the length of the first positive pulse on TEST as part of the hardware BSL invocation sequence.  In figure 2 of slau550p, it shows this as tSWB,En, and the datasheet shows a maximum of 110 uS for this parameter.  But the text above Figure 2 says the pulse must be at least tSWB,En.  The G2553 datasheet shows a maximum tSBW,En of 1 uS, but by actual measurement BSLDEMO outputs a 15 mS pulse.  The source code for the Rocket is shown below.   It appears to be trying to exactly match 110 uS, which doesn't tell me if it's treating that as a minimum or a maximum.

Can someone clarify if there is a minimum or maximum length for that pulse to work with ANY MSP430 part?
If it was 10 mS, would that work for everything?

/*** BSL entry sequence *******************************************************/

void BSL_invoke_sequence()
{
  /* BSL invoke sequence 
   *
   *       H -----------+     +--+  +-----+
   * TEST  L            +-----+  +--+     +--------
   *
   *       H --------------+           +-----------
   * RST   L               +-----------+
   *
   *
   *       H -----------------+  +--+     +--------
   * TCK   L                  +--+  +-----+
   */

  // Set RST, TST and TCK pin to output
  ENTRY_SEQ_PDIR |= (RESET_PIN + TEST_PIN + TCK_PIN);

  // (0)Start with RST high, TEST high, TCK high
  ENTRY_SEQ_POUT = RESET_PIN + TEST_PIN + TCK_PIN;
  __delay_cycles(INVOKE_DELAY_100US);
  __delay_cycles(INVOKE_DELAY_100US);

  // (1)RST high, TEST low, TCK high
  ENTRY_SEQ_POUT = RESET_PIN + TCK_PIN;
  __delay_cycles(INVOKE_DELAY_100US);

  // (2)RST low, TEST low, TCK high
  ENTRY_SEQ_POUT = TCK_PIN;
  __delay_cycles(INVOKE_DELAY_2US);

  // (3)RST low, TEST high, TCK low
  ENTRY_SEQ_POUT = TEST_PIN ;
  __delay_cycles(INVOKE_DELAY_110US);

  // (4)RST low, TEST low, TCK high
  ENTRY_SEQ_POUT = TCK_PIN;
  __delay_cycles(INVOKE_DELAY_10US);

  // (5)RST low, TEST high, TCK low
  ENTRY_SEQ_POUT =TEST_PIN;
  __delay_cycles(INVOKE_DELAY_100US);

  // (6)RST high, TEST high, TCK low
  ENTRY_SEQ_POUT = RESET_PIN + TEST_PIN;
  __delay_cycles(INVOKE_DELAY_100US);
  
  // (7)RST high, TEST low, TCK high
  ENTRY_SEQ_POUT = RESET_PIN + TCK_PIN;
  __delay_cycles(INVOKE_DELAY_100US);
  __delay_cycles(INVOKE_DELAY_100US);

  // Set RST, TST and TCK pin to input
  ENTRY_SEQ_PDIR &= ~(RESET_PIN + TEST_PIN + TCK_PIN);
}


MSP430F5510: Multiple issues

$
0
0

Part Number:MSP430F5510

Hi,

As per our communication, we thought to disconnect VUSB pin from input voltage pins (DVCC and AVCC) in order to check whether the voltage is getting dropped due to excess current or due to some other reason. During troubleshooting, we found that even if VUSB pin is disconnected from all other pins, the voltage we received over VUSB was same as earlier i.e. 1.5 V in this specific case. We then checked voltage on the input voltage pins (DVCC and AVCC) and shocked to found that they are also giving 1.5 V, even though they are physically disconnected from VUSB pin.

 

This points us to believe that the exposure of chips to humidity has permanently damaged them because of higher soldering temperature. However, to confirm the same, we will have to bake remaining ICs and then check if all of them are working as desired

Hope that we are on the right path

Regards

Atul Bhakay

MSP430F5418A: Updating Application Firmware with the MSP BSL , I meet some problems.

$
0
0

Part Number:MSP430F5418A

Address allocation

boot:0x5c00-0x6bff

xcl file of the boot:
-Z(CODE)INTVEC=0xFF80-0xFFFF
-Z(CODE)RESET=0xFFFE-0xFFFF

app:0x6c00-0xfcff   0x10000-0x15672

xcl file of the app:
-Z(CODE)INTVEC=0x15F80-0x15FFF
-Z(CODE)RESET=0x15FFE-0x15FFF

I want to jump to the app from the boot,and  try to use the mov command -----asm("mov &0x15FFE,PC;");   , but  compile error.

the error information is:

Error[Og006]: Error in inline assembly: "Error[433]: Address out of range. Valid range is 0 to 65535 (0xFFFF)." 

so  how to jump to the address 0x15ffe in the boot code?

thanks!

RTOS/MSP432E401Y: MSP432E401Y - I2C EEPROM PROGRAM

$
0
0

Part Number:MSP432E401Y

Tool/software: TI-RTOS

Hi..

can any one help me on this code. I am using msp432e401y launchpad with at24c256 eeprom. i am writing the data for a particular address and  then reading the data from the same address.

In the output i am getting FF FF . My code is:

   /* Create I2C for usage */ 

#define Board_EPROM_ADDR 0x50

   I2C_Params_init(&i2cParams);

   i2cParams.bitRate = I2C_400kHz;

   i2c = I2C_open(Board_I2C_TMP, &i2cParams);

   if (i2c == NULL)

   {

       UART_write(uart4, echoPrompt2, sizeof(echoPrompt2));

       while (1);

   }

   else

   {

       UART_write(uart4, echoPrompt3, sizeof(echoPrompt3));

   }

 

       /**************** I2C ****************/

       //unsigned int address   =   0x00;

       uint16_t   address=0x0000;

       uint16_t   read_address=0x0000;

 

       txBuffer[0] = (address   >> 8);       //MSB

       txBuffer[1] = (address &   0xFF);     //LSB

       txBuffer[2] =   0x33;

 

       i2cTransaction.slaveAddress = Board_EPROM_ADDR;

       i2cTransaction.writeBuf = txBuffer;

       i2cTransaction.writeCount = 3;

       i2cTransaction.readBuf = NULL;

       i2cTransaction.readCount = 0;

 

       if (!I2C_transfer(i2c, &i2cTransaction))

       {

               GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);

               /* Bad I2C transfer */

               while (1);

       }

 

       sleep(1);

 

       rxBuffer[0] = (read_address   >> 8);       //MSB

       rxBuffer[1] = (read_address &   0xFF);     //LSB

 

 

       i2cTransaction2.slaveAddress = Board_TMP_ADDR;

       i2cTransaction2.writeBuf = NULL;

       i2cTransaction2.writeCount = 0;

       i2cTransaction2.readBuf = rxBuffer;

       i2cTransaction2.readCount = 2;

 

       if (I2C_transfer(i2c, &i2cTransaction2))

       {

           GPIO_write(Board_GPIO_LED1, Board_GPIO_LED_ON);

           UART_write(uart4, &rxBuffer[0], 1);

           UART_write(uart4, &rxBuffer[1], 1);

       }

 

 

   /* Deinitialized I2C */

   I2C_close(i2c);

and the details for at24c256 is attached :

Thank you

Regards

Kalyan.

MSP430F5419A: RST pin - internal port diagram

MSP430F168: Probing I2C SCL line from CRO causing I2C to stop working

$
0
0

Part Number:MSP430F168

Dear sir,

In I2C we are fessing some problems (100KHz only)

ie . 1. some PCB's working properly and some  PCB's it is not working and in not working pcb if we connect CRO it is working and in working pcb CRO connecting time it is failing and CLK going to LOW

2. in some PCB's not working and putting CRO also it is nit working.

3. in SDA pin putting 100nf to ground then it is working.

In PCB tracks lent matching is OK and we are tried inter phasing externally with wires also not working.

Can we try in former ware side?

 My Mail ID : nsprateep@sirveen.com

MSP430FR2433: Why the VLOCLK Frequency is getting reduced when controller is going from ACTIVE mode to LPM3 mode ?

$
0
0

Part Number:MSP430FR2433

Hi,

I just want to know the reason why  VLOCLK Frequency is getting reduced when controller is going from ACTIVE mode to LPM3 mode ?

Thankyou,

Manideep


MSP430FR4133: Which TI product to use?

$
0
0

Part Number:MSP430FR4133

Hello,

Currently I am thinking to transfer my application to TI products, therefore I'm just gathering information for now.

At the moment I use Microchip/Atmel MCU ATmega328P as MCU, HT1621 as LCD driver (for segment LCD) and RFM69HW RF transceiver module for data transferring (868 MHz) from node to gateway. My project is running on 2xAA batteries.

I have read a lot of documentation and came to a conclusion that I could use MSP430FR4133 MCU which has LCD driver built-in.

But my main concern is wireless connection. What would be the alternative to RFM69HW transceiver module? I have tried to move from RF to Wi-Fi by using ESP8266 but that thing is failing on batteries after waking up from sleep and draining battery constantly with some burst current about 150mA or smth.

If I go RF direction, would it be CC1100? Is it possible to implement OTA (Over-the-air) updates? But probably OTA will not be possible for node which is sleeping right? Battery usage is a concern and node can't be online all the time.

If I go Wi-Fi direction, would it be CC3100MOD? If yes, then my main concern with CC3100MOD is that I would need to match antenna, because I don't have a place in the case to use U.FL antenna. I would need to use PCB antenna (2.4 GHz).

In both ways (RF or Wi-Fi) I am interested in modules, not just chips and possibility for OTA. I'm not an everyday engineer, just a student for now.

Regards,

furieux

CCS/MSP430FR6989: MSP430 FR 6989 read data from a computer file

$
0
0

Part Number:MSP430FR6989

Tool/software: Code Composer Studio

Hi,

During past 2 weeks I worked with the MSP430FR6989 Launchpad kit and developed various mini-projects.

In the past 2-3 days I tried to make a clock, which takes the date and time from computer and display it on the LCD (to send the date and time from computer to the board, in real time). I managed to create the clock application, but I have to set the date and time manually with the buttons on the board (or I can initialize the values of day/month/year/hour/minutes/seconds in the C program, but this is not the task I have to do).

From what I heard, I need to make some kind of UART connection, but I did not manage to go any further with this solution.

What can I try to do at the moment is to store the date and time in a specific file on the PC and read the information from there, but I can not find a way to do so.

Can you please give  me an idea on how I can read some information from a PC file or get the date from PC automatically? A link to a .pdf document or tutorial would be really appreciated (what I basically need is to send a 32 bit integer value to the board on real time to display the date and time, the informations are compressed on a 32 bit integer).

CCS/MSP430FR6989: MSP430 FR 6989 read data from a computer file

$
0
0

Part Number:MSP430FR6989

Tool/software: Code Composer Studio

Hi,

During past 2 weeks I worked with the MSP430FR6989 Launchpad kit and developed various mini-projects.

In the past 2-3 days I tried to make a clock, which takes the date and time from computer and display it on the LCD (to send the date and time from computer to the board, in real time). I managed to create the clock application, but I have to set the date and time manually with the buttons on the board (or I can initialize the values of day/month/year/hour/minutes/seconds in the C program, but this is not the task I have to do).

From what I heard, I need to make some kind of UART connection, but I did not manage to go any further with this solution.

What can I try to do at the moment is to store the date and time in a specific file on the PC and read the information from there, but I can not find a way to do so.

Can you please give  me an idea on how I can read some information from a PC file or get the date from PC automatically? A link to a .pdf document or tutorial would be really appreciated (what I basically need is to send a 32 bit integer value to the board on real time to display the date and time, the informations are compressed on a 32 bit integer).

I need to undertand about Cortex M4 registers in STM32 boards

$
0
0

 How we can understand the working of core registers in STM32 board and specially Stack pointer and and program status register? give me full description .

Thank you

CCS/MSP430FR2111: I do not know what to start with...;(

$
0
0

Part Number:MSP430FR2111

Tool/software: Code Composer Studio

Dear TI crew,

I bought 3 products,

MSP430FR2111IPW16R

and, it's development board

MSP-TS430PW20

and, it's flash emulation tool

MSP-FET.

However, I cannot find instruction PDF, and I can drive these products.

So, please tell me how to drive these products.

I have downloaded and installed CCS and MSP430ware.

I want to drive Analog-to-Digital Converter with external reference voltage,

and observe ADC output by oscilloscope after converted to analog wave by Digital-to-Analog Converter in real time.

That I what you to tell me is 5.

1) Which programming language is for MSP430FR2111IPW16R, C or Assembly?

2) Whare should I wire such as Vin, external reference voltage, into external pin on MSP-TS430PW20?

3) What should I do to drive Analog-to-Digital Converter with external reference voltage,

and observe ADC output by oscilloscope after converted to analog wave by Digital-to-Analog Converter in real time?

4) How should I program?

And how should I synchronize that program with MSP430FR2111IPW16R by CCS?

5) Which is instruction PDF  that written I want to know?

What should I do?

I'm sorry for my unskilled English letter.
I am very very looking forward to your reply.

TIの皆様
いつもお世話になっております。

さて、先日研究に使用するために、TIの
MSP430FR2111IPW16R
と、その評価用ボード
MSP-TS430PW20
評価ツール
MSP-FET
の3点を購入させていただきました。

しかし、マニュアルがどれかいまいち分からず、どのファイルも英語なので動かすことができません。

なので、動かし方を教えてほしいです。

現在、CCSとMSP430WAREをダウンロード&インストールしたところです。

私がしたいことは、ADCを外部基準電圧を使って動かして、その出力結果をリアルタイムで変換してオシロスコープで確認したいです。

知りたいことは5点あります。

MSP430FR2111IPW16Rは何の言語でプログラミングするか。c言語なのかアセンブリなのか。
評価用ボードにどのように電源などを配線すればいいか。
外部基準電圧を使用してADCを動作させて、ADCの出力結果をリアルタイムでDACで変換してオシロスコープで表示するにはどうすればいいか。
プログラミングしたコードをMSP430FR2111IPW16Rに同期して動かすにはどのようにすればいいか。
これらの方法が書いてあるマニュアルはどのファイルなのか。

お手数ですが教えていただけないでしょうか。
よろしくお願いいたします。

Viewing all 21954 articles
Browse latest View live


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