Exemplo n.º 1
0
/*!
 *  Radio Initialization.
 *
 *  @author Sz. Papp
 *
 *  @note
 *
 */
void vRadio_Init(void)
{
  /* Power Up the radio chip */
  vRadio_PowerUp();

  /* Load radio configuration */
  while (SI446X_SUCCESS != si446x_configuration_init(pRadioConfiguration->Radio_ConfigurationArray))
  {
    /* Error hook */
    BSP_LedSet(0);
    Delay(2);
    BSP_LedClear(0);

    /* Power Up the radio chip */
    vRadio_PowerUp();
  }

  // Read ITs, clear pending ones
  si446x_get_int_status(0u, 0u, 0u);
}
Exemplo n.º 2
0
/*!
 *  Radio Initialization.
 *
 *  @author Sz. Papp
 *
 *  @note
 *
 */
void vRadio_Init(void)
{
  U16 wDelay;

  /* Power Up the radio chip */
  vRadio_PowerUp();

  /* Load radio configuration */
  while (SI446X_SUCCESS != si446x_configuration_init(pRadioConfiguration->Radio_ConfigurationArray))
  {
    /* Error hook */    
    for (wDelay = 0x7FFF; wDelay--; ) ;

    /* Power Up the radio chip */
    vRadio_PowerUp();
  }

  // Read ITs, clear pending ones
  si446x_get_int_status(0u, 0u, 0u);
}
Exemplo n.º 3
0
void vRadio_Init(void)
{
  U16 wDelay;

  /* Power Up the radio chip */
  vRadio_PowerUp();

  /* Load radio configuration */
  while (SI446X_SUCCESS != si446x_configuration_init(pRadioConfiguration->Radio_ConfigurationArray))
  {

    for (wDelay = 0x7FFF; wDelay--; ) ;

    /* Power Up the radio chip */
    vRadio_PowerUp();
  }

  // Read ITs, clear pending ones
  si446x_get_int_status(0u, 0u, 0u);  
  
  si446x_fifo_info(SI446X_CMD_FIFO_INFO_ARG_RX_BIT);
} 
Exemplo n.º 4
0
/*!
 *  Radio Initialization.
 *
 *  @author Sz. Papp
 *
 *  @note
 *
 */
void vRadio_Init(void)
{
  U16 wDelay;

  /* Power Up the radio chip */
  vRadio_PowerUp();

  /* Load radio configuration */
  while (SI446X_SUCCESS != si446x_configuration_init(pRadioConfiguration->Radio_ConfigurationArray))
  {
    /* Error hook */
#if !(defined SILABS_PLATFORM_WMB912)
    LED4 = !LED4;
#else
    vCio_ToggleLed(eHmi_Led4_c);
#endif
    for (wDelay = 0x7FFF; wDelay--; ) ;
    /* Power Up the radio chip */
    vRadio_PowerUp();
  }

  // Read ITs, clear pending ones
  si446x_get_int_status(0u, 0u, 0u);
}
Exemplo n.º 5
0
Arquivo: radio.c Projeto: x893/WDS
/*!
 *  Radio Initialization.
 *
 *  @author Sz. Papp
 *
 *  @note
 *
 */
void vRadio_Init(void)
{
  U16 lTemp;

#if (RADIO_CONFIGURATION_DATA_RADIO_PATCH_INCLUDED > 0x00)
  const SEGMENT_VARIABLE(RadioPatch[RADIO_CONFIGURATION_DATA_RADIO_PATCH_SIZE], U8, SEG_CODE) = \
      RADIO_CONFIGURATION_DATA_RADIO_PATCH;

#endif

  do
  {
    /* Power Up the radio chip */
    vRadio_PowerUp();

    /* Load the 1st part of the configuration array (128 bytes) */
    si4455_write_ezconfig_array(128u, pRadioConfiguration->EzConfig_Array);

    /* Delay between two part to let the radio process the incoming data */
    for (lTemp = 0x07FF; lTemp; lTemp--)  ;

    /* Load the final part of the configuration array (128 bytes) */
    si4455_write_ezconfig_array(EZCONFIG_RADIO_CFG_SIZE - 128u, (U8 *) pRadioConfiguration->EzConfig_Array + 128u);

    lTemp = bRadio_Check_Ezconfig(pRadioConfiguration->EzConfig_Array_CRC);

    /* Check the return value */
    if (lTemp == 1u) { LED4 = !LED4; }
    if (lTemp == 2u) { LED3 = !LED3; }
  } while(lTemp != 0u);

  // Read ITs, clear pending ones
  si4455_get_int_status(0u, 0u, 0u);

  /* Set XO TUNE */
  si4455_set_property(
      SI4455_PROP_GRP_ID_EZCONFIG,
      SI4455_PROP_GRP_LEN_EZCONFIG,
      SI4455_PROP_GRP_INDEX_EZCONFIG_XO_TUNE,
      (U8) pRadioConfiguration->Radio_EZCONFIG_XO_TUNE
  );

  /* Enable ITs */
  si4455_set_property(
      SI4455_PROP_GRP_ID_INT_CTL,
      SI4455_PROP_GRP_LEN_INT_CTL,
      SI4455_PROP_GRP_INDEX_INT_CTL_ENABLE,
      (U8) pRadioConfiguration->Radio_INT_CTL_ENABLE,
      (U8) pRadioConfiguration->Radio_INT_CTL_PH_ENABLE,
      (U8) pRadioConfiguration->Radio_INT_CTL_MODEM_ENABLE,
      (U8) pRadioConfiguration->Radio_INT_CTL_CHIP_ENABLE
  );

  // Configure Fast response registers
  si4455_set_property(
      SI4455_PROP_GRP_ID_FRR_CTL,
      SI4455_PROP_GRP_LEN_FRR_CTL,
      SI4455_PROP_GRP_INDEX_FRR_CTL_A_MODE,
      (U8) pRadioConfiguration->Radio_FRR_CTL_A_MODE,
      (U8) pRadioConfiguration->Radio_FRR_CTL_B_MODE,
      (U8) pRadioConfiguration->Radio_FRR_CTL_C_MODE,
      (U8) pRadioConfiguration->Radio_FRR_CTL_D_MODE
  );

  // Configure GPIO pins
  si4455_gpio_pin_cfg(
      pRadioConfiguration->Radio_GPIO0_PIN_CFG,
      pRadioConfiguration->Radio_GPIO1_PIN_CFG,
      pRadioConfiguration->Radio_GPIO2_PIN_CFG,
      pRadioConfiguration->Radio_GPIO3_PIN_CFG,
      pRadioConfiguration->Radio_GPIO_NIRQ_MODE,
      pRadioConfiguration->Radio_GPIO_SDO_MODE,
      pRadioConfiguration->Radio_GPIO_GEN_CONFIG
  );

  // Put the Radio into configured state
  si4455_change_state(pRadioConfiguration->Radio_State_After_Power_Up);

  // Read ITs, clear pending ones
  si4455_get_int_status(0u, 0u, 0u);
}