Example #1
0
void vRadio_Init(void)
{
  volatile    unsigned int tick_tmp;
  unsigned char times=0;
  /* Power Up the radio chip */
  si446x_reset();
//  si446x_apply_patch();
//  vRadio_PowerUp();
#ifdef SI446X_PATCH_CMDS
  if( si446x_apply_patch()==SI446X_SUCCESS)
  {
      DBUG("si446x_apply_patch SI446X_SUCCESS \r\n");
      si446x_power_up(0x01,0x00,0x01C9C380);
  }
  else
  {
    DBUG("si446x_apply_patch fail \r\n");
    si446x_power_up(0x01,0x00,0x01C9C380);
  }
#else
  DBUG(" no si446x_apply_patch  \r\n");
  si446x_power_up(0x01,0x00,0x01C9C380);
#endif
  /* Load radio configuration */
  si4438_phy.SI4438_reset_flag=1;
  while (SI446X_SUCCESS != si446x_configuration_init(pRadioConfiguration->Radio_ConfigurationArray))
  {
    times++;
    if(times>4)
    {
      si4438_phy.SI4438_reset_flag=0;
      DBUG("si446x_configuration_init fail");
      break;
    }
    Iwdg_Init();
    tick_tmp=GET_SYS_TICK;
    while(GET_SYS_TICK < (tick_tmp+TICK_50MS));
    SI4438_Config();
    si446x_reset();
  }

  // Read ITs, clear pending ones
  si446x_get_int_status(0u, 0u, 0u);
}
/*!
 *  Power up the Radio.
 *
 *  @note
 *
 */
void vRadio_PowerUp(void)
{
  SEGMENT_VARIABLE(wDelay,  U16, SEG_XDATA) = 0u;
  
  /* Hardware reset the chip */
  si446x_reset();

  /* Wait until reset timeout or Reset IT signal */
  for (; wDelay < pRadioConfiguration->Radio_Delay_Cnt_After_Reset; wDelay++);
}
Example #3
0
/*!
 *  Power up the Radio.
 *
 *  @note
 *
 */
void vRadio_PowerUp(void)
{
  uint16_t wDelay = 0u;

  /* Hardware reset the chip */
  si446x_reset();

  /* Wait until reset timeout or Reset IT signal */
  for (; wDelay < pRadioConfiguration->Radio_Delay_Cnt_After_Reset; wDelay++);
}