Skip to main content
SSaya.1
Associate III
Sep 24, 2021 8:21 AM UTC
Solved

how to set RF SW CTRL pins?

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.
FRest.1
FRest.1Best answer
Associate III
Sep 24, 2021 9:30 AM UTC

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
Sep 24, 2021 9:27 AM UTC

I think you should use the related API

0693W00000FAK1JQAX.pngas described on AN5406

F.

FRest.1
FRest.1Best answer
Associate III
Sep 24, 2021 9:30 AM UTC

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