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

CCS/MSP430FR6047: Understanding the program flow of MSP430FR6047.

$
0
0

Part Number:MSP430FR6047

Tool/software: Code Composer Studio

Hello Members,

I would like to know is there a document where I can find a program flowchart to understand the complete measurement cycle of MSP430FR6047 apart from the sw library.

Regards,

Mr. Jadhav


EVM430-FR6047: Using built-in clock for CPU?

$
0
0

Part Number:EVM430-FR6047

Hi! 

I am wondering why the EVM430-fr6047 is using the external Y1 clock instead of the built-in main clock MCLK/SMCLK for the CPU, is there something specific that needs an accurate clock? 

Thanks in advance!

Best regards,
Thibault

MSP-EXP430FR5994: Driverlib - ADC Reference Voltage Selection to 2.5 Volt (MCU Internal)

$
0
0

Part Number:MSP-EXP430FR5994

Hi,

  I am trying to set the ADC reference voltage to 2.5V (MCU internal) using driverlib for MSP430. I see that in function ADC12_B_configureMemory() the parameter 'ADC12_B_configureMemoryParam' is having one member 'refVoltageSourceSelect'. I believe that this is the variable to be set to have different configurations of the reference voltage settings. The possible values I find (from file adc12_b.h) are:

ADC12_B_VREFPOS_AVCC_VREFNEG_VSS [Default]
ADC12_B_VREFPOS_INTBUF_VREFNEG_VSS
ADC12_B_VREFPOS_EXTNEG_VREFNEG_VSS
ADC12_B_VREFPOS_EXTBUF_VREFNEG_VSS
ADC12_B_VREFPOS_EXTPOS_VREFNEG_VSS
ADC12_B_VREFPOS_AVCC_VREFNEG_EXTBUF
ADC12_B_VREFPOS_AVCC_VREFNEG_EXTPOS
ADC12_B_VREFPOS_INTBUF_VREFNEG_EXTPOS
ADC12_B_VREFPOS_AVCC_VREFNEG_INTBUF
ADC12_B_VREFPOS_EXTPOS_VREFNEG_INTBUF
ADC12_B_VREFPOS_AVCC_VREFNEG_EXTNEG
ADC12_B_VREFPOS_INTBUF_VREFNEG_EXTNEG
ADC12_B_VREFPOS_EXTPOS_VREFNEG_EXTNEG
ADC12_B_VREFPOS_EXTBUF_VREFNEG_EXTNEG

  From this, I am unable to figure out which one is for what reference voltage selection. I need to set 0 volt (VSS) as ADC Negetive Reference & 2.5 V (MCU internal) as ADC Positive Reference. I have tried finding the solution/info in MCU datasheet as well as MCU user guide (Chapter 7), but unable to figure out the exact location of the details. Could anyone point me to the section of datasheet or user guide detailing into the matter?

-

Thanks

-

Regards

Soumyajit

Sensor Controller drawing unexpected current after shutdown

$
0
0

Hi,

Im having a problem with the current consumption of CC2652 Sensor controller after it has finished its processing task, 

The general idea is for the CC2652 to:

- sleep for x mins,

- wake up,

- configure and start the sensor

- Sensor controller task runs to completion

- Sensor controller is powered down to save current until the next time it is needed.

I seem to be able to power up and run the sensor controller correctly and i am able to start and restart the sensor controller task effectively.

However when we analyse the current consumption of the device we see that the current draw rises when we turn on the sensor controller, but it does not drop back down after we try and close the Sensor controller.

The Blue line represents the device sleeping,

the white line represents the SC being powered up and running the task and trying to shutdown

The redline represents that the SC continues to draw current forever

We are resetting the task structure and stopping the task like below..

/* Stop the Sensor Controller task */
scifResetTaskStructs( BV( SCIF_TASK_ID), 0 );
scifStopTasksNbl(BV(SCIF_TASK_ID));

Is there something else that we are missing that would allow us to completely power down the SC?

Any help would be appreciated :)

EVM430-FR6047: Least power consumption settings for EMV430-FR6047.

$
0
0

Part Number:EVM430-FR6047

Hello,

In regards to this related question. I would like to know how does the power consumption changes with a change in the PLL frequency. Also, what are the parameters which can affect the power changes?

I am working on this board and trying to measure the power consumption for one measurement cycle. Can I know with what setting I can achieve the least power consumption?

Regards,

Mr. Jadhav

MSP430F5659: MSP430 USB BSL invoke

$
0
0

Part Number:MSP430F5659

Hi Team,

We are working on a custom board (second revision) with MSP430F5659. As per the flowchart in page 3 of  slaa452c.pdf, when PUR pin it pulled high when Reset is pressed with the presence of VBUS, USB BSL is invoked.

But, we are seeing some different scenario in USB BSL invoke:

Case 1:  By default, VBUS will not be available. VBUS is controlled through a switch, VBUS is available after 500ms of Reset is held low and Rest is released after 500ms. We have a 120E pull-up resistor at PUR pin to VUSB. In this case, USB is not getting recognized at the Host. 

We also tried by connecting the device to Windows PC. The USB cable is plugged to PC while the reset switch is pressed. Still USB is not getting recognized at the Host. 

Case 2: When the USB is getting enumerated, when we press the Reset switch, USB is still enumerated and once we release the switch, USB gets disconnected and USB is not getting recognized at Device Manager.

Case 3: We are controlling the BSL sequence from the Host processor. PUR pin is controlled by the GPIO of Host Processor present in separate board. In this case, there is no external PUR pull-up resistor present on the board. This GPIO signals travel from the Host Processor to MSP430 via a cable assembly of length 200mm. Hence, we have a ESD component TPD6E05U06RVZ near the MSP430 end.Even if the PUR is pulled up by the GPIO of Host Processor, USB is not recognized. We tried after removing the ESD component and disconnected the Cable then tried the Case 4 below. 

Case 4:  When VBUS 5V is made available in default and USB cable is connected to Windows PC even without pressing  reset, USB is getting enumerated even without PUR pulled High externally. MSP430 is powered from 3V3 LDO and 5V is provided from switcher on board, both powered from external 12V supply. There is approximately 750ms delay between 3V3 generation and 5V generation. As per the recommendations, we have 2M weak pull down at PUR pin and when probed, PUR pin detected to be low. I am not sure how the USB is getting detected in this case.

Are we missing anything here? Have anyone faced similar issue and please let us know to fix this issue.

What modification to the circuit do you suggest?

MSP430F47187: DLMS Stack API

$
0
0

Part Number:MSP430F47187

Hi,

i am using Ti DLMS Stack for energy metering.energy meter has load survey and billing data and we do not know where these data use in DLMS API.

i am unable to put values in load profile and billing profile ,kindly give me detail description of these functions so that i can use it.

my metering load profile data is coming in array of 32 bytes so please confirm how these data will be inserted in load profile function.

MSP430G2211: Pin Assignments for Comparator Modules

$
0
0

Part Number:MSP430G2211

I am having a bit of trouble understanding how to assign a specific pin to a Comparator_A module on msp430g2211. The example code has the following: Now I understand that CACTL1 is assigned to be 0.25*VCC and is on but how do we know it's on the -comp? Also CACTL2 is assigned to P2CA4 which is stated to be P1.1 (or CA1), but how do you know it's P1.1? What if you wanted to use P1.5 to be assigned to CACTL2 which according to the datasheet (see page 6) is CA5?

I looked further into this and found the msp430x2xx family user's guide where on page 531 it explains a bit of the nomenclature but I'm still not very clear on how to assign CACTL2 to specific pins. Help is appreciated!


Gang Pro ARM

$
0
0

Hi Gregory,

Your suggestion was really useful to me. Now I can read data from buffer successfully. But I am facing challenges while reading data again after I write data.

 As per your suggestion I followed the sequence given below:

  1. F_ConfigLoad()
  2. F_AutoProgram( 0 )
  3. F_Open_Target_Device()
  4. F_Copy_Flash_to_Gang_Buffer()
  5. F_Get_Byte_from_Gang_Buffer()

After this execution I got exact data string from an expected address.

But after this execution I entered this data in byte array and implemented write functionality to edit data using following code. But after using 'F_Put_Byte_to_Buffer' if again try to read data, it’s not giving me an updated data string. Its giving me an old data string.

I want to replace data string at address '0x000000E0' from flash memory given in the following image by a customized string. I used 'F_Put_Byte_to_Buffer' to write customized string at the mentioned address, then I copied data to flash using 'F_Copy_Buffer_to_Flash' . But if now I go to the data viewer shown below, it still shows the same previous data and not the updated one.

Can you please tell me why data is not getting updated in flash memory or I am missing any function or any sequence? 

Thanks & regards,

Shradha K.

MSP432P401R: DMA controller:

$
0
0

Part Number:MSP432P401R

I am working on implementation of digital filters on MSP432. According to my required specification, I am able to achieve to filter order up to 46. Now, I want to use DMA controller in my project so that I can increase filter order by saving some computational time. I read documents and given questions on forum regarding DMA. As, I have single input for ADC and ''repeat single channel mode for conversion'', how much i have got idea about DMA from reading material that I need only one DMA channel (which I have channel 7 ) but my problem is that I am not able to understand what will be destination folder because before I was feeding that ADC output (MEMO) directly to digital filter.   (following code is a interrupt handler for an interrput of MEM0)

void ADC14_IRQHandler(void)
{
    float AdcInputVoltage;
    float filteredf_output;
    uint16_t Input_filter;
    uint64_t status;

    /* uint16_t AdcInputVoltage;
    uint16_t filtered_output;*/

    status = MAP_ADC14_getEnabledInterruptStatus();
    MAP_ADC14_clearInterruptFlag(status);

    if (status & ADC_INT0)
    {

        Input_filter = MAP_ADC14_getResult(ADC_MEM0);
    }

I have following questions now:

1) what should be destination transfor address ?

2) is it important that DMA channel configuration should be done before triggering the conversion ??

As, I have DAC-DSP_DAC in mr poject , I think the destination should be unit_16t (Input_filter).#

Please refer me to any example with repeat single channel or help me out to understand this confusion. Thanks.

MSP430FR2633: MSP430FR2633IRHB RTC Crystal Oscillators ground guard ring connect to AVSS pin

$
0
0

Part Number:MSP430FR2633

Dear Sir,

In your MSP430™ 32-kHz Crystal Oscillators application note there is one layout rules - "Connect guard ring to AVSS pin of the MSP430 MCU with a short trace, Never connect the ground guard ring to any other ground signal on the board but in MSP430FR2633IRHB device datasheet there was no any AVSS pin so please suggest or advice which optional pins for AVSS to connect this guard ring.

Thanks,

Utpal

MSP430F2618: Calculating memory usage of a program

$
0
0

Tool/software: Code Composer Studio

Hi,

I am using MSP430F2618 device.

I need to run 4 separate programs and then compare their execution time and memory usage. Can anyone help?

CCS/MSP432P401R: Using Fatsd (noRTOS) example code with timer and sampling interrupts

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Hi all,

I am building a project wherein my aim is to sample data and log that data into a file in an SD card whenever a 4000kHz timer interrupt occurs.

I borrowed the SD card code from the fatsd (noRTOS) example project from TIREX and I modified the code to suit my needs and on its own it is working well.

I also have sampling code the uses Systick timer interrupts, TimerAO interrupts, and Sampling interrupts. This code uses the vector table from startup_msp432p401r_ccs.c and macros from msp432p401r.h. This code also on its own is working well.

However, merging these files seems unsuccessful, because the fatsd (noRTOS) code uses macros and vector table from different code files than the standard "startup_msp432p401r_css.c" and "msp432p401r.h" and the files it references seem to be inaccessible. Is there a way to make my sampling code compatible with the noRTOS code provided by TIREX. If not, is there a way to enable and configure timer and sampling interrupts using the noRTOS interrupt and vector table files/formats (similar to "./examples/nortos/MSP_EXP432P401R/drivers/gpiointerrupt" that another community member, , was referred to).

Also what is the best and most efficient way for me to write data into an SD card? Is accessing it through TI's APIs the best way to go forward?

CCS/MSP430FR2355: How to use SPI to change Slave registers?

$
0
0

Part Number:MSP430FR2355

Tool/software: Code Composer Studio

  Hi,

  I'm trying to connect the MSP430fr2355 with the NRF24L01. I want to use SPI to communicate the NRF24L01. I read the SPI example code from the CCS resource explore. 

  I'm really confused that data from the UCxTXBUF transmit to which part of the Slave. Are there any ways to change the register value in the slave part(NRF24L01).

  I'm pretty new to the CCS and MSP430. If anyone can help me, I’m so grateful.

  Here is the code I'm trying to use.

---------------------------------------------------------------------------------

#include <msp430.h>

unsigned char RXData =0;
unsigned char TXData;

int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

P1SEL0 |= BIT4 | BIT5 | BIT6 | BIT7; // set 4-SPI pin as second function

UCA0CTLW0 |= UCSWRST; // **Put state machine in reset**
// 4-pin, 8-bit SPI master
UCA0CTLW0 |= UCMST|UCSYNC|UCCKPL|UCMSB|UCMODE_1|UCSTEM;
// Clock polarity high, MSB
UCA0CTLW0 |= UCSSEL__ACLK; // Select ACLK
UCA0BR0 = 0x02; // BRCLK = ACLK/2
UCA0BR1 = 0; //
UCA0MCTLW = 0; // No modulation
UCA0CTLW0 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
TXData = 0x01; // Holds TX data

PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
while(1)
{
UCA0IE |= UCTXIE; // Enable TX interrupt
__bis_SR_register(LPM0_bits | GIE); // Enter LPM0,enable interrupts
__no_operation(); // For debug,Remain in LPM0
__delay_cycles(2000); // Delay before next transmission
TXData++; // Increment transmit data
}
}

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCI_A0_VECTOR))) USCI_A0_ISR (void)
#else
#error Compiler not supported!
#endif
{
switch(__even_in_range(UCA0IV,USCI_SPI_UCTXIFG))
{
case USCI_NONE: break; // Vector 0 - no interrupt
case USCI_SPI_UCRXIFG:
RXData = UCA0RXBUF;
UCA0IFG &= ~UCRXIFG;
__bic_SR_register_on_exit(LPM0_bits);// Wake up to setup next TX
break;
case USCI_SPI_UCTXIFG:
UCA0TXBUF = TXData; // Transmit characters
UCA0IE &= ~UCTXIE;
break;
default: break;
}
}

MSP430FR2311: Code Question

$
0
0

Part Number:MSP430FR2311

Hello, 

This is my first attempt at writing a program from by my self and am not getting what I expect to happen. 

I am trying to control a line of leds that will light up when I turn a pot. 

I was wondering what I am doing wrong? When I look at the ADC registers when debugging they say "ERROR Unable to Read"  

I am sure I will be something I missed or didn't set right. If someone could point out what I am missing/doing wrong I would appreciate it. 

#include "driverlib.h"

int main(void) {

    WDT_A_hold(WDT_A_BASE);

    GPIO_setAsOutputPin(GPIO_PORT_PA,
            GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN8 + GPIO_PIN9 +
            GPIO_PIN10 + GPIO_PIN11 + GPIO_PIN12 + GPIO_PIN13 +
            GPIO_PIN14 + GPIO_PIN15);

    GPIO_setOutputLowOnPin(
            GPIO_PORT_PA,
            GPIO_PIN0 + GPIO_PIN1 + GPIO_PIN8 + GPIO_PIN9 +
            GPIO_PIN10 + GPIO_PIN11 + GPIO_PIN12 + GPIO_PIN13 +
            GPIO_PIN14 + GPIO_PIN15);

    ADC_init(ADC_BASE,
              ADC_SAMPLEHOLDSOURCE_SC,
              ADC_CLOCKSOURCE_ADCOSC,
              ADC_CLOCKDIVIDER_1);

    ADC_enable(ADC_BASE);

    ADC_setupSamplingTimer(ADC_BASE,
            ADC_CYCLEHOLD_8_CYCLES,
            ADC_MULTIPLESAMPLESDISABLE);

    ADC_configureMemory(ADC_BASE,
          ADC_INPUT_A4,
          ADC_VREFPOS_AVCC,
          ADC_VREFNEG_AVSS);

    ADC_clearInterrupt(ADC_BASE,
                       ADC_COMPLETED_INTERRUPT_FLAG);
        ADC_enableInterrupt(ADC_BASE,
                            ADC_COMPLETED_INTERRUPT);



                ADC_startConversion(ADC_BASE,
                    ADC_SINGLECHANNEL);

                _BIS_SR(LPM0_bits +GIE);

                while(1);
            }



/********************************************************************************/
/*                        interrupt vectors for MSP430                          */
/********************************************************************************/

#pragma vector = ADC_VECTOR
__interrupt void adc_interrupt(void)
{
     unsigned int adc_value = 0;
     adc_value = ADCMEM0;

     //LED Bar implementation
        if ((adc_value > 0) & (adc_value < 10))
            P2OUT = 0x00;
        if (adc_value >= 127)
            P2OUT = 0x01;
        if (adc_value >= 254)
            P2OUT = 0x03;
        if (adc_value >= 381)
            P2OUT = 0x06;
        if (adc_value >= 508)
            P2OUT = 0x0F;
        if (adc_value >= 635)
            P2OUT = 0x1F;
        if (adc_value >= 762)
            P2OUT = 0x3F;
        if (adc_value >= 889)
            P2OUT = 0x6F;
        if (adc_value >= 1016)
            P2OUT = 0xFF;
        ADC_startConversion(ADC_BASE,
                            ADC_SINGLECHANNEL);


}


MSP432P401R: f_write and f_printf does not write data to file in decimal format but instead writes in ascii format

$
0
0

Part Number:MSP432P401R

Hi Team,

I am working on an application where I have to write the data captured from a pulser to SD card.

The data format includes header (26 bytes) followed by data itself.

I am using the FatFs library to write it.

The data that I am getting is uint8_t type.

The format of the header is as below:

Version:4 digits 4 Bytes
Payload Size:0-655352 Bytes
HW Version:4 digits 4 Bytes
Time Code:4 digits 4 Bytes
Vector ID:0-655352 Bytes
Up Vector Length:0-655352 Bytes
Up Sample Freq:0-167772153 Bytes
Dn Vector Length:0-655352 Bytes
Dn Sample Freq:0-167772153 Bytes
Up Vector Data4096 bytesUp Vector Length Bytes
Dn Vector Data6656Down Vector Length Bytes

The overall file size needs to be around 10 KB based on above table.

However, the size spikes up to around 14 - 15 KB.

Providing example as below:

Version:1,9,1,04 Bytes
Payload Size:107542 Bytes
HW Version:2,2,0,0 4 Bytes
Time Code:0x5C40E21C 4 Bytes
Vector ID:12 Bytes
Up Vector Length:40972 Bytes
Up Sample Freq:83333333 Bytes
Dn Vector Length:66572 Bytes
Dn Sample Freq:83333333 Bytes
Up Vector DataData Up Vector Length Bytes
Dn Vector DataDataDown Vector Length Bytes

Below is the line of code that I have written for that:

Option 1:

f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d%d%d%d",1,9,1,0);
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", ((uint16_t)(upvector_length + downvector_length)));
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d%d%d%d", 2,2,0,0);
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", (uint16_t)v->vectorID);
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", (uint16_t)upvector_length);
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", v->frequency);
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", (uint16_t)downvector_length);
totalshotBytesWritten += logshotbytesWritten;
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", v->frequency);
totalshotBytesWritten += logshotbytesWritten;

// for each slice in the slice vector
for (j = 0; j < v->sv.length; j++) {
scaleFactor = (127 - v->sv.slice[j].attenuation) * dBGainScale;
scaleFactor = powf(10.0, scaleFactor/20.0);

// from the slice start to the slice stop vector indexes
for (ipMSV = v->sv.slice[j].attenuationStartIndex;
ipMSV <= v->sv.slice[j].attenuationStopIndex;
ipMSV++) {

// scale the output data
output = ((float)v->data[ipMSV] - 127.0) * scaleFactor;

// update the checksum
checksum += (uint16_t)output;

// convert the int16 value to hex chars
f_lseek(&fFile, totalshotBytesWritten);
logshotbytesWritten = f_printf(&fFile, "%d", (uint8_t)output);
totalshotBytesWritten += logshotbytesWritten;

// reached max values per line, or this is the end of the vector

if (((ipMSV+1) % config.pixelsPerLine == 0)
|| (ipMSV == v->length-1)) {

// appened a terminator and newline to the print buffer
// strcat(consolePrintBuffer, ";\n");

// reset the print buffer

consolePrintBuffer[0] = '\0';

}

}

Option 2:

    consolePrintBuffer[index++] = (uint8_t)1;
    consolePrintBuffer[index++] = (uint8_t)9;
    consolePrintBuffer[index++] = (uint8_t)1;
    consolePrintBuffer[index++] = (uint8_t)0;
    consolePrintBuffer[index++] = (uint8_t)((upvector_length + downvector_length) >> 8);
    consolePrintBuffer[index++] = (uint8_t)(upvector_length + downvector_length);
    consolePrintBuffer[index++] = (uint8_t)2;
    consolePrintBuffer[index++] = (uint8_t)2;
    consolePrintBuffer[index++] = (uint8_t)0;
    consolePrintBuffer[index++] = (uint8_t)0;
    consolePrintBuffer[index++] = (uint8_t)((0x5C40E21C) >> 24);
    consolePrintBuffer[index++] = (uint8_t)((0x5C40E21C) >> 16);
    consolePrintBuffer[index++] = (uint8_t)((0x5C40E21C) >> 8);
    consolePrintBuffer[index++] = (uint8_t)(0x5C40E21C);
    consolePrintBuffer[index++] = (uint8_t)((v->vectorID) >> 8);
    consolePrintBuffer[index++] = (uint8_t)(v->vectorID);
    consolePrintBuffer[index++] = (uint8_t)(upvector_length >> 8);
    consolePrintBuffer[index++] = (uint8_t)(upvector_length);
    consolePrintBuffer[index++] = (uint8_t)((v->frequency) >> 16);
    consolePrintBuffer[index++] = (uint8_t)((v->frequency) >> 8);
    consolePrintBuffer[index++] = (uint8_t)(v->frequency);
    consolePrintBuffer[index++] = (uint8_t)(downvector_length >> 8);
    consolePrintBuffer[index++] = (uint8_t)(downvector_length);
    consolePrintBuffer[index++] = (uint8_t)((v->frequency) >> 16);
    consolePrintBuffer[index++] = (uint8_t)((v->frequency) >> 8);
    consolePrintBuffer[index++] = (uint8_t)(v->frequency);
    f_lseek(&fFile, totalshotBytesWritten);
    logshotbytesWritten = f_printf(&fFile, "%x", consolePrintBuffer);
    totalshotBytesWritten += logshotbytesWritten;

    // for each slice in the slice vector
    for (j = 0; j < v->sv.length; j++) {
        scaleFactor = (127 - v->sv.slice[j].attenuation) * dBGainScale;
        scaleFactor = powf(10.0, scaleFactor/20.0);

        // from the slice start to the slice stop vector indexes
        for (ipMSV = v->sv.slice[j].attenuationStartIndex;
             ipMSV <= v->sv.slice[j].attenuationStopIndex;
             ipMSV++) {

            // scale the output data
            output = ((float)v->data[ipMSV] - 127.0) * scaleFactor;

            // update the checksum
            checksum += (uint16_t)output;

            // convert the int16 value to hex chars
            f_lseek(&fFile, totalshotBytesWritten);
            logshotbytesWritten = f_printf(&fFile, "%x", (uint8_t)output);
            totalshotBytesWritten += logshotbytesWritten;


            // reached max values per line, or this is the end of the vector
            if (((ipMSV+1) % config.pixelsPerLine == 0)
                || (ipMSV == v->length-1)) {

                // appened a terminator and newline to the print buffer
//                strcat(consolePrintBuffer, ";\n");


                // reset the print buffer
                consolePrintBuffer[0] = '\0';
}
}

In option 1 the header size instead of 26 bytes becomes 39 bytes and rest of the data size also gets increased rather than 10754 become around 14KB

In option 2 I get the ascii equivalent printed in the file rather than the actual number.

I am really confused as to whether is it actually possible to write decimal number in the file or not or it just gets written as ascii value.

Hope to receive some help.

MSP430FR2355: real time clock

$
0
0

Part Number:MSP430FR2355

Hi,

Please point me to documentation explaining about the real time clock (in the microcontroller), and how to use it programmatically. Currently I am attempting to use CCS.

Thanks!

RTOS/MSP430F5659: Need information on VID sharing program(USB)

$
0
0

Part Number:MSP430F5659

Tool/software: TI-RTOS

Hi,

I want to go for VID sharing program, I have few doubts, any one already taken this?

How much time/duration is required to get VID and PID from TI?

What is the cost involved ?

Need urgent help,

Thanks in advance

Nitesh

CCS/MSP432P401R: Ask for recommendation on MCU applications

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Dear all,

I'm using MSP432 in our application.

The clock is less than 48MHz.

But I have signal process requirements In the future, so I'm looking for other high performance MCUs.

1) The application of acoustic signal process (frequency 10K~50KHz), "low power", modulation/demodulation

2) The application of RF transmitter/receiver (frequency 8~25MHz), direct digital synthesizer(DDS) controller, modulation/demodulation

Should I choose Sitara ARM or DSP or DSP+ARM?

Hope can get the parts recommendation of them.

Thank you.

YHH

MSP430F5659: Retains its last States of GPIO After Powercycle

$
0
0

Part Number:MSP430F5659

Hi experts,

Im using MSP430F5659 controller for my project. I happened to see that after power cycle the MCU retains its last state of GPIOs, I used watch dog reset int my code.

flashed using MSP430 JTAG & CCS. But the situation is like that if i reset the MCU before power cycle , it will not retain the previous states.

What may be the reason for this problem. Kindly suggest me a solution for this.

Regards,

Renjith

Viewing all 22003 articles
Browse latest View live


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