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

CCS/MSP432P401R: Errors in the initial stages of the set up.

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

I'm trying to build the Voice Detection model using the Procedures given by the TI used guide, i've followed all the steps, still i'm getting the errors as in the screen shot.

I've tried to install the semaphore.h and pthread.h POSIX headers, i'm still getting the errors.


MSP430F5418A: Watchdog timeout results reset with cause of SVSH POR

$
0
0

Part Number:MSP430F5418A

My configuration is:

PMMCTL0_H = PMMPW_H;
PMMRIE = SVSHPE;
SVSMHCTL = SVSHE;
SVSMLCTL = 0;

SVSH enabled, POR generation by SVSH enabled, all others SVS and SVM disabled.

My problem is: when WDT overflows, reset is generated, but SYSRSTIV register contains only one SVSH (0x0E) code instead of WDT time out (0x16) code. How to use watchdog timer together with SVSH in normal mode with POR generation by SVSH enabled? Why SVSH generates POR in result of WDT's PUC?

CCS/DRV2667EVM-CT: I2C Communication

$
0
0

Part Number:DRV2667EVM-CT

Tool/software: Code Composer Studio

Hi,

right now i want to start a communication between the MSP430g2553 (Launchpad) and the DRV2667 with I2C.

I want to use one Haptic Feedback for a Piezo with a button as input signal (to turn on a LED). I think i have to use the Master as TX/RX and Slave RX/TX right?

I dont realy know how to start this. Any Advice? Can i use a Program from the "sloc342" documents from the DRV2667? What do i need from these documents?

Best regards

CCS/MSP430G2553: Interfacing MSP430G2553 with MPU6050 (accelerometer).

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

Hello, I've interfaced the msp430 with the mpu6050, but my code stops running when it hits the line with the comment "PROBLEM LINE". If anyone has any ideas as to why the code doesnt continue when it hits that line, that would be very helpful.



#define USE_CLOCK #define USE_I2C_USCI #define USE_MPU6050 #define USE_UART //////////////////////////////////////////////////////////////////////////////// #include <wchar.h> #include "stdio.h" //#include "string.h" #include "Library/mymath.h" #include <math.h> #include "msp430g2553.h" #include "Library/Global.h" #include "Library/UART.h" #include "Library/Clock.h" #include "Library/I2C_USCI.h" #include "Library/MPU6050.h" int temp=0,i=0; int abc=0; char buff[50]; //Chu y Gyro bi sai so tinh khong dong nhat khi goc quay thay doi // Khong tinh duoc vi phan cua gyro void main() { WDTCTL = WDTPW | WDTHOLD; Select_Clock(DCO_16MHZ); _delay_cycles(100000); // Khoi tao Ngat timer // Tao timer 0,5 s //TACCR0 = 10000; //TACCTL0 = CCIE; //TACTL = TASSEL_2 + MC_1 + ID_0; // SMCLK/8, Up mode P1DIR|=BIT0; UART_Init(); //UART_Write_Char(10); //Ky tu xuong dong //UART_Write_String("Ket noi thanh cong"); //UART_Write_Char(10); //Ky tu xuong dong _delay_cycles(100000); Init_I2C_USCI(MPU6050_ADDRESS); Setup_MPU6050(); //MPU6050_Test_I2C(); //MPU6050_Check_Registers(); //Calibrate_Gyros(); _delay_cycles(320000); Get_Accel_Values(); Get_Gyro_Values(); ACCEL_XOUT = 0; ACCEL_YOUT = 0; ACCEL_ZOUT = 0; ACCEL_XOUT_PAST=0; // ACCEL_YOUT_PAST=0; ACCEL_ZOUT_PAST=0; ACCEL_XA =0; ACCEL_YA =0; ACCEL_ZA =0; ACCEL_XV = 0; ACCEL_YV = 0; ACCEL_ZV = 0; ACCEL_XDECAC=0; ACCEL_YDECAC=0; ACCEL_ZDECAC=0; _delay_cycles(1000000); //__bis_SR_register(GIE); //Cho phep ngat hoat dong while(1) { //Get_Gyro_Values(); P1OUT^=BIT0; //sprintf(buff,"GX:%d GY:%d GZ:%d AX:%d AY:%d AZ:%d",GYRO_XOUT,GYRO_YOUT,GYRO_ZOUT,ACCEL_XOUT,ACCEL_YOUT,ACCEL_ZOUT); //sprintf(buff,"1%d 2%d 3%d 4%d 5%d 6%d ",GYRO_XOUT,GYRO_YOUT,GYRO_ZOUT,ACCEL_XOUT,ACCEL_YOUT,ACCEL_ZOUT); UART_Write_Char('1'); sprintf(buff,"%d",ACCEL_XOUT); UART_Write_String(buff); UART_Write_Char(' '); //_delay_cycles(10000); UART_Write_Char('2'); sprintf(buff,"%d",ACCEL_YOUT); UART_Write_String(buff); UART_Write_Char(' '); //_delay_cycles(10000); UART_Write_Char('3'); sprintf(buff,"%d",ACCEL_ZOUT); UART_Write_String(buff); UART_Write_Char(' '); _delay_cycles(10000); Get_Accel_Values(); } } // Timer A0 interrupt service routine #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A0 (void) { }


#ifdef USE_I2C_USCI
#define MPU6050_ADDRESS	0x68
#define DS1307_ADDRESS	0x68
#define LM92_ADDRESS	0x48
/******************************************************************************\
*					Prototype (nguyen mau ham)    						       *
\******************************************************************************/

void Init_I2C_USCI(unsigned char addr);
void Set_Address(unsigned char addr);
unsigned char ByteRead_I2C_USCI(unsigned char address);
unsigned char ByteWrite_I2C_USCI(unsigned char address, unsigned char Data);
unsigned char WordRead_I2C_USCI(unsigned char Addr_Data,unsigned char *Data, unsigned char Length);
/******************************************************************************\
*					Function (noi dung ham)	                           *
\******************************************************************************/


void Init_I2C_USCI(unsigned char addr)
{
	P1SEL |= BIT6 + BIT7;                     // Assign I2C pins to USCI_B0
	P1SEL2|= BIT6 + BIT7;                     // Assign I2C pins to USCI_B0
	UCB0CTL1 |= UCSWRST;                      // Enable SW reset
	UCB0CTL0 = UCMST+UCMODE_3+UCSYNC;         // I2C Master, synchronous mode
  	UCB0CTL1 = UCSSEL_2+UCSWRST;              // Use SMCLK, keep SW reset
	UCB0BR0 = 40;                             // fSCL = SMCLK/40 = ~400kHz
	UCB0BR1 = 0;
	UCB0I2CSA = addr;                         // Set slave address
	UCB0CTL1 &= ~UCSWRST;                     // Clear SW reset, resume operation
}

void Set_Address(unsigned char addr)
{
  	UCB0CTL1 |= UCSWRST;    
  	UCB0I2CSA = addr;                     		// Set slave address
  	UCB0CTL1 &= ~UCSWRST;                 		// Clear SW reset, resume operation 	
}

unsigned char ByteRead_I2C_USCI(unsigned char address)
{ 	
	while (UCB0CTL1 & UCTXSTP);             	// Cho tin hieu I2C STT duoc gui di
	UCB0CTL1 |= UCTR + UCTXSTT;             	// I2C TX,START

	while (!(IFG2&UCB0TXIFG));			// PROBLEM LINE
	UCB0TXBUF = address;                      	// Dia chi luu gia tri Seconds

	while (!(IFG2&UCB0TXIFG));					// PROBLEM LINE

	UCB0CTL1 &= ~UCTR;                      // I2C RX
	UCB0CTL1 |= UCTXSTT;                    // I2C RESTART
	IFG2 &= ~UCB0TXIFG;                     // Xoa co ngat USCI_B0 TX

	while (UCB0CTL1 & UCTXSTT);             // Cho den khi I2C STT duoc gui di
	UCB0CTL1 |= UCTXSTP;                    // Gui bit STOP
	return UCB0RXBUF;
}


//doc 1 mang tu DS
unsigned char WordRead_I2C_USCI(unsigned char Addr_Data,unsigned char *Data, unsigned char Length)
{ 	
	unsigned char i=0;
	while (UCB0CTL1 & UCTXSTP);             // Loop until I2C STT is sent
	UCB0CTL1 |= UCTR + UCTXSTT;             // I2C TX, start condition

	while (!(IFG2&UCB0TXIFG));
	IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag
	if(UCB0STAT & UCNACKIFG) return UCB0STAT;	//Neu bao loi
	UCB0TXBUF = Addr_Data;                      	// Dia chi luu gia tri Seconds

	while (!(IFG2&UCB0TXIFG));
	if(UCB0STAT & UCNACKIFG) return UCB0STAT;	//Neu bao loi

	UCB0CTL1 &= ~UCTR;                      // I2C RX
	UCB0CTL1 |= UCTXSTT;                    // I2C start condition
	IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag
	while (UCB0CTL1 & UCTXSTT);             // Loop until I2C STT is sent
	for(i=0;i<(Length-1);i++)
	{
		while (!(IFG2&UCB0RXIFG));
		IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag
		Data[i] = UCB0RXBUF;
	}
	while (!(IFG2&UCB0RXIFG));
	IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag
	UCB0CTL1 |= UCTXSTP;                    // I2C stop condition after 1st TX
	Data[Length-1] = UCB0RXBUF;
	IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag
	return 0;
}

unsigned char ByteWrite_I2C_USCI(unsigned char address, unsigned char data)
{
	while (UCB0CTL1 & UCTXSTP);             // Cho den khi tin hieu STT duoc gui xong
	UCB0CTL1 |= UCTR + UCTXSTT;             // I2C TX, Gui bit START

	while (!(IFG2&UCB0TXIFG));				// Cho cho bit START gui xong
	if(UCB0STAT & UCNACKIFG) return UCB0STAT;	//Neu bao loi thì thoat khoi ham
	UCB0TXBUF = address;					// Gui dia chi thanh ghi can ghi


	while (!(IFG2&UCB0TXIFG));			// Cho gui xong
	if(UCB0STAT & UCNACKIFG) return UCB0STAT;	//Neu bao loi thì thoat khoi ham
	UCB0TXBUF = data;						// Gui du lieu

	while (!(IFG2&UCB0TXIFG));				// Cho gui xong
	if(UCB0STAT & UCNACKIFG) return UCB0STAT;	//Neu bao loi thì thoat khoi ham
	UCB0CTL1 |= UCTXSTP;                    // Gui bit STOP
	IFG2 &= ~UCB0TXIFG;                     // Xoa co USCI_B0 TX
	return 0;
}
unsigned int Read_LM92()
{
	unsigned char a;
	while (UCB0CTL1 & UCTXSTP);             // Loop until I2C STT is sent
	UCB0CTL1 |= UCTR + UCTXSTT;             // I2C TX, start condition

	while (!(IFG2&UCB0TXIFG));
	UCB0TXBUF = 0x00;                      	// Dia chi luu gia tri Seconds

	while (!(IFG2&UCB0TXIFG));

	UCB0CTL1 &= ~UCTR;                      // I2C RX
	UCB0CTL1 |= UCTXSTT;                    // I2C start condition
	IFG2 &= ~UCB0TXIFG;                     // Clear USCI_B0 TX int flag

	while (UCB0CTL1 & UCTXSTT);             // Loop until I2C STT is sent
	a = UCB0RXBUF;
	while (UCB0CTL1 & UCTXSTT);             // Loop until I2C STT is sent
	UCB0CTL1 |= UCTXSTP;                    // I2C stop condition after 1st TX
	return ((a<<8)|UCB0RXBUF);	
}

 
#endif

CCS/MSP432P401R: Help coding my 8 switch to control two different 7-segment LEDs

$
0
0

Part Number:MSP432P401R

Tool/software: Code Composer Studio

I am trying to code my MSP432 in C to make 4 switches control one of your 7-segment LEDs and the other 4 control the other 7-segment display. It is your choice what LED behavior you want. The switch also have to be interrupt driven. Here is what i have so far:

// Basic I2C Driver.
// Runs on MSP432.
// Matt Laubhan (11/15/2015)
//

#include <stdint.h>
#include "msp.h"
#include "InputOutput.h"
#define NVIC_ISER1 (HWREG32(0xE000E104)) /* Irq 32 to 63 Set Enable Register */

//----------------------------------------
// eUSCI wait until START and address are transmitted
//----------------------------------------
void WaitStart(void)
{
while ((UCB0CTLW0 & UCTXSTT) != 0);
}

//----------------------------------------
// eUSCI wait until STOP is complete
//----------------------------------------
void WaitStop(void)
{
while ((UCB0CTLW0 & UCTXSTP) != 0);
}

//----------------------------------------
// eUSCI wait until TX is complete
//----------------------------------------
void WaitTx(void)
{
while ((UCB0IFG & UCTXIFG0) == 0);
}

//----------------------------------------
// eUSCI wait until RX is complete
//----------------------------------------
void WaitRx(void)
{
while ((UCB0IFG & UCRXIFG0) == 0);
}

//----------------------------------------
// eUSCI generate start
//----------------------------------------
void GenStart(void)
{
UCB0CTLW0 |= UCTXSTT;
}

//----------------------------------------
// eUSCI generate stop
//----------------------------------------
void GenStop(void)
{
UCB0CTLW0 |= UCTXSTP;
}

////////////////////////////////////////////////////////////////////////
//
// Enable interrupts on P4.6. Port4_IRQHandler should get called below whenever
// a one of the 8 inputs to I2C_SWITCH change--provided P4.6 is connected
// to the INT signal on I2C_0.
//
void ConfigureInterrupts()
{
// Make sure P4.6 is an input and allow it to generate interrupts.
// Needs an internal pull-up resistor too.
P4DIR &= ~BIT6;
P4IES |= BIT6;
P4IE |= BIT6;
P4REN |= BIT6;
P4OUT |= BIT6;
P4IFG &= ~BIT6;
NVIC_ISER1 |= BIT6; // IRQ 38
}

// Function prototype
extern void EnableInterrupts(void); // defined in startup_msp432.s as a subroutine

// In Keil, name the ISR exactly the following...
void PORT4_IRQHandler(void)
{
// interrupt generated on any port 4 pin
//
// if ConfigureInterrupts() is called above, maskable interrupts
// are enabled [via the EnableInterrupts() function], and
// the INT pin of I2C_0 is connected to P4.6, this ISR will be called
// whenver a DIP switch changes
//
// this eliminate the need for the MSP432 CPU to poll the switches periodically
// to see if anything has changed
//
// ordinarily, ISRs should be short and defer further processing
// tasks to the main loop--however, at this point the main loop does nothing
// so it is OK to do other processing tasks here
//

// Always clear the port-level latch.
P4IFG &= ~BIT6;

// MSP432 will now resume whatever it was doing when the interrupt
// came in
}

// No parameters
void InitI2C(void)
{
//
// Configure with the following parameters:
// * 7-bit addresses.
// * single master environment.
// * MSP432 is always master.
// * I2C mode.
// * Synchronous mode.
// * SMCLK is source.
// * Automatically trigger address ACK.
// * No interrupts.
//
UCB0CTLW0 |= UCSWRST; // hold USCI in reset.
P1SEL0 |= 0xC0; // P1.7 (SCL) and P1.6 (SDA) multiplexing.
P1SEL1 &= ~0xC0;
UCB0CTLW0 |= (UCMST | UCMODE_3 | UCSYNC | UCSSEL_2);
UCB0BRW = 400; // Divide SMCLK down by this factor to get SCL.
UCB0CTLW0 &= ~UCSWRST; // release USCI reset.
}

//
// Send a byte of data to the I2C target.
// [Note there is no error checking here.]
//
void OutI2C(unsigned char address, unsigned char data)
{
UCB0I2CSA = address; // UCB0I2CSA = <expander addr w/o R/W bit>.
UCB0CTLW0 |= UCTR; // TX.
GenStart(); // Generate a START.
WaitStart(); // Wait for START and slave address to be sent.
WaitTx(); // Wait until it is safe to write to TX buffer.
UCB0TXBUF = data; // UCB0TXBUF = <data> (prep data).
if ((UCB0IFG & UCNACKIFG) == 0) // Check for slave NACK.
{
// I2C slave responded.
WaitTx(); // Wait until data is transferred.
}
else
{
// I2C slave did not respond.
}
GenStop(); // Generate a STOP.
WaitStop(); // Wait for STOP to be sent/ready to go again.
}

//
// Receive a byte of data from the I2C target.
// [Note there is no error checking here.]
//
unsigned char InI2C(unsigned char address)
{
unsigned char retVal;

UCB0I2CSA = address; // UCB0I2CSA = <expander addr w/o R/W bit>.
UCB0CTLW0 &= ~UCTR; // RX.
GenStart(); // Generate a START.
WaitStart(); // Wait for START and slave address to be sent.
if ((UCB0IFG & UCNACKIFG) == 0) // Check for slave NACK.
{
// I2C slave responded. Get data.
WaitRx(); // Wait for data.
retVal = UCB0RXBUF; // Read UCB0RXBUF for data.
}
else
{
// I2C slave did not respond.
}
GenStop(); // Generate a STOP.
WaitStop(); // Wait for STOP to be sent/ready to go again.

return retVal;
}

int main(void)
{
const unsigned char sevSegTable[16] =
{
0x40, // 0
0x79, // 1
0x24, // 2
0x30, // 3
0x19, // 4
0x12, // 5
0x02, // 6
0x78, // 7
0x00, // 8
0x18, // 9
0x08, // A
0x03, // B
0x46, // C
0x21, // D
0x06, // E
0x0E // F
};

// Ex: address = I2C_8574 | I2C_0
// Ex: address = I2C_8574_A | I2C_3
unsigned char switchAddress = I2C_8574 | I2C_0;
unsigned char sevenSegLedAddress = I2C_8574 | I2C_3;
unsigned char sevenSegLedAddress2 = I2C_8574 | I2C_4;
unsigned char data;

ConfigureInterrupts();
EnableInterrupts();



InitI2C();
while (1)
{
data = InI2C(switchAddress);
data = sevSegTable[data & 0xF];
OutI2C(sevenSegLedAddress, data);
}

// this will never be hit (compiler will probably warn)
//return 0;
}

I just don't know how I can shift the switch address to only change one LED and the other 4 change the other. I also made a look up table so that the LED will display a hex number/letter based on the four switches.

MSP432P401R: Help coding my 8 switches to control two different 7-segment LEDs using Keil

$
0
0

Part Number:MSP432P401R

I am trying to code my MSP432 in C to make 4 switches control one of your 7-segment LEDs and the other 4 control the other 7-segment display. It is your choice what LED behavior you want. The switch also have to be interrupt driven. Here is what i have so far:

// Basic I2C Driver.
// Runs on MSP432.
// Matt Laubhan (11/15/2015)
//

#include <stdint.h>
#include "msp.h"
#include "InputOutput.h"
#define NVIC_ISER1 (HWREG32(0xE000E104)) /* Irq 32 to 63 Set Enable Register */

//----------------------------------------
// eUSCI wait until START and address are transmitted
//----------------------------------------
void WaitStart(void)
{
while ((UCB0CTLW0 & UCTXSTT) != 0);
}

//----------------------------------------
// eUSCI wait until STOP is complete
//----------------------------------------
void WaitStop(void)
{
while ((UCB0CTLW0 & UCTXSTP) != 0);
}

//----------------------------------------
// eUSCI wait until TX is complete
//----------------------------------------
void WaitTx(void)
{
while ((UCB0IFG & UCTXIFG0) == 0);
}

//----------------------------------------
// eUSCI wait until RX is complete
//----------------------------------------
void WaitRx(void)
{
while ((UCB0IFG & UCRXIFG0) == 0);
}

//----------------------------------------
// eUSCI generate start
//----------------------------------------
void GenStart(void)
{
UCB0CTLW0 |= UCTXSTT;
}

//----------------------------------------
// eUSCI generate stop
//----------------------------------------
void GenStop(void)
{
UCB0CTLW0 |= UCTXSTP;
}

////////////////////////////////////////////////////////////////////////
//
// Enable interrupts on P4.6. Port4_IRQHandler should get called below whenever
// a one of the 8 inputs to I2C_SWITCH change--provided P4.6 is connected
// to the INT signal on I2C_0.
//
void ConfigureInterrupts()
{
// Make sure P4.6 is an input and allow it to generate interrupts.
// Needs an internal pull-up resistor too.
P4DIR &= ~BIT6;
P4IES |= BIT6;
P4IE |= BIT6;
P4REN |= BIT6;
P4OUT |= BIT6;
P4IFG &= ~BIT6;
NVIC_ISER1 |= BIT6; // IRQ 38
}

// Function prototype
extern void EnableInterrupts(void); // defined in startup_msp432.s as a subroutine

// In Keil, name the ISR exactly the following...
void PORT4_IRQHandler(void)
{
// interrupt generated on any port 4 pin
//
// if ConfigureInterrupts() is called above, maskable interrupts
// are enabled [via the EnableInterrupts() function], and
// the INT pin of I2C_0 is connected to P4.6, this ISR will be called
// whenver a DIP switch changes
//
// this eliminate the need for the MSP432 CPU to poll the switches periodically
// to see if anything has changed
//
// ordinarily, ISRs should be short and defer further processing
// tasks to the main loop--however, at this point the main loop does nothing
// so it is OK to do other processing tasks here
//

// Always clear the port-level latch.
P4IFG &= ~BIT6;

// MSP432 will now resume whatever it was doing when the interrupt
// came in
}

// No parameters
void InitI2C(void)
{
//
// Configure with the following parameters:
// * 7-bit addresses.
// * single master environment.
// * MSP432 is always master.
// * I2C mode.
// * Synchronous mode.
// * SMCLK is source.
// * Automatically trigger address ACK.
// * No interrupts.
//
UCB0CTLW0 |= UCSWRST; // hold USCI in reset.
P1SEL0 |= 0xC0; // P1.7 (SCL) and P1.6 (SDA) multiplexing.
P1SEL1 &= ~0xC0;
UCB0CTLW0 |= (UCMST | UCMODE_3 | UCSYNC | UCSSEL_2);
UCB0BRW = 400; // Divide SMCLK down by this factor to get SCL.
UCB0CTLW0 &= ~UCSWRST; // release USCI reset.
}

//
// Send a byte of data to the I2C target.
// [Note there is no error checking here.]
//
void OutI2C(unsigned char address, unsigned char data)
{
UCB0I2CSA = address; // UCB0I2CSA = <expander addr w/o R/W bit>.
UCB0CTLW0 |= UCTR; // TX.
GenStart(); // Generate a START.
WaitStart(); // Wait for START and slave address to be sent.
WaitTx(); // Wait until it is safe to write to TX buffer.
UCB0TXBUF = data; // UCB0TXBUF = <data> (prep data).
if ((UCB0IFG & UCNACKIFG) == 0) // Check for slave NACK.
{
// I2C slave responded.
WaitTx(); // Wait until data is transferred.
}
else
{
// I2C slave did not respond.
}
GenStop(); // Generate a STOP.
WaitStop(); // Wait for STOP to be sent/ready to go again.
}

//
// Receive a byte of data from the I2C target.
// [Note there is no error checking here.]
//
unsigned char InI2C(unsigned char address)
{
unsigned char retVal;

UCB0I2CSA = address; // UCB0I2CSA = <expander addr w/o R/W bit>.
UCB0CTLW0 &= ~UCTR; // RX.
GenStart(); // Generate a START.
WaitStart(); // Wait for START and slave address to be sent.
if ((UCB0IFG & UCNACKIFG) == 0) // Check for slave NACK.
{
// I2C slave responded. Get data.
WaitRx(); // Wait for data.
retVal = UCB0RXBUF; // Read UCB0RXBUF for data.
}
else
{
// I2C slave did not respond.
}
GenStop(); // Generate a STOP.
WaitStop(); // Wait for STOP to be sent/ready to go again.

return retVal;
}

int main(void)
{
const unsigned char sevSegTable[16] =
{
0x40, // 0
0x79, // 1
0x24, // 2
0x30, // 3
0x19, // 4
0x12, // 5
0x02, // 6
0x78, // 7
0x00, // 8
0x18, // 9
0x08, // A
0x03, // B
0x46, // C
0x21, // D
0x06, // E
0x0E // F
};

// Ex: address = I2C_8574 | I2C_0
// Ex: address = I2C_8574_A | I2C_3
unsigned char switchAddress = I2C_8574 | I2C_0;
unsigned char sevenSegLedAddress = I2C_8574 | I2C_3;
unsigned char sevenSegLedAddress2 = I2C_8574 | I2C_4;
unsigned char data;

ConfigureInterrupts();
EnableInterrupts();



InitI2C();
while (1)
{
data = InI2C(switchAddress);
data = sevSegTable[data & 0xF];
OutI2C(sevenSegLedAddress, data);
}

// this will never be hit (compiler will probably warn)
//return 0;
}

I just don't know how I can shift the switch address to only change one LED and the other 4 change the other. I also made a look up table so that the LED will display a hex number/letter based on the four switches.

Help coding my MSP432P401R for 8 switches to control two different 7-segment LEDs using Keil

$
0
0

I am trying to code my MSP432 in C to make 4 switches control one of your 7-segment LEDs and the other 4 control the other 7-segment display. It is your choice what LED behavior you want. The switch also have to be interrupt driven. Here is what i have so far:

// Basic I2C Driver.
//

#include <stdint.h>
#include "msp.h"
#include "InputOutput.h"
#define NVIC_ISER1 (HWREG32(0xE000E104)) /* Irq 32 to 63 Set Enable Register */

//----------------------------------------
// eUSCI wait until START and address are transmitted
//----------------------------------------
void WaitStart(void)
{
while ((UCB0CTLW0 & UCTXSTT) != 0);
}

//----------------------------------------
// eUSCI wait until STOP is complete
//----------------------------------------
void WaitStop(void)
{
while ((UCB0CTLW0 & UCTXSTP) != 0);
}

//----------------------------------------
// eUSCI wait until TX is complete
//----------------------------------------
void WaitTx(void)
{
while ((UCB0IFG & UCTXIFG0) == 0);
}

//----------------------------------------
// eUSCI wait until RX is complete
//----------------------------------------
void WaitRx(void)
{
while ((UCB0IFG & UCRXIFG0) == 0);
}

//----------------------------------------
// eUSCI generate start
//----------------------------------------
void GenStart(void)
{
UCB0CTLW0 |= UCTXSTT;
}

//----------------------------------------
// eUSCI generate stop
//----------------------------------------
void GenStop(void)
{
UCB0CTLW0 |= UCTXSTP;
}

////////////////////////////////////////////////////////////////////////
//
// Enable interrupts on P4.6. Port4_IRQHandler should get called below whenever
// a one of the 8 inputs to I2C_SWITCH change--provided P4.6 is connected
// to the INT signal on I2C_0.
//
void ConfigureInterrupts()
{
// Make sure P4.6 is an input and allow it to generate interrupts.
// Needs an internal pull-up resistor too.
P4DIR &= ~BIT6;
P4IES |= BIT6;
P4IE |= BIT6;
P4REN |= BIT6;
P4OUT |= BIT6;
P4IFG &= ~BIT6;
NVIC_ISER1 |= BIT6; // IRQ 38
}

// Function prototype
extern void EnableInterrupts(void); // defined in startup_msp432.s as a subroutine

// In Keil, name the ISR exactly the following...
void PORT4_IRQHandler(void)
{
// interrupt generated on any port 4 pin
//
// if ConfigureInterrupts() is called above, maskable interrupts
// are enabled [via the EnableInterrupts() function], and
// the INT pin of I2C_0 is connected to P4.6, this ISR will be called
// whenver a DIP switch changes
//
// this eliminate the need for the MSP432 CPU to poll the switches periodically
// to see if anything has changed
//
// ordinarily, ISRs should be short and defer further processing
// tasks to the main loop--however, at this point the main loop does nothing
// so it is OK to do other processing tasks here
//

// Always clear the port-level latch.
P4IFG &= ~BIT6;

// MSP432 will now resume whatever it was doing when the interrupt
// came in
}

// No parameters
void InitI2C(void)
{
//
// Configure with the following parameters:
// * 7-bit addresses.
// * single master environment.
// * MSP432 is always master.
// * I2C mode.
// * Synchronous mode.
// * SMCLK is source.
// * Automatically trigger address ACK.
// * No interrupts.
//
UCB0CTLW0 |= UCSWRST; // hold USCI in reset.
P1SEL0 |= 0xC0; // P1.7 (SCL) and P1.6 (SDA) multiplexing.
P1SEL1 &= ~0xC0;
UCB0CTLW0 |= (UCMST | UCMODE_3 | UCSYNC | UCSSEL_2);
UCB0BRW = 400; // Divide SMCLK down by this factor to get SCL.
UCB0CTLW0 &= ~UCSWRST; // release USCI reset.
}

//
// Send a byte of data to the I2C target.
// [Note there is no error checking here.]
//
void OutI2C(unsigned char address, unsigned char data)
{
UCB0I2CSA = address; // UCB0I2CSA = <expander addr w/o R/W bit>.
UCB0CTLW0 |= UCTR; // TX.
GenStart(); // Generate a START.
WaitStart(); // Wait for START and slave address to be sent.
WaitTx(); // Wait until it is safe to write to TX buffer.
UCB0TXBUF = data; // UCB0TXBUF = <data> (prep data).
if ((UCB0IFG & UCNACKIFG) == 0) // Check for slave NACK.
{
// I2C slave responded.
WaitTx(); // Wait until data is transferred.
}
else
{
// I2C slave did not respond.
}
GenStop(); // Generate a STOP.
WaitStop(); // Wait for STOP to be sent/ready to go again.
}

//
// Receive a byte of data from the I2C target.
// [Note there is no error checking here.]
//
unsigned char InI2C(unsigned char address)
{
unsigned char retVal;

UCB0I2CSA = address; // UCB0I2CSA = <expander addr w/o R/W bit>.
UCB0CTLW0 &= ~UCTR; // RX.
GenStart(); // Generate a START.
WaitStart(); // Wait for START and slave address to be sent.
if ((UCB0IFG & UCNACKIFG) == 0) // Check for slave NACK.
{
// I2C slave responded. Get data.
WaitRx(); // Wait for data.
retVal = UCB0RXBUF; // Read UCB0RXBUF for data.
}
else
{
// I2C slave did not respond.
}
GenStop(); // Generate a STOP.
WaitStop(); // Wait for STOP to be sent/ready to go again.

return retVal;
}

int main(void)
{
const unsigned char sevSegTable[16] =
{
0x40, // 0
0x79, // 1
0x24, // 2
0x30, // 3
0x19, // 4
0x12, // 5
0x02, // 6
0x78, // 7
0x00, // 8
0x18, // 9
0x08, // A
0x03, // B
0x46, // C
0x21, // D
0x06, // E
0x0E // F
};

// Ex: address = I2C_8574 | I2C_0
// Ex: address = I2C_8574_A | I2C_3
unsigned char switchAddress = I2C_8574 | I2C_0;
unsigned char sevenSegLedAddress = I2C_8574 | I2C_3;
unsigned char sevenSegLedAddress2 = I2C_8574 | I2C_4;
unsigned char data;

ConfigureInterrupts();
EnableInterrupts();



InitI2C();
while (1)
{
data = InI2C(switchAddress);
data = sevSegTable[data & 0xF];
OutI2C(sevenSegLedAddress, data);
}

// this will never be hit (compiler will probably warn)
//return 0;
}

I just don't know how I can shift the switch address to only change one LED and the other 4 change the other. I also made a look up table so that the LED will display a hex number/letter based on the four switches.

MSP430F2274: I2C Slave Code for UCB0 does not send expected data to an I2C Master

$
0
0

Part Number:MSP430F2274

Have 2 cards with MSP430F2274’s, one using UCB0 as an I2C Master reading selected data from an identical card needing to be a Slave. Slave UCB0 code appears to respond, but does not return correct data. No other devices are involved on either card nor on the I2C bus.

 

Cards are custom, essentially a subset of TI’s MSP-TS430DA38 and have worked with no issues on several projects for over 5 yrs.

 

Both ‘-2274’s run with DCO = 8 MHz, SMCLK = 1 MHz and I2C clock = 100 KHz. I2C pullups of 10K are located on the Master, with the 2 cards connected by wires ~6” long.

 

The Master ‘430 works as expected when connected only to a representative I2C device (specifically a TCS34725 color sensor chip) where the Master sends a “command” byte identifying a target register, and the TCS34725 in response returns 2 bytes of data from the specified register(s). ‘scope plot of such a transaction:

Replacing the TCS34725 by my prototype ‘430 Slave, the same ‘430 Master instead sees the following; note I2C data bytes of 0x7F, 0xFF:

 

Tools are CCS v5.5.0.00077 with an MSP-FET430-UIF, and the 2-wire “SBW” connection to the -2274.

 

Slave Code is as follows (have tried several variations), and I must be missing some detail in the transition from Receive mode to Transmit mode:

Initialization, in “init_430” file, is:

with slave's Main being

Note that lines 29 & 33 of this Slave code tries to send data of 0x55 and 0xAA, while ‘scope shows 0x7F, 0xFF.

 

Help/explanations appreciated…


MSP430G2553: MSP430G2553 + ADXL345 over SPI

$
0
0

Part Number:MSP430G2553

Hi

I was trying to post my question in this thread, however, it is locked!

I am connecting the MSP430G2553 to the ADXL345 accelerometer over SPI and using this code to set the ADXL345:

///////////////////////////////////////////////////////////////////
void SPI_write(void){

P3OUT &= ~CS;               // BIT 3.7 is CS

while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x2D; // We want to write to the power register

while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x00; // Write the 0x00 to the power register (put the ADXL345 in standby mode)
///--------------------------------------------------------
while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x31; // We want to write to the data format register while the ADXL345 is in stanby mode

while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x09; // Write the 0x01 to the data format register (4g range)
///--------------------------------------------------------
while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x2C; // We want to write to the BW_RATE register

while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x09; // Write 0x09 to the BW_RATE register to set the ACC to 25Hz data rate (table 7, p#14 of datasheet)
// setting the ACC to this acceleration sampling rate should makes it consume 90microAmp.
//see note 7 on page 5 of the data sheet about the wake up time
///---------------------------------------------------------
while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x2D; // We want to write to the power register

while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x08; // Write the 0x08 to the power register to put it in measure mode
///---------------------------------------------------------
delay_ms(10);
while (!(UCB0STAT&UCBUSY)==0);
IFG2 &= ~UCA0RXIFG;

P3OUT |= CS;
}
////////////////////////////////////////////////////////////////////////

I am getting back the data. But it is different from when the ADXL345 is connected to the Arduino.

For example, when he accelerometer is still on the table, then I get 0.79 G rather than 1 G for the z-axis

anyone can help me with this

thank you

CCS/MSP430FR5969: READING ACCELEROMETER DEV_ID BY USING I2C

$
0
0

Part Number:MSP430FR5969

Tool/software: Code Composer Studio

hii..this is harikrishna paritala.

i am new to i2s protocol usage and am interfacing my mcu(msp430fr5969) with accelerometer..so when i am reading dev_id of accelerometer am not getting the value ..by the below code i used to read the value using i2c protocol without using interupts...any one please help to read the value and if possible please correct my code and add the instructons that i forgot....

#include <msp430.h>
char RXData;
#define REG_ADD 0x00
#define SLAVE_ADD 0x3B
void clock_init();
void Init_I2c();
char recieve(unsigned char reg_addr);
int main(void)
{
volatile char reg_value;
volatile char value;

WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
PM5CTL0 &= ~LOCKLPM5;
P1OUT &= ~BIT0; // Clear P1.0 output latch
P1DIR |= BIT0; // For LED
P1SEL1 |= BIT6 | BIT7; // I2C pins
__bis_SR_register(GIE);
clock_init();
Init_I2c();
__delay_cycles(10000);
while(I2c_notread());
__delay_cycles(1000);
reg_value=recieve(REG_ADD);
if(reg_value!=0x00)
value=reg_value;
return 0;
}
void Init_I2c()
{
UCB0CTLW0 |= UCSWRST; // Software reset enabled
UCB0CTLW0 |= UCMODE_3 | UCMST | UCSYNC; // I2C mode, Master mode, sync
UCB0CTLW1 |= UCASTP_2; // Automatic stop generated
UCB0CTLW0|=UCSSEL_2; // after UCB0TBCNT is reached
UCB0BR0 = 0x0010; // baudrate = SMCLK / 10
UCB0BR1=0;
//UCB0TBCNT = 0x0005; // number of bytes to be received
UCB0I2CSA = SLAVE_ADD; // Slave address
UCB0CTL1 &= ~UCSWRST;
}
int I2c_notread()
{
if(UCB0STATW&UCBBUSY)
return 1;
else
return 0;
}
char recieve(unsigned char reg_addr)
{
char recieve_byte;
while(UCB0CTLW0&UCTXSTP);//ensure stop condition got sent
UCB0CTLW0|=UCTXSTT|UCTR;//I2C start condition with uctr flag for transmit
while(UCB0IFG&UCTXIFG0);
UCB0TXBUF=reg_addr;
//write register address in txbuf
__delay_cycles(1000);
while(UCB0IFG&UCTXIFG0);//wait untill the txbuf empty and transmitted
UCB0CTLW0&=~UCTR;//clear transmit flag for receieve
UCB0CTLW0|=UCTXSTT|UCTXNACK;//I2C START CONDITION WITH NACK FOR ONE BYTE READ//like resarting....
while(UCB0CTLW0&UCTXSTT);//start conditon sent?rxbuf full
recieve_byte=UCB0RXBUF;
UCB0CTLW0|=UCTXSTP;//I2C stop conditon
return recieve_byte;
}
void clock_init()
{
CSCTL0_H = CSKEY >> 8; // Unlock CS registers
CSCTL1 = DCOFSEL_0; // Set DCO to 1MHz
CSCTL2 = SELA__LFXTCLK | SELS__DCOCLK | SELM__DCOCLK;
CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // set all dividers
CSCTL0_H = 0;
}

EVM430-FR6047: HID Bridge connected – waiting for device

$
0
0

Part Number:EVM430-FR6047

Hello,

I have the EVM430-FR6047 V2.0 kit. It used to work, but now it doesn't. I can connect, but it then says "HID Bridge Connected -- waiting for device"

My issue is similar to these forum posts:

e2e.ti.com/.../2392775

e2e.ti.com/.../615487

But of course the solutions don't work for me. Hard to see in the picture but LED3 is red, and D202 is blinking. I believe the LED3 being red is new, but I'm not 100% sure. But if that is some error code I figured it could be useful info. Could something be damaged?

I have the USS Lib 1.40.0.06 and Design Center Version 1.70.01.01, Win 7 Java 1.8.0_151.

I tried the USS Lib 1.30.0.04 and Design Center V1.60.02.01 also.

Any help would be appreciated. Thanks!

Samuel

CC430F5137: Status of JTAG pins when device is stand-alone

$
0
0

Part Number:CC430F5137

Hi,

What should be the status of the JTAG pins - after programming, so that the hardware is operational in stand-alone mode.

I have taken the status of "after power-up" in table B-47 of SLAU278Y (Rev March 2016)., ie,

TDO/TDI - pull up by resistor (1k-10k) to 3.3V

TDI/VPP - pull up by resistor (1k-10k) to 3.3V

TMS - pull up by resistor (1k-10k) to 3.3V

TCK - - pull up by resistor (1k-10k) to 3.3V

Test - pull down by resistor (1k-10k) to GND

RST - pull up by resistor (47) to 3.3V & capacitor to GND (as per fig 2.1 in SLAU278Y)

Is the above configuration ok?

Thanks in advance.

CCS/MSP-EXP430FR5994: How to code for sensor data that uses MSP's ADC

$
0
0

Part Number:MSP-EXP430FR5994

Tool/software: Code Composer Studio

I am making a project using TI MSP-EXP4330FR5994 and there i need to give myflex sensors input into the ADC of micorocntroller and then process it 

so i need help in writing or how to write code for fetching analog data directly from the sensors

CCS/msp430g2231: ccs v7

$
0
0

Part Number:msp430g2231

Tool/software: Code Composer Studio

Hello,

I've been trying to use Qmath format to multiply of two numbers but I have not been able to get the correct answers. Addition and subtraction results are correct.  I'm using CCS v7 with windows7 and have also tried ccs v6 which is giving the same results. Note: multiplying a single constant by 2 works. The code I'm using is as follows:


#include "msp430.h"
#include <stdint.h>

/* Select the global Q value and include the Qmath header file. */
#define GLOBAL_Q   12
#include "QmathLib.h"

volatile float res;         // floating point variable to verify results

int main(void)
{
    _q qA, qB, qC;          // Q variables using global type


    /* Disable WDT. */
    WDTCTL = WDTPW + WDTHOLD;

    /* Basic global Q operations. */
    qA = _Q(1.0);
    qB = _Q(2.5);
    qC = qA + qB; res=_QtoF(qC);                // 3.5 = 1.0 + 2.5      res result data correct
    qC = qC - _Qmpy2(qA); res=_QtoF(qC);        // 1.5 = 3.5 - 2*(1.0)  rec result data correct
    qC = _Qmpy(qB, qC); res=_QtoF(qC);          // 3.75 = 2.5 * 1.5     rec result data incorrect   1.234375
    qC = _Qdiv(qC, qB); res=_QtoF(qC);          // 1.5 = 3.75 / 2.5     rec result data incorrect   0.0771484375
    qC = _Qmpy2(qB);    res=_QtoF(qC);          //   5 = 2* 2.5         res result data correct
    return 0;
}


I assume the Qmath does work, so something in my setup must be incorrect.  Any suggestions?

Regards,

Art 

MSP430F5310: MSP430F5310 LPM3 Question

$
0
0

Part Number:MSP430F5310

Hi all.

I use MSP430F5310.

The question is about LPM3 mode.

My circuit consumption is 2.5uA.

If   XT1LFOFFG in UCSCTL7 is “1” & OFIFG in SFRIFG1 is “1”, the current will rise to 5.6uA until those bits will be reset.

Please send me TI PDF section that confirm this issue.

Thanks.

 


MSP430L092: Loader API functions don't seem to work

$
0
0

Part Number:MSP430L092

We are using the MSP430L092 in a product where it boots from an EEPROM.  We are downloading the program to the EEPROM and the processors boots up and runs fine.  However, we would like to put some calibration information into the EEPROM and want to use the loader API functions for that purpose.  In testing a few of the functions, none of them seem to return the value expected, or don't return at all (the processor seems to crash).  I can understand why we might have an issue with a function that actually talks to the EEPROM, but one function that does return is the SWID function, but the values in R12 and R13 are nothing like what would be expected.  I can understand why R12 might be different from the documentation since it refers to the loader software version, but R13, which contains the identifiers for TI and the MSP430, is also not correct.  We have reviewed the 'MSP430L092 Loader Code User's Guide' as well as Chapter 8 in the 'MSP430x09x Family User's Guide' which refers to the Loader Code.  It all seems so simple, it must mean we're missing something that we should be doing before calling the functions.  An example of our function call is:

CALL    &0xF884  ; SWID

We perform this call immediately after our firmware starts up, before we modify the clock speed or port configuration.  Is there something we need to do to make these functions available before calling the function vectors?  We have looked at the threads from Michael Pedigo titled 'None of the API functions of the loader seem to work', and it appears he is having a similar problem, but I don't see a solution there.


As for as the loader.h file, we've already recreated it from the information in the documentation, so unless that file actually contains different or additional information than the documentation, it would probably be no use to us.

Any help would be appreciated.

Thanks,

Robert Buchanan

CCS/MSP-EXP430FR5739: MSP430: Failed Soft Reset: Could not communicate with FET

$
0
0

Part Number:MSP-EXP430FR5739

Tool/software: Code Composer Studio

I have been developing on an MSP-EXP430FR5739 for the last week or so now, and lately when programming CCS fails to program with "MSP430: Failed Soft Reset: Could not communicate with FET". After resetting the board however it appears to run the new code?

Since I often develop on a mac, I have used the MSP-EXPFR5994 board as a programmer for one of the MCUs, however my networking application requires two (and I only have the one mac compatible programmer - hence only one is bugging).

I am unsure as to why the windows one is failing to program. The hardware is Rev1.1

RTOS/MSP430F5528: SPI Bus example for USCIB

$
0
0

Part Number:MSP430F5528

Tool/software:TI-RTOS

Hi,

I have an RTOS project under development that requires the addition of a driver for the SPI bus.

I have gone through all of the example code in MSP_EXP430F5529LP.c that came with my rtos kit.

All of the implementations seem to be focused on an SD card, DMA or wifi. 

Does an example exist for a more generic approach ?

I will only be transmitting data to an external DAC.  No data is being read from my external device.

Thank you

Roy Nordstrom

 

CCS/MSP430G2553: Trying to find the time between max pulses so I can caluculate heart beats per minute

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

This code successfully gets 10 pulse readings from the pulse sensor, but I'm trying to write code that will find the time between the max/peak pulses so I can calculate heart beats per minute. Can anyone help me write 
this code, because I'm really struggling. The pulse sensor gives out an analog value of about 500 when nobody is touching the sensor, but when somebody is touching the sensor, a peak value is about 700 - which indicates a heart beat.
Can anybody help me write this code?

#include  "msp430g2253.h"
 
// Variables
int adc[50] = {0}; //Sets up an array of 10 integers and zero's the values
int avg_adc = 0;
 
// Function prototypes
void adc_Setup();
void adc_Sam10();
 
void main()
{
      WDTCTL = WDTPW + WDTHOLD;         // Stop WDT
      adc_Setup();                      // Fucntion call for adc_setup
 
      while(1)
      {
          long adctot = 0;
          adc_Sam10();      // Function call for adc_samp
          // Add all the sampled data and divide by 10 to find average
          int i = 0;
          for(i = 0; i <= 49; i++){
              adctot = adctot + adc[i];
          }
          avg_adc = adctot/50;
      }
}
 
// ADC10 interrupt service routine
#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR(void)
{
  __bic_SR_register_on_exit(CPUOFF);        // Clear CPUOFF bit from 0(SR)
}
 
// ADC set-up function
void adc_Setup()
{
    ADC10CTL1 = CONSEQ_2 + INCH_0;                      // Repeat single channel, A0
    ADC10CTL0 = ADC10SHT_2 + MSC + ADC10ON + ADC10IE;   // Sample & Hold Time + ADC10 ON + Interrupt Enable
    ADC10DTC1 = 0x32;                                  // 1000 conversions
    ADC10AE0 |= 0x01;                                   // P1.0 ADC option select
}
 
// ADC sample conversion function
void adc_Sam10()
{
    ADC10CTL0 &= ~ENC;              // Disable Conversion
    while (ADC10CTL1 & BUSY);       // Wait if ADC10 busy
    ADC10SA = (int)adc;             // Transfers data to next array (DTC auto increments address)
    ADC10CTL0 |= ENC + ADC10SC;     // Enable Conversion and conversion start
    __bis_SR_register(CPUOFF + GIE);// Low Power Mode 0, ADC10_ISR
}

RTOS/SIMPLELINK-MSP432-SDK: Using RTC to trigger an event every 6 hours instead of watchdog

$
0
0

Part Number:SIMPLELINK-MSP432-SDK

Tool/software:TI-RTOS

Hi Team,

My application at present triggers an event every 6 hours and once that event is completed it registers the time with the data in the file on SD card.

At the moment we are using watchdog to execute this task.

However, the limitation of using watchdog is that we cannot put the unit in the deep sleep mode.

And in order to utilize the feature of deep sleep we have to use the RTC (real time clock).

Please can someone share information on how to trigger the RTC every 6 hours so as we can trigger the event and also once the event has accomplished how can we get the real time to be written into the SD card for the file written?

I have went through the forum and the document and also the header file "rtc_c.h" but it only shows how we can trigger every minute or every hour certain minute pass the hour.

For us, whenever we start the unit (msp432) every 6 hours after the start of the unit, the rtc should trigger the event and we need to get the time at the rtc triggered.

I am using the SimpleLink MSP432 SDK RTOS version.

Viewing all 22188 articles
Browse latest View live


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