The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_TB_SENSE_1/TARGET_Silicon_Labs/TARGET_SL_RAIL/efr32-rf-driver/rail/rail_chip_specific.h@142:4eea097334d6, 2017-05-10 (annotated)
- Committer:
- Anna Bridge
- Date:
- Wed May 10 11:31:27 2017 +0100
- Revision:
- 142:4eea097334d6
- Child:
- 159:7130f322cb7e
Release 142 of the mbed library
Ports for Upcoming Targets
Fixes and Changes
4059: [Silicon Labs] Rename targets https://github.com/ARMmbed/mbed-os/pull/4059
4187: [NCS36510] Reduce default heap size allocated by IAR to 1/4 of RAM https://github.com/ARMmbed/mbed-os/pull/4187
4225: fixed missing device_name for xDot and removed progen https://github.com/ARMmbed/mbed-os/pull/4225
4251: Fix C++11 build error w/ u-blox EVK-ODIN-W2 https://github.com/ARMmbed/mbed-os/pull/4251
4236: STM32 Fixed warning related to __packed redefinition https://github.com/ARMmbed/mbed-os/pull/4236
4190: LPC4088: Enable LWIP feature https://github.com/ARMmbed/mbed-os/pull/4190
4260: Inherit Xadow M0 target from LPC11U35_501 https://github.com/ARMmbed/mbed-os/pull/4260
4249: Add consistent button names across targets https://github.com/ARMmbed/mbed-os/pull/4249
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Anna Bridge |
142:4eea097334d6 | 1 | /***************************************************************************//** |
Anna Bridge |
142:4eea097334d6 | 2 | * @file rail_chip_specific.h |
Anna Bridge |
142:4eea097334d6 | 3 | * @brief This file contains the type definitions for EFR32 chip specific |
Anna Bridge |
142:4eea097334d6 | 4 | * aspects of RAIL. |
Anna Bridge |
142:4eea097334d6 | 5 | * @copyright Copyright 2015 Silicon Laboratories, Inc. http://www.silabs.com |
Anna Bridge |
142:4eea097334d6 | 6 | ******************************************************************************/ |
Anna Bridge |
142:4eea097334d6 | 7 | |
Anna Bridge |
142:4eea097334d6 | 8 | #ifndef __RAIL_CHIP_SPECIFIC_H_ |
Anna Bridge |
142:4eea097334d6 | 9 | #define __RAIL_CHIP_SPECIFIC_H_ |
Anna Bridge |
142:4eea097334d6 | 10 | |
Anna Bridge |
142:4eea097334d6 | 11 | // Include standard type headers to help define structures |
Anna Bridge |
142:4eea097334d6 | 12 | #include <stdint.h> |
Anna Bridge |
142:4eea097334d6 | 13 | #include <stdbool.h> |
Anna Bridge |
142:4eea097334d6 | 14 | #include <stddef.h> |
Anna Bridge |
142:4eea097334d6 | 15 | |
Anna Bridge |
142:4eea097334d6 | 16 | // ----------------------------------------------------------------------------- |
Anna Bridge |
142:4eea097334d6 | 17 | // Calibration |
Anna Bridge |
142:4eea097334d6 | 18 | // ----------------------------------------------------------------------------- |
Anna Bridge |
142:4eea097334d6 | 19 | /** |
Anna Bridge |
142:4eea097334d6 | 20 | * @addtogroup Calibration |
Anna Bridge |
142:4eea097334d6 | 21 | * @{ |
Anna Bridge |
142:4eea097334d6 | 22 | */ |
Anna Bridge |
142:4eea097334d6 | 23 | |
Anna Bridge |
142:4eea097334d6 | 24 | /** |
Anna Bridge |
142:4eea097334d6 | 25 | * @addtogroup EFR32 |
Anna Bridge |
142:4eea097334d6 | 26 | * @{ |
Anna Bridge |
142:4eea097334d6 | 27 | * @brief EFR32 Specific Calibrations |
Anna Bridge |
142:4eea097334d6 | 28 | * |
Anna Bridge |
142:4eea097334d6 | 29 | * The EFR32 has two supported calibrations. There is the Image Rejection (IR) |
Anna Bridge |
142:4eea097334d6 | 30 | * calibration and a temperature dependent calibration. The IR calibration is |
Anna Bridge |
142:4eea097334d6 | 31 | * something that can be computed once and stored off or computed each time at |
Anna Bridge |
142:4eea097334d6 | 32 | * startup. It is PHY specific and provides sensitivity improvements so we |
Anna Bridge |
142:4eea097334d6 | 33 | * highly recommend using it. The IR calibration should only be run when the |
Anna Bridge |
142:4eea097334d6 | 34 | * radio is IDLE. |
Anna Bridge |
142:4eea097334d6 | 35 | * |
Anna Bridge |
142:4eea097334d6 | 36 | * The temperature dependent calibrations are used to recalibrate the synth if |
Anna Bridge |
142:4eea097334d6 | 37 | * the temperature crosses 0C or the temperature delta since the last |
Anna Bridge |
142:4eea097334d6 | 38 | * calibration exceeds 70C while sitting in receive. RAIL will run VCO |
Anna Bridge |
142:4eea097334d6 | 39 | * calibration automatically upon entering receive state so the application can |
Anna Bridge |
142:4eea097334d6 | 40 | * omit this calibration if the stack will re-enter receive with enough |
Anna Bridge |
142:4eea097334d6 | 41 | * frequency to not hit this temperature delta. If the application does not |
Anna Bridge |
142:4eea097334d6 | 42 | * calibrate for temperature, it's possible to miss receive packets due to |
Anna Bridge |
142:4eea097334d6 | 43 | * drift in the carrier frequency. |
Anna Bridge |
142:4eea097334d6 | 44 | */ |
Anna Bridge |
142:4eea097334d6 | 45 | |
Anna Bridge |
142:4eea097334d6 | 46 | /** |
Anna Bridge |
142:4eea097334d6 | 47 | * @struct RAIL_CalValues_t |
Anna Bridge |
142:4eea097334d6 | 48 | * @brief Calibration value structure |
Anna Bridge |
142:4eea097334d6 | 49 | * |
Anna Bridge |
142:4eea097334d6 | 50 | * This structure contains the set of persistent calibration values for the |
Anna Bridge |
142:4eea097334d6 | 51 | * EFR32. You can set these before hand and apply them at startup to save the |
Anna Bridge |
142:4eea097334d6 | 52 | * time required to compute them. Any of these values may be set to |
Anna Bridge |
142:4eea097334d6 | 53 | * RAIL_CAL_INVALID_VALUE to force the code to compute that calibration value. |
Anna Bridge |
142:4eea097334d6 | 54 | */ |
Anna Bridge |
142:4eea097334d6 | 55 | typedef struct RAIL_CalValues { |
Anna Bridge |
142:4eea097334d6 | 56 | uint32_t imageRejection; /**< Image Rejection (IR) calibration value */ |
Anna Bridge |
142:4eea097334d6 | 57 | } RAIL_CalValues_t; |
Anna Bridge |
142:4eea097334d6 | 58 | |
Anna Bridge |
142:4eea097334d6 | 59 | /** Invalid calibration value */ |
Anna Bridge |
142:4eea097334d6 | 60 | #define RAIL_CAL_INVALID_VALUE (0xFFFFFFFF) |
Anna Bridge |
142:4eea097334d6 | 61 | |
Anna Bridge |
142:4eea097334d6 | 62 | /** |
Anna Bridge |
142:4eea097334d6 | 63 | * A define to set all RAIL_CalValues_t values to uninitialized. |
Anna Bridge |
142:4eea097334d6 | 64 | * |
Anna Bridge |
142:4eea097334d6 | 65 | * This define can be used when you have no data to pass to the calibration |
Anna Bridge |
142:4eea097334d6 | 66 | * routines but wish to compute and save all possible calibrations. |
Anna Bridge |
142:4eea097334d6 | 67 | */ |
Anna Bridge |
142:4eea097334d6 | 68 | #define RAIL_CALVALUES_UNINIT { \ |
Anna Bridge |
142:4eea097334d6 | 69 | RAIL_CAL_INVALID_VALUE, \ |
Anna Bridge |
142:4eea097334d6 | 70 | } |
Anna Bridge |
142:4eea097334d6 | 71 | |
Anna Bridge |
142:4eea097334d6 | 72 | /** EFR32 specific temperature calibration bit */ |
Anna Bridge |
142:4eea097334d6 | 73 | #define RAIL_CAL_TEMP_VCO (0x00000001) |
Anna Bridge |
142:4eea097334d6 | 74 | /** EFR32 specific IR calibration bit */ |
Anna Bridge |
142:4eea097334d6 | 75 | #define RAIL_CAL_ONETIME_IRCAL (0x00010000) |
Anna Bridge |
142:4eea097334d6 | 76 | |
Anna Bridge |
142:4eea097334d6 | 77 | /** Mask to run temperature dependent calibrations */ |
Anna Bridge |
142:4eea097334d6 | 78 | #define RAIL_CAL_TEMP (RAIL_CAL_TEMP_VCO) |
Anna Bridge |
142:4eea097334d6 | 79 | /** Mask to run one time calibrations */ |
Anna Bridge |
142:4eea097334d6 | 80 | #define RAIL_CAL_ONETIME (RAIL_CAL_ONETIME_IRCAL) |
Anna Bridge |
142:4eea097334d6 | 81 | /** Mask to run optional performance calibrations */ |
Anna Bridge |
142:4eea097334d6 | 82 | #define RAIL_CAL_PERF () |
Anna Bridge |
142:4eea097334d6 | 83 | /** Mask for calibrations that require the radio to be off */ |
Anna Bridge |
142:4eea097334d6 | 84 | #define RAIL_CAL_OFFLINE (RAIL_CAL_ONETIME_IRCAL) |
Anna Bridge |
142:4eea097334d6 | 85 | /** Mask to run all possible calibrations for this chip */ |
Anna Bridge |
142:4eea097334d6 | 86 | #define RAIL_CAL_ALL (RAIL_CAL_TEMP | RAIL_CAL_ONETIME) |
Anna Bridge |
142:4eea097334d6 | 87 | /** Mask to run all pending calibrations */ |
Anna Bridge |
142:4eea097334d6 | 88 | #define RAIL_CAL_ALL_PENDING (0x00000000) |
Anna Bridge |
142:4eea097334d6 | 89 | |
Anna Bridge |
142:4eea097334d6 | 90 | /** |
Anna Bridge |
142:4eea097334d6 | 91 | * @} |
Anna Bridge |
142:4eea097334d6 | 92 | * @} |
Anna Bridge |
142:4eea097334d6 | 93 | */ |
Anna Bridge |
142:4eea097334d6 | 94 | |
Anna Bridge |
142:4eea097334d6 | 95 | #endif |