sreenathrns
Newbie level 1
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]