cancel
Showing results for 
Search instead for 
Did you mean: 

how to set RF SW CTRL pins?

SSaya.1
Associate II

Hello, How to set RF SW CTRL pins? How to make them appear in platform settings of SUBGHZ_PHY configuration?0693W00000FAJMGQA5.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
FRest.1
Associate III

anyway they are controlled by BSP drivers

This is part of the drivers:

int32_t BSP_RADIO_ConfigRFSwitch(BSP_RADIO_Switch_TypeDef Config)
{
  switch (Config)
  {
    case RADIO_SWITCH_OFF:
    {
      /* Turn off switch */
      HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
      HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
      HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
      break;      
    }

View solution in original post

2 REPLIES 2
FRest.1
Associate III

I think you should use the related API

0693W00000FAK1JQAX.pngas described on AN5406

F.

FRest.1
Associate III

anyway they are controlled by BSP drivers

This is part of the drivers:

int32_t BSP_RADIO_ConfigRFSwitch(BSP_RADIO_Switch_TypeDef Config)
{
  switch (Config)
  {
    case RADIO_SWITCH_OFF:
    {
      /* Turn off switch */
      HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
      HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
      HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
      break;      
    }