MSP430-RF2500 reading a packet problem

Status
Not open for further replies.

koiranos

Newbie level 3
Joined
Nov 26, 2006
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
Hello my name is Kostas and I want to ask you a question regarding the MSP430 eZ430-RF2500 development tool.
I'm trying to send a packet, by pressing the button on the board, containing the letter "A" from one board to another. When the packet is received I want it to check if it contains that letter and if it does, to turn on the red light on the other board. The problem is that I cannot read the contents of the packet thus, I cannot perform the check. Below is the code that I'm using to perform this task. What should I do to fix this problem?
Thanks in advance.


Code:
#include "mrfi.h"
#include "radios/family1/mrfi_spi.h"

int main()
{
  BSP_Init();
  P1REN |= 0x04;
  P1IE |= 0x04;
  MRFI_Init();
  MRFI_WakeUp();
  MRFI_RxOn();
  __bis_SR_register(GIE+LPM4_bits);
}

void MRFI_RxCompleteISR()
{
  mrfiPacket_t packet;
  MRFI_Receive(&packet);
  if (packet.frame[0]=='A'){
  P1OUT ^= 0x02;
  }
}

#pragma vector=PORT1_VECTOR

__interrupt void Port_1()
{
  P1IFG &= ~0x04;
  char rx='A';
  mrfiPacket_t packet;
  packet.frame[0]=rx;
  MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED);
  P1OUT ^= 0x01;
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…