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

F16x source code EZ430 FET?

$
0
0

Is the source code for the F16x uC in the EZ430 FET (on the 'F5529 eval board, or any other) available? 


how to use MSP430F5529 LaunchPad software demo?

$
0
0

Hi

Today, I started with the MSP430F5529 LaunchPad™. In the user guide, it said this evm has software demo presents two USB interfaces: 

Mass Storage Class (MSC)

Human Interface Device (HID)

and when plug the kit in a windows system, it shows 

Can someone help to explain how to use this software demo? what is it, anything else I need to install to make it work. ? 

Thank you very much!

B.r

Ji

eeprom with cc430

$
0
0

Hi,

I work with the cc430f5317 MCU, in my project I need to add an EEPROM 93lc46b but I find no example. I'm beginner with the use of EEPROM.
someone can help me,

thank you.

MSP432 external voltage reference

$
0
0

Hi,

I'm working on a design for measuring low voltage(+/- 50mV) with high accuracy. I'm using the MSP432 for its 14 bit ADC and I wanted to improve the accuracy by using a precision voltage reference. I'm testing my design with an AD589KH as my voltage reference and am powering it with the 5v rail from the board and a 1k resistor to drop the voltage. I can get the 1.225v that I'm expecting, but when I connect it to the Vref+ pin and ground to the Vref- pin my reference voltage drops to .335v. This resulted in all of my ADC readings returning my max expected voltage of 1.225 when I mapped my digital readings back to a voltage. I'm using Energia to program it and am seeing about 6mV of error from an Agilent handheld DMM when using the internal reference.

Another issue I'm seeing is that when my ADC pins are connected to my breadboard with a test power supply turned off, I'm expecting to see 0v, but instead I see between .5v and 1v. When the supply is turned on that offset seems to disappear.

My board also gets hot when in use, which I've seen in other threads so I'm not sure if that's is contributing to the issues I'm experiencing or not.


Thanks for the support.

CC2650

$
0
0

I am using the Launchpad-XL to develop a BLE sensor. Now I have custom hardware using a DIFFERENT CC2650 hardware footprint - 7x7 is on the Launchpad, while I have a 4x4 device...

How do I properly re-map the GPIO to the newer (fewer pins) ?

Thanks, Al

Z-STACK-ENERGY - Medium or large data model?

$
0
0

We are running Z-Stack-Energy-1.1.0_2.6 on MSP430F5359. This device has 66KB RAM. Unfortunately, the Z-Stack libraries are built using the EW430 Small data model, so we can directly access only the low 16KB of RAM. Our application needs to use more than that, so we would like to build using the Medium or Large data model.

We would like to request that TI provide us the Z-Stack libraries rebuilt using the Medium or Large model. Is this reasonable?

Thanks,

Andy

Duty cycle using interrupts

$
0
0

HI TI Experts,

I am using following code to generate duty cycle for sending data through ez430-rf2500 product.

My questions are as follows:-

1) I am using timer A for duty cycle in which I set TACCR0  = 30000 which is equivalent to 2 to 3 seconds. Correct me if I am wrong. So after every 2 to 3 seconds ISR runs code which is under __interrupt void Timer_A (void) which produces duty cycle of time period 2 to 3 seconds. I want to generate duty cycle equivalent to 10 to 15 seconds, how will it be possible using interrupts with Timers ?

2) Can you tell me if there are any other Timers where we can accommodate 10 to 15 seconds, and can you elaborate the frequency of clocks and how it works??

3) If you need any further info, let me know?

Code attached below:- 

#include "mrfi.h"

#define MYADDR  0x09
#define MYX     0x03
#define MYY     0x07
#define NEXTHOP 0x01
__no_init volatile int tempOffset @ 0x10F4; // Temperature offset set at production

mrfiPacket_t packetToSend;

uint8_t get_temperature() {
  int degC;
  volatile long temp;
  ADC10CTL1 = INCH_10 + ADC10DIV_4;     // Temp Sensor ADC10CLK/5
  ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + ADC10SR;
  for( degC = 240; degC > 0; degC-- );  // delay to allow reference to settle
  ADC10CTL0 |= ENC + ADC10SC;           // Sampling and conversion start
  __bis_SR_register(CPUOFF + GIE);      // LPM0 with interrupts enabled
  degC = ADC10MEM;
  ADC10CTL0 &= ~ENC;
  // oC = ((A10/1024)*1500mV)-986mV)*1/3.55mV = A10*423/1024 - 278
  // the temperature is transmitted as an integer where 32.1 = 321
  // hence 4230 instead of 423
  temp = degC;
  degC = (((temp - 673) * 4230) / 1024);
  if( tempOffset != 0xFFFF ) {
    degC += tempOffset; 
  }
  return (uint8_t)(degC&0xFF);
}
uint8_t get_battery() {
  int battery=0;
  ADC10CTL1 = INCH_11;                     // AVcc/2
  ADC10CTL0 = SREF_1 + ADC10SHT_2 + REFON + ADC10ON + ADC10IE + REF2_5V;
  for( battery = 240; battery > 0; battery-- );    // delay to allow reference to settle
  ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start
  __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled
  battery = ADC10MEM;
  ADC10CTL0 &= ~ENC;
  ADC10CTL0 &= ~(REFON + ADC10ON);        // turn off A/D to save power
  battery = (battery*25)/512;
  uint8_t batterybyte = battery&0xFF;
  return batterybyte;
}

int main(void) {
  BSP_Init();
  //enable the button
  P1DIR &= ~0x04;
  P1REN |=  0x04;
  P1OUT |=  0x04;
  P1IE  |=  0x04;
  //initialize the radio
  MRFI_Init();
  MRFI_Sleep();
  
  //__delay_cycles(80000000);
  //MRFI_WakeUp();
  //MRFI_RxOn();
  //initialize the timer
  BCSCTL3 |= LFXT1S_2;
  TACCTL0 = CCIE;
  TACCR0  = 30000;  //initialize to ~3 second
  TACTL   = MC_1+TASSEL_1;
  __bis_SR_register(GIE+LPM3_bits);
}

#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void) {
  
  //initialize the radio
  MRFI_WakeUp();
  
  //P1OUT ^= 0x01;
  // change timer randomly
  uint16_t fixed_part, random_part, random;
  fixed_part     = 10000;
  random_part  =  MRFI_RandomByte();
  random_part |= (MRFI_RandomByte()<<8);
  random_part  = random_part%20000;
  random       = fixed_part + random_part;
  TACTL = MC_0;
  TAR = 0;
  TACCR0 = random;
  TACTL = MC_1+TASSEL_1;
  //fill packet
  uint8_t  temperature =  get_temperature();
  uint8_t  battery     =  get_battery();
  packetToSend.frame[0]              = 13; //length
  packetToSend.frame[1]            = 0x01;
  packetToSend.frame[2]            = 0x00;
  packetToSend.frame[3]            = 0x00;
  packetToSend.frame[4]            = MYADDR;
  packetToSend.frame[5]            = 0x00;
  packetToSend.frame[6]            = 0x00;
  packetToSend.frame[7]            = 0x00;
  packetToSend.frame[8]            = NEXTHOP;
  packetToSend.frame[9]            = MYX;
  packetToSend.frame[10]           = MYY;
  packetToSend.frame[11]           = 0x01;
  packetToSend.frame[12]           = temperature;
  packetToSend.frame[13]           = battery;
  
  //send packet
  MRFI_Transmit(&packetToSend, MRFI_TX_TYPE_FORCED);
  MRFI_Sleep();
  
  //delay
}

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

void MRFI_RxCompleteISR() {
  //when I receive, I do nothing but toggling a LED
  P1OUT ^= 0x02;
}

#pragma vector=PORT1_VECTOR
__interrupt void Port_1 (void) {
  //the button is not used, I reset the interrupt flag to avoid loops
  P1IFG &= ~0x04;
}

MSP430 Get CPU Core register value from C code

$
0
0

Hello!

I have a problem with TI Compiller (4.3.3) and CCS6.
I need to get and store in to varible Core Register value (for example R11).
In GCC I usually use the code like this:

volatileint*i __asm(" R11");

Or like this:

__asm("mov (%0), %%bl"::"r" (y) :"%bl");

But in TI compiller this way is doesn't work:
#1493-D GCC-style explicit register variables are not supported main.c

How can I do it in TI Compiler? What is the best way for do this?

Best regards,
Alexander


I2C and SPI combined on UCB0 generate a Conflict

$
0
0

Dear all, 

I have two modules connected on the demo board. One operates with I2C and the other operates with SPI. I have mapped the pins of the I2C to port 2 BIT4 and BIT5. The SPI module uses the standard Port 1 BIT1 -> CS, BIT2 -> MISO, BIT3 -> MOSI and BIT4 -> CLK.  Both uses UCB0 to initialize and measure the values of the modules. Initialization is done one after the other. The modules work fine separately, but when combined in a while loop together. The SPI module doesn't react.

while(1){

/* The first loop SPI and I2C modules return correct results, 
   then the 2nd time SPI_Measure(); hangs. Data are not being read correctly.
*/
SPI_Initialize();    
delay_ms(200);
SPI_Measure();
    
delay_ms(1000);

I2C_Initialize();
delay_ms(200);
I2C_Measure(); 
	
}

 Note that both works Separately perfect. I checked the registers as well and each initialization gives the correct register values. So initialization is not an issue. 

Any idea about this problem I would be more than thankful. 

 

P1IN - Recording Value

$
0
0


I wonder if it is possible to save the digital value of one of my MSP430g2553 input pins in a variable to use it later. The idea is to save the values ​​in an array and then compare with other previously established vector, but do not know how to do this . Thanks in advance.

where can i get the latest source code of "msp432_startup_ewarm.c" (BSD Release of MSP432 Driver Library)?

$
0
0

I have the file msp432_startup_ewarm.c, but the version is very old as follow:

* -------------------------------------------
* MSP432 DriverLib - v2_20_00_08
* -------------------------------------------
*
* --COPYRIGHT--,BSD,BSD
* Copyright (c) 2014, Texas Instruments Incorporated
* All rights reserved.

I have also got the lastest driverLib(V3_21_00_05), but the lib don't include file "msp432_startup_ewarm.c", so where can i get the latest version of "msp432_startup_ewarm.c"?

Thanks~~

To use the Captivate on multiple devices in a single system

$
0
0

Hi,

My customer would like to use the Captivate function using more than one device.
Doesn't a problem occur to a sensing of one device by a sensing of other devices at the same time?

When being affected, is there a way to reduce the influence?

Regards,

Da

MSP432LaunchPad male & female connector CRD-081413-A-F (LaunchPad Component Store) problem

$
0
0

I'm designing my own boosterpack board for MSP432 LaunchPad now.

I noticed that I need special connector to connect it with MSP432 LaunchPad.

What I need is 

CONN HEADER 20POS .100" DUAL, FEMALE with long male leads CNT-F254-2*10-GS-850-9

I find the link to the store all right. 

http://www.retrodesignlab.com/LaunchPad/store/#!/CRD-081413-A-F/p/29462048/category=6922288

CRD-081413-A-F
2x10 female socket

2.54mm pitch

Through hole straight type

Gold Flash Plated

$0.56

It's cheap!  I need two CRD-081413-A-F = $1.12 all right. 
But I must pay $86.74 for shipping them to Japan!

Are there any compatible connector, which I can purchase at RS-Components or Digi-key?

I don't want to spent so much money as shipping cost!

How to use msp432 with cc3100 and free rtos?

$
0
0

Hi.

I want to send some tcp packets using cc3100 with msp432. Also I am using Free RTOS as my choice of RTOS. Does anyone know how to get the simplest application up and running with free rtos, msp432 and cc3100.

Any help would be valuable. Thanks.

TCA5013EVM performing I/O on the smart card interfaces

$
0
0

Hey,

I'm a student in information technology/electrotechnics and I try to get my hands on smart card technology. For this purpose I bought the TCA5013EVM board to use in combination with the MSP450 LaunchBoard. I already looked at the specs and the source code provided for the TCA5013 and managed to get the basic communication up and running. For now I am able to use the sample program to configure the SAM/UC via I2C. This does not allow me however, to communicate with a SAM or UC directly, which is what I am most interested in.
As I understand from the datasheet, I need an additional serial communication via IOMC1 (for UC), or IOMC2 (for SAM), however I think the TCA5013 already got a serial connection to the card. Why is that necessary? Is the TCA5013 only capable of relaying the signal on those pins to the cards, or is it possible to write commands to a register of the TCA5013 for it to send the command automatically? Is there any sample code for communication to the smart cards interfaces?

Also, is there a way to read the complete ATR from the device, since I could only find how to read from the buffer that stores the first 4 byte.

Thanks in advance,
Till


Stack Usage query

$
0
0
Hello Sir/Ma'am,
 
Following mail is related to query for stack usage.
We are using IDE Code Composer Essentials V3.1 for our microcontroller platformMSP430F47177 with 92kB falsh and 8kB RAM
 
In Compiler settings,
From Toolbar menu---Project---Properties---C/C++Build---Tool Setting---RunTime Environment
I've changed my STACK Size from 1792 to 1728 and Heap from 80 to 40.
Allthough there's no dynamic usage at runtime for Heap utilization in my code.
We find our code to malfunction because of change in above settings.
 
So I request you to clarify the STACK settings as in how it needs to be defined or how it can be calculated for the maximum length if by any means.
I found cg_xml utility to find the static STACK size of sections but it takes input file type xml. I've been using CCSv3 and don't find xml file in my output sections.
Please guide if there's another way to cg_xml utility usage.
Kindly help urgently for above issue.
 
Regards
Ashwani

MSP430F427A SD16 ADC sampling issue

$
0
0

I am using MSP430F427A with SD16 ADC for single phase energy meter application.

When I set the SD16 for higher sampling rate (4Mhz) then the sample values gradually decrease even if the input is kept unchanged, and sets down after few minutes to a constant value. But if I decrease the sampling rate (to say 1MHz), the sample values are stable.

I am new to the MSP430 world, please suggest any solution.

Thanks in advance.

Need to reflash MSP-EXP430F5529LP

MSP430FR5959 BSL Help

$
0
0

I know there are dozen of questions about BSL on the forum but i cant seem to head in the right direction.

I am hoping someone can set me straight. I have a custom board that has a MSP430FR5959. It has a RS232 chip connected to UCA0 UART.I normally load code using MSP-FET using JTag. I would like to reprogram this board over the RS232 port. This board had buttons connected to it.. so i can initiate any start sequence directly from code. I want to use the MSP-FET programmer. I can connect a rs232 chip to the rx/tx pins of the the MSP-FET programmer.  Below is a stripped down copy of my schematic. Can what i want to be done be done with what i have? Im using CCS6.1. I have the bsl-scripter-windows software.  Thank you  

MSP430FR6979 CONTROLLER DESIGN ISSUE

$
0
0

Hi Ti Members

We are selecting MSP430FR6979 for our project.But we are facing some design challenges which are following:-

1) We are using 50th no. pin (P1.1/TA0.2/TA1CLK/COUT/A1/C1/VREF+/VeREF+) as a VeREF+ and given 2.5 V externally so how much value of capacitor we have to put on this power rail and why?

2) Some pins we are not using (like some GPIO's) then what will we do with this pin in our design.

Viewing all 21975 articles
Browse latest View live


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