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

MSP430FR6989: MSP430FR6989

$
0
0

Part Number:MSP430FR6989

Hi,

I want to measure the IV characteristic for an organic device and in order to do that I connect this device wiht an external circuit and I want to generate the voltage from MCU with a fixed time delay between steps, the voltage range is from 0 V to 3 V, the step increment could be any small number ,while the voltage is applied I want to read the output of the external circuit at each point using the ADC and save that output in order to plot the IV at the end, I wrote this code but it does not work properly. I'm still not aware to how to save the outputs , how to apply the delay.

#include <msp430fr6989.h>

#define PERIOD_PWM 4000

unsigned int j;
unsigned int i;
unsigned int adc_value[1] = {0};
float adc_value_volts[1] = {0};

_Bool flag_start = 0;

void init_tim_a(void);
void init_ADC(void);
void init_gpio(void);
void init_dco(void);

void main(void)
{


WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5;

init_dco();

init_gpio();

init_tim_a();

init_ADC();


_enable_interrupt();
ADC12CTL0 |= ADC12SC;

while(1)
{

for(i=0;i<=5095;i=i+200)
{
TA0CCR0 = (i*PERIOD_PWM/3.3) - 1;
TA0CTL |= MC_2;
_delay_cycles(100000000);//delay
if(flag_start == 1)
{
ADC12CTL0 |= ADC12SC; // Start ADC
flag_start = 0;
adc_value_volts[0] = adc_value[0]*3.3/4095;
//Y11_out=adc_value_volts[1];
}
TA0CTL &= ~MC_0;
}
//}
}
}

void init_ADC(void)
{
P8SEL0 |= BIT7;//|BIT6|BIT5|BIT4; // P8.7, P8.6,P8.5,P8.4 ADC option select
P8SEL1 |= BIT7;//|BIT6|BIT5|BIT4;

ADC12CTL0 &=~ADC12ENC;

ADC12CTL1 |= ADC12CONSEQ_1;
ADC12CTL0 |= ADC12SHT0_5 |ADC12SHT1_5 | ADC12ON|ADC12MSC;
ADC12CTL1 |= ADC12PDIV__1|ADC12SHP|ADC12DIV_5|ADC12SSEL_0;
ADC12CTL2 |= ADC12RES_2;
ADC12IER0 |= BIT0;//|BIT1|BIT2|BIT3|BIT4|BIT5|BIT6|BIT7|BIT8;; // Enable interrupt

ADC12MCTL0 = ADC12INCH_4|ADC12EOS;

ADC12CTL0 |= ADC12ENC;

} // ADC_init

void init_dco(void)
{
FRCTL0 = FRCTLPW | NWAITS_2;

CSCTL0_H = CSKEY >> 8; // Unlock CS registers
CSCTL1 = DCOFSEL_5|DCORSEL; // DCO = 24 MHz
CSCTL3 = DIVA_0 | DIVS_0 | DIVM_0;
CSCTL0_H = 0; // // Lock CS registers
}

void init_tim_a(void)
{
TA0CCR0 = PERIOD_PWM/2 - 1;
TA0CCR1 = PERIOD_PWM - 1;
TA0CCTL0 = CCIE;
TA0CCTL1 = CCIE;
TA0CTL = TASSEL_2 | ID_0 | MC_2;


}


void init_gpio(void)
{
P1DIR |= BIT5|BIT6;
P1OUT |= BIT5;
}


#pragma vector = TIMER0_A0_VECTOR
__interrupt void CCR0(void)
{
P1OUT &= ~BIT5;
}

#pragma vector = TIMER0_A1_VECTOR
__interrupt void CCR1(void)
{
if(TA0CCTL1&CCIFG == CCIFG)
{
TA0CCTL1 &= ~CCIFG;

P1OUT |= BIT5;

TA0R = 0;
}
}

#pragma vector = ADC12_VECTOR
__interrupt void adc_isr(void)
{
switch(ADC12IV)
{
case 0: break;
case 2: break;
case 4: break;
case 6: break;
case 8: break;
case 10: break;
case 12: // Vector 12: ADC12IFG0
{
adc_value[0] = ADC12MEM0;
flag_start = 1;

} break;


default: break;
}
}

 


MSP430BT5190: MSP430 crash

$
0
0

Part Number:MSP430BT5190

Hi all.

this issue is random, I do not know the reason.

the mcu erase internal flash, it has a very low probability of crash.

please refer my code.

erase_NumberOfBank(0x10000,3);

P.S. code memory address 0x10000h - 03FFFFh unused.

void erase_NumberOfBank(unsigned long int start_address,unsigned char numberofbank)
{
  unsigned long int *Flash_Ptr; // Flash pointer
  unsigned int j;
  // __disable_interrupt(); // 5xx Workaround: Disable global
  // interrupt while erasing. Re-Enable
  // GIE if needed
  for (j=0;j<numberofbank;j++)
  {
    Flash_Ptr = (unsigned long int *)(start_address + 0x10000*j); // Initialize Flash pointer
    //while(BUSY & FCTL3); // Check if Flash being used
    FCTL3 = FWKEY; // Clear Lock bit
    FCTL1 = FWKEY + MERAS; // Set Erase bit
    *Flash_Ptr = 0; // Dummy write to erase Flash segment
    //while(BUSY & FCTL3); // Check if Erase is done
    FCTL1 = FWKEY; // Clear Erase bit
    FCTL3 = FWKEY + LOCK; // Reset LOCK bit 
    while(BUSY & FCTL3); // Check if Erase is done
  }
  // __enable_interrupt();
}

Thank you

CCS/MSP430FR5969: ADXL345 ACCELEROMETER DEVID READING USING I2C

$
0
0

Part Number:MSP430FR5969

Tool/software: Code Composer Studio

hii..this is harikrishna..

i am strugleing to read device id of adxl345 accelerometer using i2c protocol in msp430fr5969..so any one please share the program...it helps me a lot

MSP432P401M: RESET,

$
0
0

Part Number:MSP432P401M

I have designed a board in which I have put MSP432P401M on board by following the schematic give for the MSP-EXP432P401R launchpad.

When I tested the circuit with a basic code of making one pin high on CCS the micro-controller is getting reset again and again.

I have attached the schematics of the micro-controller below.

I also tried to pull up and pull down the respective pins on the JTAG as given in the datasheet but to no avail.

Any help would be appreciated.

Thank you in Advance.

Viswanath.

MSP430G2452: Programming external chip with on-board emulator

$
0
0

Part Number:MSP430G2452

I have a MSP430G2 launchpad kit, which comes with a msp430g2553 mounted development board and a msp430g2452 chip. I got the msp430g2452 chip working on a breadboard with a pre-installed program. But, it is very difficult to swap them over and over again for programming. So, I was trying to use the on-board emulator. I connected vcc, Rst, TEST as prescribed. I wired up RxD to P1.1 and Txd to 1.2. But, every time I get an error saying (the selected serial port tilib:device initialization failed  board not connected or does not exist. How to fix this?  

MSPMATHLIB: do not using file/module named "version.c/.h" and MSPMATHLIB

$
0
0

Part Number:MSPMATHLIB

Dear all,

I was about to post an issue but I found the answer so I am posting both here :

I was trying to use MSPMATHLIB with IAR EWB V7.0.5, MSP430 tools version 6.10.1.

I first went on the page explaining mathplotlib   which is explaining how the library works, but the part explaining how to use it is apparently outdated since the library is already included in IAR and CCS.

To use it I then followed IAR recommandations : go to my project/Options/General Options/Library and tick "use MathLib". I also included "math.h" in the files using math functions.

But when compiling, the linker throwed the following Error : Error[e6]: Program module version redeclared in file C:\Program Files (x86)\IAR Systems\Embedded  Workbench 7.0\430\lib\MathLib\MSPMATHLIB_IAR_msp430_5xx_6xx_FRxx_large_code_small_data.lib


The source of the error is that I had a "version.c/.h" files in my code, and the mathlib seems also to be using a module named "version". So I guess if you want to use it, you have to rename all your "version" files to some other name.

MSP432P401R: Board is getting heated .

$
0
0

Part Number:MSP432P401R

We are participating in the IICDC competition 2017-18 sponsored by TI. We are using MSP432 board for our project. The MSP432 IC is getting heated while the code is being executed on the board. The 3.3v on the board is shorted with the ground pin.

Kindly help us out with the issue as we need to submit the product demo on 26th February,2018.

CCS/MSP432P401R: How to change the path for the build variables?

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

I'm trying to build the SimpleLink Voice Detection provided tirtos, but the "pthread.h" and "semaphore.h" files are throwing an error, because in the newer version the POSIX header are at different paths.

I tried to copy those files to the older paths (sysbios\posix) but some other header file will throw an error.

How can i specify the new path for all the header paths?


MSP430G2553: why Crystal included in MSP430Gxx launch pad kit

$
0
0

Part Number:MSP430G2553

Hi all,

I have a doubt, why a piece of crystal was included in MSP430G launch pad kit.

What is use of that? On which case we need to use tat one?

In MSP430G2553, having internal oscillator?

Regards,

Anbu.

MSP430F5438A: Permanent flash damage

$
0
0

Part Number:MSP430F5438A

Hello,

Is it possible to have the flash memory permanently damaged because of a power off during a write / read / erase operation ?

With "permanently damaged" I mean permanent loss of functionality at hardware level -> unable to write again / unstable data / etc...

Best regards,

Mário

CCS/MSP432P401R: unable to upload project zero msp432 - boostXL CC2650moda

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

following errors were shown while debugging the imported example file 'project zero':

[

"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 clean -O

DEL /F "project_zero_MSP_EXP432P401R_tirtos_ccs.hex" "project_zero_MSP_EXP432P401R_tirtos_ccs.out"
DEL /F "MSP_EXP432P401R.obj" "cc2640r2lp_simple_np_uart_pm_sbl.obj" "main_tirtos.obj" "platform_msp432p401r.obj" "project_zero.obj" "Profile\button_service.obj" "Profile\data_service.obj" "Profile\led_service.obj" "Profile\profile_util.obj" "sbl\sbl.obj" "sbl\sbl_cmd.obj" "sbl\sbl_image_int.obj" "sbl\sbl_simplelink.obj" "sbl\sbl_tl.obj"
DEL /F "MSP_EXP432P401R.d" "cc2640r2lp_simple_np_uart_pm_sbl.d" "main_tirtos.d" "platform_msp432p401r.d" "project_zero.d" "Profile\button_service.d" "Profile\data_service.d" "Profile\led_service.d" "Profile\profile_util.d" "sbl\sbl.d" "sbl\sbl_cmd.d" "sbl\sbl_image_int.d" "sbl\sbl_simplelink.d" "sbl\sbl_tl.d"
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\project_zero_MSP_EXP432P401R_tirtos_ccs.hex
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\MSP_EXP432P401R.obj
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\Profile\button_service.obj
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\sbl\sbl.obj
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\MSP_EXP432P401R.d
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\Profile\button_service.d
Could Not Find C:\Users\Admin\workspace_v7\project_zero_MSP_EXP432P401R_tirtos_ccs\Debug\sbl\sbl.d
'Finished clean'

**** Build Finished ****
Buildfile generation error occurred..
Cannot build project. Referenced RTSC Configuration project 'tirtos_builds_MSP_EXP432P401R_release_ccs' contains build-errors.
Build stopped..

]

MSP430F1111A: testing prod release: will delete this

EVM430-FR6047: About USS using EVM430-FR6047

$
0
0

Part Number:EVM430-FR6047

Hi community member

For the first time to question.

I have two questions.

(1)

“An error was encountered while running the algorithm.” was displayed,

When I was using USS, an error “An error was encountered while running the algorithm.” was displayed.

What does this mean?

I could not find an explanation of the error code from the datasheet.

If you have detailed description please let me know.

 

(2)

Looking at the circuit diagram of USS, CH0_OUT and CH0_IN, CH1_OUT and CH1_IN are connected.

Do we have to connect here?

 

Best regards.

MSP432P401R: IAR/MSP432P401R: snprintf make error

$
0
0

Part Number:MSP432P401R

Hi all,

Im have a problem with snprintf fucition, after call snprintf() to write string to buffer, it changed some my variable.

Berfore

After

Any help will be appreciated. Thank you!

lenbufferpasscode = 267

static char Bufferpasscodeesp[300+1] = {0};

lenbufferpasscode = snprintf(Bufferpasscodeesp,300,",\"Passcode\":[{\"Code\":%d,\"Time\":%d,\"Opt\": %d ,\"Nuser\":%d},{\"Code\":%d,\"Time\":%d,\"Opt\": %d ,\"Nuser\":%d},{\"Code\":%d,\"Time\":%d,\"Opt\": %d ,\"Nuser\":%d},{\"Code\":%d,\"Time\":%d,\"Opt\": %d ,\"Nuser\":%d},{\"Code\":%d,\"Time\":%d,\"Opt\": %d ,\"Nuser\":%d}]",
    Passcodenumber1.Codenumber,Passcodenumber1.Timenumber,Passcodenumber1.Optionnumber,Passcodenumber1.Usenumber,
    Passcodenumber2.Codenumber,Passcodenumber2.Timenumber,Passcodenumber2.Optionnumber,Passcodenumber2.Usenumber,
    Passcodenumber3.Codenumber,Passcodenumber3.Timenumber,Passcodenumber3.Optionnumber,Passcodenumber3.Usenumber,
    Passcodenumber4.Codenumber,Passcodenumber4.Timenumber,Passcodenumber4.Optionnumber,Passcodenumber4.Usenumber,
    Passcodenumber5.Codenumber,Passcodenumber5.Timenumber,Passcodenumber5.Optionnumber,Passcodenumber5.Usenumber); 

MSP432P401R: Replacing the XMSP432 of the Black launchpad with MSP432 Production Silicon.

$
0
0

Part Number:MSP432P401R

Hi Everyone,

Just want to ask if I will be going to replace the original MCU placed on the MSP432 Black launchpad

with the production type MSP432P401R, instead of using the original XMSP432P401R.

Will this affect the programming performance of the built in XDS110 on the board itself?

I want to do this because of the issue last time that the XMSP version has an errata on ADC14.

In which, this causes the jumping reading even if filters were supplied and using a good LDO to power it on.

Please advise. 

Thank you,

Leo 


msp430f149: BSL synchronization error

$
0
0

Part Number:msp430f149

Hello,

I have same issue as below link

I have go through it. Mr.lane replied that i have to load BL_150S_14x.txt file in controller before i start BSL.

Please explain in detail how i will load this file in controller as well as specify address details if any required.

i also have MSP-FET tool for JTAG programming.

MSP430FR2111: FRAM uncorrectable bit PUC behaviour

$
0
0

Part Number:MSP430FR2111

Hi folks,

I have a question regarding how to handle a PUC due to an uncorrectable bit error on the MSP FRAM devices.  

Let's say at the start of my program, I enable the PUC by setting the UBDRSTEN flag in the GCCTL0 register. At some time later, an external event causes a problem with one of the FRAM cells (flips a single bit say) and the ECC cannot correct the issue. If the bit stays stuck after PUC, will the device just continually reset as the ECC will be unable to correct the bit?

Maybe this can't happen due to the FRAM being near immune to SEU type effects, but I don't know enough about it to say that for sure.

In general I guess the question is, can I just assume that after a PUC due to an uncorrectable bit, I can enable the UBDRSTEN again and not have an immediate reset?

Cheers

MSP430G2553: Vcc pin of chip broken? how to fix?

$
0
0

Part Number:MSP430G2553

While trying to remove the chip from the development board, accidentally the Vcc pin broke off. I tried to fix it by putting it on a breadboard and ensuring contact through the broken end of a wire. But, the delays do not seem to working properly. For a delay of 1 second, I am getting huge delays of excess of 5 seconds. Today, it completely stopped working. Is ther no way to fix the thing permanently?

MSP430I2041: MSP430i20xx

$
0
0

Part Number:MSP430I2041

Hi,

I am working on Main Memory Bootloader for MSP430™ Flash Microcontrollers(Slaa600c), As per the User guide flash is starting from 0xC000, which is inline with linker file(attached). As per the output file(attached) address is @8000(0x8000) which is very confusing. Can anybody clarify this?

(Please visit the site to view this file)

MSP-EXP430FR4133: From the TI Store missing booster pack headers on top and bottom

$
0
0

Part Number:MSP-EXP430FR4133

Hi team,

 

I have had the second customer support issue with the MSP-EXP430FR4133 not having any headers soldered on nor provided separately. I personally got this launchpad when it was newly released and it has the expected male headers on top and female on the bottom. We also state and show that in the users guide.

 

I know we have changed this up a few times in previous Launchpads but I just want to check in to see if there is an issue with the latest batch from our own TI Store not having any at all? They were both fresh orders from the last week or 2. I can provide more details if needed.

 

Thanks,

Billy

Viewing all 22211 articles
Browse latest View live


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