MSP 430 need urgent help in tx/tx simple program

Status
Not open for further replies.

sreenathrns

Newbie level 1
Joined
Apr 22, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
recently i was working with msp 430 for simple tx/rx program and I am unable to send the packets and I am getting some errors in the last part (mrfi_transmit and &packets). Could anyone help? am new to this one. I am using IAR workbench

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "mrfi.h"
int main(void)
{
BSP_Init();// disables the watchdog, initializes the MCLK at 8MHz, sets LED ports as outputs and the button port as input.
 
P1REN |= 0x04;// enables the internal resistor of thebutton
 
P1IE |= 0x04;// enables interrupts
 
 
MRFI_Init(); // initializes the 6 wires between the MSP430 and the CC2500,powers-up the CC2500 and configures the CC2500 47 registers and turns on interrupts from the CC2500;
 
MRFI_WakeUp();// wakes up the radio, i.e. it turns on the 26MHz crystal attach to it without entering Rx or Tx mode;
 
MRFI_RxOn() ;// switches the radio to Rx mode; from this line on, it can receive packets,in which case the interrupt function 
 
__bis_SR_register(GIE+LPM4_bits);// enables interrupts globally and enters LPM4
}
 
void MRFI_RxCompleteISR()
{
P1OUT ^= 0x02;// toggle both leds
}
 
 
#pragma vector=PORT1_VECTOR // declare that this function should be called when an interrupt of type PORT1_VECTOR happens
__interrupt void Port_1 (void)
{
[B]P1IFG &= ~0x04; //resets the interrupt flag
mrfiPacket_t packet;
packet.frame[0]=8+20;
MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED);
P1OUT ^= 0x01;[/B]

 


Hi sreenath,

I have some doubts on your thread.
* Are you using msp430 or eZ430-RF2500 USB dongle ?
* Are Imported whole project code into the workspace not a single c file?

Try this below Code of Simple tx and rx for eZ430-RF2500.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "mrfi.h"
int main(void)
{
  BSP_Init();
  P1REN |= 0x04;
  P1IE |= 0x04;
  MRFI_Init();
  MRFI_WakeUp();
  MRFI_RxOn();
  __bis_SR_register(GIE+LPM4_bits);
}
void MRFI_RxCompleteISR()
{
  P1OUT ^= 0x02;
}
#pragma vector=PORT1_VECTOR
__interrupt void Port_1 (void)
{
  P1IFG &= ~0x04;
  mrfiPacket_t packet;
  packet.frame[0]=8+20;
  MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED);
  P1OUT ^= 0x01;
}


Thank you.
 
Last edited by a moderator:
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…