From 83c75333ecf9c9e436f2edaa5ec1ac50ebf4689d Mon Sep 17 00:00:00 2001 From: Diego Ismirlian Date: Tue, 28 Jan 2020 03:21:12 -0300 Subject: [PATCH] [efr32] Radio: correct PA supply selection for BRD4166A (#4506) --- examples/platforms/efr32mg12/brd4161a/board_config.h | 2 ++ examples/platforms/efr32mg12/brd4166a/board_config.h | 2 ++ examples/platforms/efr32mg12/brd4170a/board_config.h | 2 ++ examples/platforms/efr32mg12/brd4304a/board_config.h | 2 ++ examples/platforms/efr32mg12/radio.c | 4 ++++ 5 files changed, 12 insertions(+) diff --git a/examples/platforms/efr32mg12/brd4161a/board_config.h b/examples/platforms/efr32mg12/brd4161a/board_config.h index 1aee7a10e..fdcf413b2 100644 --- a/examples/platforms/efr32mg12/brd4161a/board_config.h +++ b/examples/platforms/efr32mg12/brd4161a/board_config.h @@ -45,4 +45,6 @@ #define RADIO_CONFIG_DMP_SUPPORT 0 /// Set to 1 to enable Dynamic Multi-Protocol support in radio.c #endif +#define RADIO_CONFIG_PA_USES_DCDC 0 /// The PA(s) is(are) fed from VBAT + #endif // __BOARD_CONFIG_H__ diff --git a/examples/platforms/efr32mg12/brd4166a/board_config.h b/examples/platforms/efr32mg12/brd4166a/board_config.h index 1aee7a10e..3e5ff293e 100644 --- a/examples/platforms/efr32mg12/brd4166a/board_config.h +++ b/examples/platforms/efr32mg12/brd4166a/board_config.h @@ -45,4 +45,6 @@ #define RADIO_CONFIG_DMP_SUPPORT 0 /// Set to 1 to enable Dynamic Multi-Protocol support in radio.c #endif +#define RADIO_CONFIG_PA_USES_DCDC 1 /// The PA(s) is(are) fed from the DCDC + #endif // __BOARD_CONFIG_H__ diff --git a/examples/platforms/efr32mg12/brd4170a/board_config.h b/examples/platforms/efr32mg12/brd4170a/board_config.h index c40f4a485..9ec59c0c6 100644 --- a/examples/platforms/efr32mg12/brd4170a/board_config.h +++ b/examples/platforms/efr32mg12/brd4170a/board_config.h @@ -46,4 +46,6 @@ #define RADIO_CONFIG_DMP_SUPPORT 0 /// Set to 1 to enable Dynamic Multi-Protocol support in radio.c #endif +#define RADIO_CONFIG_PA_USES_DCDC 0 /// The PA(s) is(are) fed from VBAT + #endif // __BOARD_CONFIG_H__ diff --git a/examples/platforms/efr32mg12/brd4304a/board_config.h b/examples/platforms/efr32mg12/brd4304a/board_config.h index 1aee7a10e..fdcf413b2 100644 --- a/examples/platforms/efr32mg12/brd4304a/board_config.h +++ b/examples/platforms/efr32mg12/brd4304a/board_config.h @@ -45,4 +45,6 @@ #define RADIO_CONFIG_DMP_SUPPORT 0 /// Set to 1 to enable Dynamic Multi-Protocol support in radio.c #endif +#define RADIO_CONFIG_PA_USES_DCDC 0 /// The PA(s) is(are) fed from VBAT + #endif // __BOARD_CONFIG_H__ diff --git a/examples/platforms/efr32mg12/radio.c b/examples/platforms/efr32mg12/radio.c index 9eab725c9..57a39d7e1 100644 --- a/examples/platforms/efr32mg12/radio.c +++ b/examples/platforms/efr32mg12/radio.c @@ -186,7 +186,11 @@ static const RAIL_IEEE802154_Config_t sRailIeee802154Config = { .isPanCoordinator = false, }; +#if RADIO_CONFIG_PA_USES_DCDC +RAIL_DECLARE_TX_POWER_DCDC_CURVES(piecewiseSegments, curvesSg, curves24Hp, curves24Lp); +#else RAIL_DECLARE_TX_POWER_VBAT_CURVES(piecewiseSegments, curvesSg, curves24Hp, curves24Lp); +#endif static int8_t sTxPowerDbm = OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER;