blob: ea3f7696c9f3c2cd31e4091e4d91c602692cb3c0 [file] [log] [blame]
/******************************************************************************
* Filename: rf_patch_rfe_bt5.h
* Revised: $Date: 2018-02-07 13:42:20 +0100 (on, 07 feb 2018) $
* Revision: $Revision: 18248 $
*
* Description: RF core patch for Bluetooth 5 support in CC13x2 and CC26x2
*
* Copyright (c) 2015-2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#ifndef _RF_PATCH_RFE_BT5_H
#define _RF_PATCH_RFE_BT5_H
#include <stdint.h>
#include "../inc/hw_types.h"
#ifndef RFE_PATCH_TYPE
#define RFE_PATCH_TYPE static const uint32_t
#endif
#ifndef PATCH_FUN_SPEC
#define PATCH_FUN_SPEC static inline
#endif
#ifndef RFC_RFERAM_BASE
#define RFC_RFERAM_BASE 0x2100C000
#endif
#ifndef RFE_PATCH_MODE
#define RFE_PATCH_MODE 0
#endif
RFE_PATCH_TYPE patchBt5Rfe[512] = {
0x35f8615b,
0xa24675f9,
0x1f40a357,
0x34f11307,
0x40004030,
0x40034001,
0x400f4007,
0x40cf404f,
0x43cf41cf,
0x4fcf47cf,
0x2fcf3fcf,
0x0fcf1fcf,
0x40004030,
0x40034001,
0x400f4007,
0x40cf404f,
0x6fcf7fcf,
0x4fcf5fcf,
0x2fcf3fcf,
0x0fcf1fcf,
0x9100c050,
0xc0707000,
0x70009100,
0x00213182,
0xb1109131,
0x81017000,
0xa100b101,
0x91323182,
0x9101b110,
0x81411011,
0x403b2241,
0x700006f1,
0x9150c050,
0xc0707000,
0x70009150,
0x00213182,
0xb1609181,
0x10257000,
0x9100c050,
0xc080c3f4,
0x6f031420,
0x04411031,
0x22f082a0,
0x26514058,
0x3182c022,
0x91310021,
0x3963b110,
0x04411031,
0x3182c082,
0x91310021,
0x3963b110,
0xc0a21031,
0x00213182,
0xb1109131,
0x31151050,
0x92551405,
0x642b7000,
0x1031c2b2,
0x31610631,
0x642e02c1,
0x1031c112,
0x06713921,
0x02e13151,
0x7000642e,
0x82b16428,
0x39813181,
0x642ec0e2,
0xc111642b,
0x642ec122,
0x688bc470,
0xc0c2c111,
0x64a4642e,
0x700064b7,
0x82b16440,
0x39813181,
0x6446c182,
0xc1116443,
0x6446c0a2,
0x689dc470,
0xc162c331,
0x64a46446,
0x700064b7,
0xb054b050,
0x80407100,
0x44b12240,
0x40a42200,
0x8081b060,
0x44a41e11,
0xa0547000,
0x80f0b064,
0x40a42200,
0x12407000,
0xb03290b0,
0x395382a3,
0x64713953,
0x68bfc2f0,
0xc1f18080,
0xc1510410,
0x40cb1c10,
0xc221642b,
0x642ec0c2,
0x644360cf,
0xc162c441,
0x80906446,
0x44d33950,
0x68d3ce00,
0x90b01280,
0x7000b032,
0xc201642b,
0x642ec0c2,
0x318080a0,
0x68df3940,
0xc0c2c101,
0xc101642e,
0x642ec122,
0x647182a3,
0x90b012c0,
0x7000b032,
0xc4016443,
0x6446c162,
0x318080a0,
0x68f33940,
0xc162c301,
0xc1016446,
0x6446c0a2,
0x647182a3,
0x90b012c0,
0x7000b032,
0xc272642b,
0x642ec081,
0xc111c122,
0xc002642e,
0x642ec111,
0xc331c062,
0xc362642e,
0x642ec111,
0xc111c302,
0x82a3642e,
0x64713953,
0x6433c3e2,
0x41162211,
0xc881c242,
0xc252642e,
0x642ec111,
0xcee1c272,
0xc202642e,
0x642ec881,
0xc801c202,
0xc170642e,
0x7000692a,
0xc242642b,
0x642ec801,
0xc011c252,
0xc272642e,
0x642ec0e1,
0xc101c002,
0xc062642e,
0x642ec301,
0xc101c122,
0xc362642e,
0x642ec101,
0xc101c302,
0x82a3642e,
0x70006471,
0x1e118081,
0xb0504156,
0x7100b054,
0x22408040,
0xa0544157,
0x80f1b064,
0x454b2201,
0x22007000,
0xb060414b,
0x73066148,
0x720b7205,
0xb050720e,
0x80817100,
0xa050b060,
0xeed08092,
0x93529341,
0x224167fa,
0x8080457f,
0x0410c1f1,
0x11011630,
0x6c011401,
0x61a061a0,
0x61a061a0,
0x61a061a0,
0x61a761a3,
0x61b161ad,
0x62d361a0,
0xc0f062d6,
0x31320402,
0x14122a41,
0x11011632,
0x6c011421,
0x61a161bf,
0x61a561bf,
0x61a961af,
0x61a061a0,
0x61b362f4,
0x61a562f4,
0x61a961b5,
0x61a061a0,
0x61a161c5,
0x61a561c5,
0x61a961af,
0x61a061a0,
0x65d661b8,
0x648061b8,
0x648061b8,
0x64d86548,
0x649261b8,
0x64ec6548,
0x650061b8,
0x650061b8,
0x652c65d6,
0x66fe61b8,
0x650061b8,
0x61b166fe,
0x61bbb0b0,
0x7306b0b1,
0xb0307205,
0x7810615f,
0x7832c451,
0xc5247853,
0x782061ca,
0x7842c451,
0xc4c47853,
0x926091a4,
0x92829271,
0xc0159293,
0xc3f09245,
0xc0f092b0,
0x61b890a0,
0x66cfb0e3,
0x80f0a054,
0x45e02250,
0x22008040,
0x61d846c3,
0xc800a0e3,
0x81a991b0,
0x8091b050,
0x469e2241,
0x12f18262,
0x102f0412,
0x142f311f,
0x22d68266,
0xc08045f3,
0xc18061f4,
0x6f0d1420,
0x10de396d,
0x044ec3f4,
0x3182c082,
0x396d002e,
0x3182c0a2,
0x826a002d,
0x06fa398a,
0x31808270,
0xc00b3980,
0x10bc180b,
0x825318ac,
0x149b1439,
0x06f08260,
0x31101001,
0x81a11410,
0x140c1410,
0x39408280,
0x100206f0,
0x3001c011,
0x1801c010,
0x31821802,
0x26c10021,
0xcec091e1,
0x22c667fa,
0xb003465a,
0xb063b013,
0x8041b053,
0x46c32201,
0x92148204,
0x1cb58225,
0x18954e39,
0x80f091b5,
0x422b2210,
0x913d629c,
0x913eb110,
0x80e0b110,
0x46432200,
0x424322e6,
0x1895b0e0,
0x925f91b5,
0x14f981a9,
0x225080f0,
0x221041d6,
0x62d9469c,
0x81a966cf,
0x14598255,
0x7100c0f0,
0x6a53b063,
0x422b22c6,
0x6272a0e0,
0x39808280,
0x100206f0,
0x3001c011,
0x1801c010,
0x31821802,
0x26c10021,
0x828791d1,
0x39873947,
0xb013b003,
0xb053b063,
0xb0637100,
0xb012b002,
0x22018041,
0x81f446c3,
0x82259214,
0x4e801cb5,
0x91b51895,
0x221080f0,
0x629c4272,
0x92148204,
0x18458224,
0x4e8a1c75,
0x221080f0,
0x629c4272,
0xb110913d,
0x220080e0,
0x22e64692,
0xb0e04292,
0x925f91b5,
0x14f981a9,
0x225080f0,
0x221041d6,
0x62d9469c,
0x67faceb0,
0x8280b063,
0x100206f0,
0x3001c011,
0x1801c010,
0x31821802,
0x26c10021,
0xb01391e1,
0xb063b003,
0xb064b053,
0x7100b054,
0x22018041,
0xb06346c3,
0x80f0b064,
0x41d62250,
0x46b12240,
0x92118201,
0x18918221,
0xb03191b1,
0xa0e362b1,
0x8251a0e0,
0x318281b2,
0xeea03d82,
0x93529341,
0xa00367fa,
0x82627000,
0x06f23942,
0x80a2604b,
0x61b8644b,
0x7100b050,
0x829061b8,
0x22018041,
0x820446c3,
0x82259214,
0x91b51895,
0x221180f1,
0x6ada469c,
0x22018041,
0x820446c3,
0x82259214,
0x4a4e1cc5,
0x91b51895,
0x221080f0,
0x629c42e6,
0x91e07860,
0x9250c2d0,
0x7870c4c4,
0xc132c2e1,
0x61cacb03,
0xb0e3a0e2,
0x80f0a054,
0x47082250,
0x22008040,
0x630047ef,
0xa040a0e3,
0x8260827d,
0x0410c0f1,
0x826a1009,
0x041a394a,
0x39808260,
0x100e0410,
0x10bc10ab,
0x644b10c2,
0x67face90,
0xb003b013,
0xb05367a1,
0xb054b050,
0xb013b064,
0x678a6781,
0x80417100,
0x47ef2201,
0x221080f0,
0x22f04736,
0xb06447dc,
0x43262231,
0x67a7b063,
0x6326675a,
0x81bfb064,
0x3d8f318f,
0x934fde80,
0x710067fa,
0x22018041,
0xb06447ef,
0x225080f0,
0xb063434f,
0x22c18261,
0x67a7474a,
0x22d18261,
0x675a473d,
0x81b1633d,
0x318181c2,
0x31823d81,
0xee703d82,
0x93529341,
0x62fe67fa,
0x92108200,
0x18d38223,
0x0bf34f67,
0x1ce31613,
0x92134b80,
0x143b8233,
0x1ce3636c,
0x92134b80,
0x183b8233,
0x4f7c1cab,
0x4b7e1c9b,
0x43801cbc,
0x826010b2,
0x437922d0,
0x221080f0,
0x644b4780,
0x63806781,
0x637010ab,
0x6370109b,
0x82807000,
0x0410c0f1,
0x7100b063,
0x10bc6b84,
0x7000b0e0,
0x92128202,
0x82518222,
0x81a11812,
0x82911812,
0x3d813181,
0x4b981c12,
0xb032b0e2,
0x1421c7f1,
0xc8124f9c,
0x91c291b2,
0xb0e1b031,
0x12087000,
0xc800c006,
0x91c091b0,
0x82517000,
0x92108200,
0x18108220,
0x181081a1,
0x80e11406,
0x31828292,
0x1c203d82,
0xb0e24bbb,
0x47bf2221,
0xce60b032,
0x222167fa,
0xa0e243bf,
0x8281b032,
0xc0f03941,
0x1e010401,
0x161843cd,
0x3010c010,
0x47db1c08,
0x3c101060,
0xc7f11006,
0x4fd11461,
0x91b6c816,
0x318181c1,
0x1c163d81,
0x91c64bd8,
0xc006b031,
0x70001208,
0xb063a003,
0xb0efb064,
0x7100652c,
0x22008040,
0xb06447ef,
0xa0ef6500,
0x80407100,
0x47ef2200,
0xb003b064,
0xa0e36326,
0x81b28251,
0x3d823182,
0x9341ee50,
0x67fa9352,
0x7000a003,
0x83209330,
0x47fb2200,
0x7000b310
};
PATCH_FUN_SPEC void rf_patch_rfe_bt5(void)
{
#ifdef __PATCH_NO_UNROLLING
uint32_t i;
for (i = 0; i < 512; i++) {
HWREG(RFC_RFERAM_BASE + 4 * i) = patchBt5Rfe[i];
}
#else
const uint32_t *pS = patchBt5Rfe;
volatile unsigned long *pD = &HWREG(RFC_RFERAM_BASE);
uint32_t t1, t2, t3, t4, t5, t6, t7, t8;
uint32_t nIterations = 64;
do {
t1 = *pS++;
t2 = *pS++;
t3 = *pS++;
t4 = *pS++;
t5 = *pS++;
t6 = *pS++;
t7 = *pS++;
t8 = *pS++;
*pD++ = t1;
*pD++ = t2;
*pD++ = t3;
*pD++ = t4;
*pD++ = t5;
*pD++ = t6;
*pD++ = t7;
*pD++ = t8;
} while (--nIterations);
#endif
}
#endif