This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: ISR Trap error in SPI communication

Part Number: MSP430FR5994

Hello,

I am trying to send a packet using the SPI communication. But when i am switch from first if condition to the second if condition i am facing a isr_trap error. Please drop your insights on this error.Thanks in advance

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <msp430.h>
#include <stdio.h>
#include <stdint.h>
void init_SPI()
{
UCB1CTLW0 |=UCSWRST;
UCB1CTLW0 &=~UCMSB;
UCB1CTLW0 |=UCMST;
UCB1CTLW0 |=UCMODE0;
UCB1CTLW0 |= UCSSEL__SMCLK;
UCB1BRW =10;
P5SEL0 |= BIT0 | BIT1 | BIT2;
PM5CTL0 &=~LOCKLPM5;
UCB1CTLW0 &=~UCSWRST;
UCB1IE |=~UCTXIE;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

**Attention** This is a public forum