示例#1
0
void TI_CC_PowerupResetCCxxxx(void)
{
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;
  TI_CC_Wait(30);
  TI_CC_CSn_PxOUT &= ~TI_CC_CSn_PIN;
  TI_CC_Wait(30);
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;
  TI_CC_Wait(45);

  TI_CC_CSn_PxOUT &= ~TI_CC_CSn_PIN;        // /CS enable
  while (!(IFG2&UCB0TXIFG));                // Wait for TXBUF ready
  UCB0TXBUF = TI_CCxxx0_SRES;               // Send strobe
  // Strobe addr is now being TX'ed
  while (UCB0STAT & UCBUSY);                // Wait for TX to complete
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;         // /CS disable
}
示例#2
0
void TI_CC_PowerupResetCCxxxx(void)
{
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;
  TI_CC_Wait(30);
  TI_CC_CSn_PxOUT &= ~TI_CC_CSn_PIN;
  TI_CC_Wait(30);
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;
  TI_CC_Wait(45);

  TI_CC_CSn_PxOUT &= ~TI_CC_CSn_PIN;        // /CS enable
  while (TI_CC_SPI_USCIB0_PxIN&TI_CC_SPI_USCIB0_SOMI);// Wait for CCxxxx ready
  UCB0TXBUF = TI_CCxxx0_SRES;               // Send strobe
  // Strobe addr is now being TX'ed
  IFG2 &= ~UCB0RXIFG;                       // Clear flag
  while (!(IFG2&UCB0RXIFG));                // Wait for end of addr TX
  while (TI_CC_SPI_USCIB0_PxIN&TI_CC_SPI_USCIB0_SOMI);
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;         // /CS disable
}
void Reset_Radios(void)
{
  P5OUT |= CS_1101;                   //Toggle CS with delays to power up radio
  TI_CC_Wait(30);
  P5OUT &= ~CS_1101;
  TI_CC_Wait(30);
  P5OUT |= CS_1101;
  TI_CC_Wait(45);

  P5OUT &= ~CS_1101;                           // CS enable
  while (!(UC1IFG & UCB1TXIFG));               // Wait for TXBUF ready
  UCB1TXBUF = TI_CCxxx0_SRES;               // Send strobe
                                            // Strobe addr is now being TX'ed
  while (UCB1STAT & UCBUSY);                // Wait for TX to complete
  P5OUT |= CS_1101;                           // CS disable
  
  P5OUT |= CS_2500;                   //Toggle CS with delays to power up radio
  TI_CC_Wait(30);
  P5OUT &= ~CS_2500;
  TI_CC_Wait(30);
  P5OUT |= CS_2500;
  TI_CC_Wait(45);

  P5OUT &= ~CS_2500;                           // CS enable
  while (!(UC1IFG & UCB1TXIFG));               // Wait for TXBUF ready
  UCB1TXBUF = TI_CCxxx0_SRES;               // Send strobe
                                            // Strobe addr is now being TX'ed
  while (UCB1STAT & UCBUSY);                // Wait for TX to complete
  P5OUT |= CS_2500;                           // CS disable
}