Hi,
I'm having a problem regarding the use of simpliciTI and the extension pins of the board. The project requires both boards the first one, winch is connected to the computer, sends to the other board a message which the user writes through putty. The other board which receives the message, has to read it and toggle the on board red led and the p2.3 pin. The problem is that even though the red led on the board does what it is supposed to do, the p2.3 pin does not change its state (stays at low state). Below is the code that I used:
#include "bsp.h"
#include "mrfi.h"
#include "radios/family1/mrfi_spi.h"
#include "msp430x22x4.h"
void sleep(unsigned int count){
while(count > 0){
count--;
__no_operation();
__no_operation();
__no_operation();
__no_operation();
}
}
int main(){
P2DIR |= 0x08;
WDTCTL=WDTPW+WDTHOLD;
BSP_Init();
DCOCTL = CALDCO_8MHZ;
BCSCTL1 = CALBC1_8MHZ;
UCA0CTL1 = UCSSEL_2;
UCA0BR0 = 0x41;
UCA0BR1 = 0x3;
UCA0MCTL = UCBRS1 + UCBRS0;
UCA0CTL1 &= ~UCSWRST;
IE2 |= UCA0RXIE;
MRFI_Init();
MRFI_WakeUp();
MRFI_RxOn();
__bis_SR_register(GIE);
while(1){
sleep(60000);
sleep(60000);
P1OUT ^= 0x02;
sleep(60000);
sleep(60000);
}
}
void MRFI_RxCompleteISR(){
char msg[4];
mrfiPacket_t packet;
MRFI_Receive(&packet);
msg[0] = packet.frame[9];
msg[1] = packet.frame[10];
msg[2] = ':';
msg[3] = ')';
if (msg[0] == 'd' && msg[1] == '1'){
P1OUT ^= 0x01;
P2OUT ^= 0x08;
}
if (msg[0] == 'd' && msg[1 ]== '2'){
P2OUT ^= 0x08;
}
}
What am I doing wrong? I really need to toggle the p2.3 extension pin. Any suggestion is welcome!
Thank you in advance.