From 7ca3bea7010ebe907c86e4752f371e170ab3ae93 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Mon, 5 Dec 2016 12:11:58 +0000 Subject: [PATCH] Make LNA bias trim offset configurable --- cpu/cc26xx-cc13xx/rf-core/smartrf-settings.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cpu/cc26xx-cc13xx/rf-core/smartrf-settings.c b/cpu/cc26xx-cc13xx/rf-core/smartrf-settings.c index 3732240ea..8e3454916 100644 --- a/cpu/cc26xx-cc13xx/rf-core/smartrf-settings.c +++ b/cpu/cc26xx-cc13xx/rf-core/smartrf-settings.c @@ -48,6 +48,12 @@ #define SMARTRF_SETTINGS_OVERRIDE_RSSI_OFFSET 0x00FB88A3 #endif /*---------------------------------------------------------------------------*/ +#ifdef SMARTRF_SETTINGS_CONF_OVERRIDE_TRIM_OFFSET +#define SMARTRF_SETTINGS_OVERRIDE_TRIM_OFFSET SMARTRF_SETTINGS_CONF_OVERRIDE_TRIM_OFFSET +#else +#define SMARTRF_SETTINGS_OVERRIDE_TRIM_OFFSET 0x00038883 +#endif +/*---------------------------------------------------------------------------*/ /* Overrides for CMD_PROP_RADIO_DIV_SETUP */ static uint32_t overrides[] = { @@ -96,9 +102,9 @@ static uint32_t overrides[] = ADI_HALFREG_OVERRIDE(0, 61, 0xF, 0xD), /* * override_phy_gfsk_rx.xml - * Rx: Set LNA bias current trim offset to 3 + * Rx: Set LNA bias current trim offset. The board can override this */ - (uint32_t)0x00038883, + (uint32_t)SMARTRF_SETTINGS_OVERRIDE_TRIM_OFFSET, /* Rx: Freeze RSSI on sync found event */ HW_REG_OVERRIDE(0x6084, 0x35F1), /*