Skip to main content
SSaya.1
Associate III
September 24, 2021
Solved

how to set RF SW CTRL pins?

  • September 24, 2021
  • 2 replies
  • 1841 views

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

This topic has been closed for replies.
Best answer by FRest.1

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; 
 }

2 replies

FRest.1
Associate III
September 24, 2021

I think you should use the related API

0693W00000FAK1JQAX.pngas described on AN5406

F.

FRest.1
FRest.1Best answer
Associate III
September 24, 2021

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; 
 }