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

MSP430

$
0
0

Hii please help me in this

i want to use microcontroller which should support temperature sensor ( i am using TM100 ) and rfid chip (monza x-2K dura)

please suggest me which microcontroller will provide me the interfacing of these two at a same time


CCS/EVM430-F67641: SLAA621 missing library files and build errors

$
0
0

Part Number:EVM430-F67641

Tool/software: Code Composer Studio

I have been unable to get the TI supplied SLAA621 software package to build/compile on CCS 8.3.0 due to what seem to be missing library files.

uart_comms.h is at least one that is not included

I am also getting these definition errors:

"../emeter-app/debounce.c", line 51: error #20: identifier "BUTTON_PERSISTENCE_CHECK" is undefined
"../emeter-app/debounce.c", line 54: error #20: identifier "DEBOUNCE_JUST_HIT" is undefined
"../emeter-app/debounce.c", line 57: error #20: identifier "DEBOUNCE_RELEASED" is undefined
"../emeter-app/debounce.c", line 64: error #20: identifier "BUTTON_PERSISTENCE_CHECK" is undefined
"../emeter-app/debounce.c", line 67: error #20: identifier "DEBOUNCE_JUST_RELEASED" is undefined
"../emeter-app/debounce.c", line 74: error #20: identifier "DEBOUNCE_HIT" is undefined

And can you tell me why these errors occur?

"../emeter-toolkit/src/accum48.c", line 59: fatal error #35: #error directive: "Don't know how to accum48"

"../emeter-toolkit/src/bin2bcd16.c", line 72: error #2632: Modifiers are not allowed in printf_support=minimal mode

We want to avoid the need for IAR.

Thanks

CCS/MSP430FR5739-EP: MSP430FR5739 does not communicate over JTAG

$
0
0

Part Number:MSP430FR5739-EP

Tool/software: Code Composer Studio

We can not get the MSP-FET Emulator to communicate over jtag to the MSP430FR5739 IC when is it on our PCB. We can remove the IC and communicate/program on the experimenters board with a socket for the IC, then put it back on the our PCB and see the programming work. 

But it will not communicate via jtag. We have verified all connections, schematic good, footprint good, traces good. jtag header pinout proper. Signals are reaching the pins of the ICs. I have 2 other engineers and 2 techs review, test and become completely stumped. 

We have tried forcing the TEST pin high to ensure the IC is in the jtag mode. We have tried 2-SPW communications. But we always get the error, "Device not recognized" 

Is there some other pin state that sets the IC into a mode that ignores the jtag? 

RTOS/MSP432E411Y: SPI clock floating before and after transmission

$
0
0

Part Number:MSP432E411Y

Tool/software: TI-RTOS

Dear TI-Experts,

I have a problem with the implementation of SPIMSP432E4DMA_transfer. (I'm still using version 2.30 of SimpleLink, so please let me know if 2.40 is already solving the issue.)

Immediately after a transfer the SPI hardware gets disabled, leaving the clock pin floating. Especially with frame format SPI_POL1_PHA1 the clock pin slowly falls to GND. Due to using SPI multiplexed, I have to set the chip select signal by software, thus the connected slave device sees the slow clock transition. Sporadically it gets into an illegal state due to this extra transition.

Wouldn't it be better to keep the SPI hardware enabled after opening till closing the driver?

To clear any unintended data in the RX fifo a disable / enable sequence could be done immediately before transmission. Or the fifo could simply be read until empty.

TINA/Spice/MSP430FR5870: MSP430FR5870IPMR IBIS model

$
0
0

Part Number:MSP430FR5870

Tool/software:TINA-TI or Spice Models

Hello,

I am interested in locating an IBIS model for the MSP430FR5870IPMR device.

Thank you!

Re Flash MSP430 with Raspberry Pi 3 Model B+

$
0
0

Hello

I would like to simply wire up the GPIO header of the Pi directly to the MSP430 UART that the MSP-FET normally connects to and run a CLI tool on the Pi to flash an image from its local file system into the MSP430.

Can you provide with any pointers or advise on how to do this please?

CCS/MSP432P401R: Always launch bootloader after power-up

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Is it possible to configure the MSP432 to ALWAYS launch the bootloader (BSL) after power-up, without having to toggle a hardware pin? We would use a customized bootloader based on the default one to then launch the application after 2 seconds if no one tries to load a new application in that timeframe. In our situation an application already exists on the chip and we don't have a way to toggle a particular pin to trigger the BSL on power-up, so we would try to "catch" it on it's way to the application.

Is this possible? What's the recommended way to accomplish something like this? 

CCS/MSP432P401R: I can not use the driver library APIs

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

I'm a beginner using the MSP432P401R and I found that I can write code using the driver library but I can not include it in my project. I downloaded an example using the adc14 because I have to use the adc14 for a project, and when I build the downloaded example it works, but as soon as I try making a new project and include the "driverlib.h" it gives me this dialogue: "cannot open source file driverlib.h"

I already tried linking paths in the include options within the properties of the project.


MSP430F2132:

MSP430FR6047: Attenuators? EVM430-FR6043

$
0
0

Part Number:MSP430FR6047

Hello:

Is the OPA836 used as an attenuator?
How is -3dB calculated?
What does the attenuator do in the circuit?

C40, C39, R66, C45.
What are they doing?

Best Regards

MSP430I2021: multiple pwm outputs, one timer

$
0
0

Part Number:MSP430I2021

May have designed myself in a corner.  CCR0/1/2 are all available as outputs TA0.0/1/2 on pins P1.4/5/6, so i may have incorrectly assumed that meant you could use them (CCR0 specifically).  My hope is to get 3 pwm signals from one timer, all with the same frequency/period, but with unique duty cycles.  From reading the datasheet, it looks like I should be able to accomplish this with continuous mode at 250Hz (rollover at 0xFFFF), but i'm not seeming to have any luck.. I've read posts about clever use of ISR to accomplish multiple frequencies, but that's not what i'm trying to do.  Should I be able to do this?

//Start Timer
Timer_A_clearTimerInterrupt(TIMER_A0_BASE);
Timer_A_initContinuousModeParam initContinuousParam = {0};
initContinuousParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
initContinuousParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
initContinuousParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
initContinuousParam.timerClear = TIMER_A_DO_CLEAR;
initContinuousParam.startTimer = false;
Timer_A_initContinuousMode(TIMER_A0_BASE, &initContinuousParam);
Timer_A_startCounter(TIMER_A0_BASE,
TIMER_A_CONTINUOUS_MODE
);

//Initialize compare registers to generate PWM1
Timer_A_initCompareModeParam initComp0Param = {0};
initComp0Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_0;
initComp0Param.compareInterruptEnable =
TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
initComp0Param.compareOutputMode = TIMER_A_OUTPUTMODE_SET_RESET;
initComp0Param.compareValue = DUTY0;
Timer_A_initCompareMode(TIMER_A0_BASE, &initComp0Param);

//Initialize compare registers to generate PWM2
Timer_A_initCompareModeParam initComp1Param = {0};
initComp1Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;
initComp1Param.compareInterruptEnable =
TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
initComp1Param.compareOutputMode = TIMER_A_OUTPUTMODE_SET_RESET;
initComp1Param.compareValue = DUTY1;
Timer_A_initCompareMode(TIMER_A0_BASE, &initComp1Param);

//Initialize compare registers to generate PWM3
Timer_A_initCompareModeParam initComp2Param = {0};
initComp2Param.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_2;
initComp2Param.compareInterruptEnable =
TIMER_A_CAPTURECOMPARE_INTERRUPT_DISABLE;
initComp2Param.compareOutputMode = TIMER_A_OUTPUTMODE_SET_RESET;
initComp2Param.compareValue = DUTY2;
Timer_A_initCompareMode(TIMER_A0_BASE, &initComp2Param);

Thanks,

Scott

MSP432E401Y: PB0, PB1 Errata and CANbus IP usage on those PIN's ?

$
0
0

Part Number:MSP432E401Y

The silicon errata SLAZ709–October 2017 lists an errata (GPIO#09) of which I don't know how to deal with if I need both CANbus IP's CAN0 and CAN1. Is there a work around or can I only use one CANbus IP on this device if I want to avoid the high "current draw error" on those pins ?

Copied from errata sheet:

"GPIO#09 In some cases, noise injected into GPIO pins PB0 and PB1 can cause high current draw"

....

Workaround


1. Do not use PB0 and PB1. Connect both to GND through a 1-kΩ resistor and
configure them as GPIO inputs.

....

With this workaround I loose one CANBus IP if I understand it correctly. Any clarifiaction would help.

I need both CANbus cores.

br

Markus

RTOS/MSP432E401Y: The difference between Task and pthread

$
0
0

Part Number:MSP432E401Y

Tool/software: TI-RTOS

Hi:

    I'm debugging the ti_154_gateway_ibm code on the MSP432E401Y launchpad,there are  two questions as follows:

   (1)I don't understand why there are tasks and pthreads in programs,what is the difference between Tasks and pthreads;

  (2)Which is the highest priority?MqttClient and MqttClientThread have the same priority?

thanks!

           

RTOS/MSP432P4111: MSP432P4111

$
0
0

Part Number:MSP432P4111

Tool/software: TI-RTOS

Good morning, 

I'm trying to implement a SPI communication between 2 devices. Both of them have the same cpu, a MSP432P4111.

I've been able to make them communicate using the examples spimaster_MSP_EXP432P4111_tirtos_ccs and spislave_MSP_EXP432P4111_tirtos_ccs. The problema I'm having is that when I change the pins I'm using the communication fails (it gets stuck in this fubcion:         transferOK = SPI_transfer(masterSpi, &transaction);

This is the only thing I have changed:

{
        .baseAddr = EUSCI_A3_BASE,
        .bitOrder = EUSCI_A_SPI_MSB_FIRST,
        .clockSource = EUSCI_A_SPI_CLOCKSOURCE_SMCLK,
        .defaultTxBufValue = 0xFF,
        .dmaIntNum = INT_DMA_INT3,
        .intPriority = (~0),
        .rxDMAChannelIndex = DMA_CH7_EUSCIA3RX,
        .txDMAChannelIndex = DMA_CH6_EUSCIA3TX,
        .clkPin  = SPIMSP432DMA_P9_5_UCA3CLK,
        .simoPin = SPIMSP432DMA_P9_7_UCA3SIMO,
        .somiPin = SPIMSP432DMA_P9_6_UCA3SOMI,
        .stePin  = SPIMSP432DMA_P2_3_UCA1STE,
        .pinMode  = EUSCI_SPI_4PIN_UCxSTE_ACTIVE_LOW,
        .minDmaTransferSize = 10
    }

I have chosen the pins 9.5 9.6 and 9.7 to be the SPI wires.

What's wrong? Any clue?

Thank you.

MSP430G2553: UART-SPI bridge to command leds

$
0
0

Part Number:MSP430G2553

Hello all !
I'm trying to make a UART-SPI bridge to drive led WS2811 with msp430g2553.
The project is to receive data from serial communication (P1.1) and send this data with SPI protocol (P1.7).
To begin i made 2 differents parts, receive and transmission. The receive part : i send data with putty on P1.1 and i send this data with P1.2,
this program works fine. The transmission part : i put datas on an array and i send these datas with P1.7, this program works fine and leds light up well.
When i assemble these programs, datas are send to the leds but it's not the right color.
That's my problem, i wait 12 bytes but when i send 3 times '255' leds light up, same thing if i send 3 times '000', same thing if i send '0' '255' '0' '255' or 6 times '0'.
I dont understand how led can light up if i send 0 ? On my program i wait 12 bytes but leds light up at 3 bytes (e.g : 3 times '255')
Can anyone help me ? Thanks.

#include <msp430g2553.h>

typedef unsigned char u_char;
typedef unsigned int u_int;

volatile int tab[12];
int c,b,i=0;

void main(void) {

	WDTCTL = WDTPW + WDTHOLD;

	BCSCTL1 = CALBC1_8MHZ;
	DCOCTL = CALDCO_8MHZ;

	// setup USIB, needed for the driver
	P1SEL |= BIT1 + BIT2 + BIT6 + BIT7; // P1.1 et P1.6 UCB0RXD input
	P1SEL2 |= BIT1 + BIT2 + BIT6 + BIT7; // P1.2 et P1.7 UCB0TXD output
        UCA0CTL1 |= UCSSEL_2;                     // SMCLK
        UCA0BR0 = 52;                              // 8MHz 9600bauds
        UCA0BR1 = 0;                              // 8MHz 9600bauds
        UCA0MCTL = 0x10|UCOS16;             
        UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
	UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master
	UCB0CTL1 |= UCSSEL_2; // SMCLK
	UCB0BR0 |= 0x02; // 8MHz/2 = 0.25us
	UCB0BR1 = 0;
	UCB0CTL1 &= ~UCSWRST;
       
        IE2 |= UCA0RXIE;                          // Enable USCI_A0 RX interrupt
        __bis_SR_register(LPM0_bits + GIE);       // Enter LPM0, interrupts enabled
}

  #pragma vector = USCIAB0RX_VECTOR
  __interrupt void ReceiveInterrupt(void)
  {
tab[i]=UCA0RXBUF;             //I create a table to store the data and then send everything what makes my frame
IFG2 &= ~UCA0RXIFG; // Clear RX flag
i++;
if(i==12){                     //i=12 because 4 leds (3bytes/led)
	for(b=0;b<12;b++) {
                   for(c=0;c<8;c++){          //each bit of the byte is compared with a 1
                         while (!(IFG2 & UCB0TXIFG));
                         (tab[b] & 0x80) ? (UCB0TXBUF = 0xF0) : (UCB0TXBUF = 0xC0);
                          tab[b]<<=1;
			}     
       }
   __delay_cycles(200);    // end frame -> 50µs
   i=0;
}
}


CCS/MSP432P401R: Issue Configuring P1.1 switch in Pulldown configuration

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

Hello,

I was able to easily configure P1.1 (Switch) of MSP432 into pull-up configuration, but when I tried for pulldown, I didn't get any result. Kindly help me with this:

#include "msp.h"

int main(void) {
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD;

/* Configure GPIO */
P2->DIR |= BIT0;
P1->DIR &= ~BIT1;
P1->REN = BIT1;
P1->OUT &= ~BIT1;

while (1)
{
if (P1->IN & BIT1)
P2->OUT |= BIT0;
else
P2->OUT &= ~BIT0;
}
}

 

MSP432E401Y: MSP432 to feed STEP pulses to DRV8711

$
0
0

Part Number:MSP432E401Y

Hello,

Could you please advise how to drive the DRV8711 STEP pin?

The DRV8711 is for steppers. Its input is STEP/DIR type.

The MSP432 is required to give positive pulses of specified number, at a specified period.

A sample code slvc575a.zip (for MSP430G2553) seemed a fully CPU operation.

Please tell me if you have an idea or a sample code which saves MSP432E401Y CPU load.

My idea would be, a combination of PWM and GPTM. PWM to repeat STEP pulses and GPTM to count the number of the pulses.

A better solution would highly appreciated.

CCS/MSP430FR2355: Reduction of LPM3 Current with UART/SPI

$
0
0

Part Number:MSP430FR2355

Tool/software: Code Composer Studio

Hello,

I have been using the following code below to test the current drawn when in LPM3. When I comment out the functions set_UART_clk and config_UART, I see the current drawn reduces to about 2uA. These functions are used to initialize UART and set the UART clock but having it initialized seems to increase the power consumption in LPM3. I also tried setting the UCDORM bit before going to sleep and resetting it after waking up but that doesn't seem to help either.

This is just the code used to check for the LPM3 current. In the actual implementation, I wake up from LPM3 after a timer interrupt, reset the UCDORM bit and transmit the next packet. Functionally it works fine but the current drawn is still the same during LPM3. 

Another labmate is using the SPI protocol and he seems to have the same issue. 

Is there any way UART and SPI could be put to sleep before going to LPM3 so that the current consumption could be reduced? 

Please let me know if there's any more information I must provide. 

Here's the UART code I have been using:

#include <msp430.h>
void Software_Trim();                       // Software Trim to get the best DCOFTRIM value
void set_pins_low();
void set_UART_clk();
void config_UART();
void set_xt1_clk();
void set_timer_sleep();
#define MCLK_FREQ_MHZ 1                     // MCLK = 1MHz
unsigned int RXData = 0, TXData_start = 0x55, TXData_stop = 0xAA, TXR1 = 0x11, TXR2 = 0x76;
unsigned int ADC_data[15] = {5000, 100, 200, 200, 500, 500, 1000, 1000, 5000, 5000, 100, 200, 500, 1000, 5000}, i = 0;
int ready, standby = 0, powerdown = 1;
int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;                 // Stop watchdog timer
    PM5CTL0 &= ~LOCKLPM5;                     // Disable the GPIO power-on default high-impedance mode
                                              // to activate previously configured port settings
    set_pins_low();
    P1DIR &= ~BIT3;                         // Set P1.3 as input
    // Use pin 4.6 for standby and 4.7 for Powerdown.
    P4DIR |= BIT6 | BIT7;
    // Standby = 0 for normal operation
    P4OUT &= ~BIT6;
    // Powerdown is VCC for normal operation
    P4OUT |= BIT7;
    // Linx Pin 18 is VDD for transmit mode, connect to Pin 1.0 on MSP
    P1DIR |= BIT0;
    P1OUT |= BIT0;
    // Linx Pin 10 and 13 are VDD for appropriate channel select. Connect them to MSP pin 6.0, 6.1 respectively
    P6DIR |= BIT0 | BIT1;
    P6OUT |= BIT0 | BIT1;
    / /Linx Pin 14 is level adj at VDD for max power out. Connect it to Pin 6.2 on MSP
    P6DIR |= BIT2;
    P6OUT |= BIT2;
    // Linx Pin 9 is VDD to choose transparent mode. Connect to MSP Pin 6.3
    P6DIR |= BIT3;
    P6OUT |= BIT3;
    set_UART_clk();
    config_UART();
    set_xt1_clk();
    CSCTL4 = SELA__XT1CLK | SELMS__DCOCLKDIV;    // Select Aux clock as XT1(32kHz) and Main clock as DCO (1MHz)
    TB0CCTL0 |= CCIE;                            // TBCCR0 interrupt enabled
    while (1)
    {
        // Put Linx in Powerdown
        // Pull all VDD pins to 0
        P1OUT &= ~BIT0;
        P6OUT &= ~BIT0;
        P6OUT &= ~BIT1;
        P6OUT &= ~BIT2;
        P6OUT &= ~BIT3;
        P1DIR |= BIT7;
        P1OUT &= ~BIT7;
        UCA0CTLW0 |= UCDORM;
        // Powerdown Pin (4.7) pulled low to put the Linx device in powerdown
        P4OUT &= ~BIT7;
        __bis_SR_register(LPM3_bits | GIE);         // Enter LPM3 w/ interrupt
    }
    P1OUT = BIT0;
}
void Software_Trim()
{
    unsigned int oldDcoTap = 0xffff;
    unsigned int newDcoTap = 0xffff;
    unsigned int newDcoDelta = 0xffff;
    unsigned int bestDcoDelta = 0xffff;
    unsigned int csCtl0Copy = 0;
    unsigned int csCtl1Copy = 0;
    unsigned int csCtl0Read = 0;
    unsigned int csCtl1Read = 0;
    unsigned int dcoFreqTrim = 3;
    unsigned char endLoop = 0;
    do
    {
        CSCTL0 = 0x100;                         // DCO Tap = 256
        do
        {
            CSCTL7 &= ~DCOFFG;                  // Clear DCO fault flag
        }while (CSCTL7 & DCOFFG);               // Test DCO fault flag
        __delay_cycles((unsigned int)3000 * MCLK_FREQ_MHZ);// Wait FLL lock status (FLLUNLOCK) to be stable
                                                           // Suggest to wait 24 cycles of divided FLL reference clock
        while((CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)) && ((CSCTL7 & DCOFFG) == 0));
        csCtl0Read = CSCTL0;                   // Read CSCTL0
        csCtl1Read = CSCTL1;                   // Read CSCTL1
        oldDcoTap = newDcoTap;                 // Record DCOTAP value of last time
        newDcoTap = csCtl0Read & 0x01ff;       // Get DCOTAP value of this time
        dcoFreqTrim = (csCtl1Read & 0x0070)>>4;// Get DCOFTRIM value
        if(newDcoTap < 256)                    // DCOTAP < 256
        {
            newDcoDelta = 256 - newDcoTap;     // Delta value between DCPTAP and 256
            if((oldDcoTap != 0xffff) && (oldDcoTap >= 256)) // DCOTAP cross 256
                endLoop = 1;                   // Stop while loop
            else
            {
                dcoFreqTrim--;
                CSCTL1 = (csCtl1Read & (~DCOFTRIM)) | (dcoFreqTrim<<4);
            }
        }
        else                                   // DCOTAP >= 256
        {
            newDcoDelta = newDcoTap - 256;     // Delta value between DCPTAP and 256
            if(oldDcoTap < 256)                // DCOTAP cross 256
                endLoop = 1;                   // Stop while loop
            else
            {
                dcoFreqTrim++;
                CSCTL1 = (csCtl1Read & (~DCOFTRIM)) | (dcoFreqTrim<<4);
            }
        }
        if(newDcoDelta < bestDcoDelta)         // Record DCOTAP closest to 256
        {
            csCtl0Copy = csCtl0Read;
            csCtl1Copy = csCtl1Read;
            bestDcoDelta = newDcoDelta;
        }
    }while(endLoop == 0);                      // Poll until endLoop == 1
    CSCTL0 = csCtl0Copy;                       // Reload locked DCOTAP
    CSCTL1 = csCtl1Copy;                       // Reload locked DCOFTRIM
    while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // Poll until FLL is locked
}
void set_UART_clk()
{
    __bis_SR_register(SCG0);                // Disable FLL
    CSCTL3 = SELREF__REFOCLK;               // Set REFO as FLL reference source
    CSCTL1 = DCOFTRIMEN_1 | DCOFTRIM0 | DCOFTRIM1 | DCORSEL_0;// DCOFTRIM=3, DCO Range = 1MHz
    CSCTL2 = FLLD_0 + 30;                   // DCODIV = 1MHz
    __delay_cycles(3);
    __bic_SR_register(SCG0);                // Enable FLL
    Software_Trim();                        // Software Trim to get the best DCOFTRIM value
}
void config_UART()
{
    // Configure UART pins
    P1SEL0 |= BIT6 | BIT7;                    // set 2-UART pin as second function
    // Configure UART
    UCA0CTLW0 |= UCSWRST;                     // Put eUSCI in reset
    UCA0CTLW0 |= UCSSEL__SMCLK;
    // Baud Rate calculation
    UCA0BR0 = 6;                              // 1000000/9600 = 104.166666667  which is greater than 16. Hence, (1000000/(16*9600)) = 6.51041666667, decimal portion is 6 and fraction is 0.51.
    UCA0MCTLW = 0x1100 | UCOS16 | UCBRF_2;    // 1000000/115200 - INT(1000000/115200)=0.68 --> done above.
                                              // UCBRSx value = 0xD6 (See UG - see table 22.4 in section 22.3.10, other code example says table 17.4, that's not correct.
    UCA0BR1 = 0;
    UCA0CTLW0 &= ~UCSWRST;                    // Initialize eUSCI
    UCA0IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt
}
void set_pins_low()
{
    P1OUT = 0x00;
    P2OUT = 0x00;
    P3OUT = 0x00;
    P4OUT = 0x00;
    P5OUT = 0x00;
    P6OUT = 0x00;
    P1DIR = 0xff;
    P2DIR = 0xff;
    P3DIR = 0xff;
    P4DIR = 0xff;
    P5DIR = 0xff;
    P6DIR = 0xff;
}
void set_xt1_clk()
{
    P2SEL1 |= BIT6 | BIT7;                  // P2.6~P2.7: crystal pins
    do
    {
        CSCTL7 &= ~(XT1OFFG | DCOFFG);      // Clear XT1 and DCO fault flag
        SFRIFG1 &= ~OFIFG;
    } while (SFRIFG1 & OFIFG);              // Test oscillator fault flag
}
void set_timer_sleep ()
{
    TB0CTL = ID__4 | TBSSEL__ACLK | MC__UP;     // Input divider /4, ACLK, UP mode
}
#pragma vector = TIMER0_B0_VECTOR
__interrupt void TB0_ISR(void) {
    __bic_SR_register_on_exit(LPM3_bits | GIE);
}

Any help regarding this would be appreciated.

Thanks,

Yaman

MSP430FR5969: UCA1 SPI PROBLEM - CLOCK JITTER

$
0
0

Part Number:MSP430FR5969

Hi,

I'm trying to use UCA1 SPI to communicate the MSP430FR5969 with HopeRF RFM69 transceiver. So the MSP430 (master) sends commands to configure the RFM69 and makes it transmit some data. However the transceiver doesn't work and when I check the SPI signals by logic analyser, there are some clock jitters (as in pictures) which makes the MSP430 randomly sends some wrong data to the RFM69. I have tested it on both the board EXP430FR5969 and seperately with the MSP430FR5969 chip (I made a PCB) and both had this problem. Some commands are correct and some are not due to these strange jitters.

But when I used the UCB0 SPI on the EXP430FR5969 it worked just fine, the transceiver could transmit data (tested for many times). I have included my "SPI.h" and "SPI.c" below, these were written based on the example "msp430fr59xx_eusci_spi_standard_master.c". Can you please help?

  (Please visit the site to view this file)(Please visit the site to view this file)

MSP430F2274-EP: RAM data retention

$
0
0

Part Number:MSP430F2274-EP

I am interested in storing some information on the RAM portion of the MSP430F2274's memory, and would like to be erased when power is removed. Is the RAM in the MSP430F2274 volatile memory? Or is in the information retained between power cycles? Does the microcontroller need to actively erase the memory?

Viewing all 22106 articles
Browse latest View live


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