blob: 6cd4247a2f19610fa1f12abb2a2c4a639f140c4d [file] [log] [blame]
/******************************************************************************
* Filename: rf_patch_rfe_genfsk.h
* Revised: $Date: 2018-01-24 16:44:53 +0100 (on, 24 jan 2018) $
* Revision: $Revision: 18195 $
*
* Description: RF core patch for Generic FSK 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_GENFSK_H
#define _RF_PATCH_RFE_GENFSK_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 patchGenfskRfe[512] = {
0x13076286,
0x1f2e34f1,
0x0ab03f13,
0xff07a000,
0x4030ffc0,
0x40014000,
0x40074003,
0x404f400f,
0x41cf40cf,
0x47cf43cf,
0x3fcf4fcf,
0x1fcf2fcf,
0xc0500fcf,
0x70009100,
0x9100c070,
0x31827000,
0x91310021,
0x7000b110,
0xb1018101,
0x3182a100,
0xb1109132,
0x10119101,
0x22418141,
0x06f1402c,
0xc0507000,
0x70009150,
0x9150c070,
0x31827000,
0x91810021,
0x7000b160,
0xb1518151,
0x3182a150,
0xb1609182,
0x10119151,
0x22418191,
0x06f14044,
0x10257000,
0x9100c050,
0xc090c3f4,
0x6f031420,
0x04411031,
0x22f082a0,
0x26514056,
0x3182c022,
0x91310021,
0x3963b110,
0x04411031,
0x3182c082,
0x91310021,
0x3963b110,
0xc0a21031,
0x00213182,
0xb1109131,
0x31151050,
0x92551405,
0x641c7000,
0x1031c2b2,
0x31610631,
0x641f02c1,
0x1031c112,
0x06713921,
0x02e13151,
0x7000641f,
0x22d082b0,
0xc0c244a5,
0x66416627,
0x6419657d,
0xb1109136,
0xb1109134,
0xc112665f,
0xc3406424,
0x40922201,
0x1410c5f1,
0x16356892,
0x65b91634,
0x65ebb051,
0x65eb65c1,
0x65fa65c9,
0xb061a051,
0xc6b0722c,
0x128068a0,
0xb03290b0,
0x64197000,
0x318182b1,
0xc0e23981,
0x665f641f,
0x82b07000,
0x44ba22d0,
0xb05165b1,
0x65a165eb,
0x65a965fa,
0xa05165fa,
0x722cb061,
0xc201641c,
0x641fc0c2,
0x318080a0,
0x68c13940,
0xc0c2c101,
0xc101641f,
0x641fc122,
0x22d082b0,
0x1a3544cf,
0x91356419,
0x82a3b110,
0x12c0646f,
0xb03290b0,
0x82b07000,
0x44f422d0,
0x6627c162,
0x657d6655,
0x91866431,
0x9184b160,
0x6670b160,
0x68e3c5f0,
0x16741675,
0xb05165b9,
0x65c16609,
0xa0516609,
0x722cb061,
0x68efc6b0,
0x90b01280,
0x7000b032,
0x82b16431,
0x39813181,
0x6437c182,
0x70006670,
0x22d082b0,
0x65a14507,
0x6618b051,
0x661865a9,
0xb061a051,
0x6434722c,
0xc162c401,
0x80a06437,
0x39403180,
0xc301690e,
0x6437c162,
0xc0a2c101,
0x82b06437,
0x451c22d0,
0x64311a75,
0xb1609185,
0x646f82a3,
0x90b012c0,
0x7000b032,
0xc272641c,
0x641fc081,
0xc111c122,
0xc002641f,
0x641fc111,
0xc331c062,
0xc362641f,
0x641fc111,
0xc111c302,
0x82a3641f,
0x646f3953,
0x6424c3e2,
0x41382211,
0xc881c242,
0xc252641f,
0x641fc111,
0xcee1c272,
0xc202641f,
0x641fc881,
0xc801c202,
0xc170641f,
0x7000694c,
0xc242641c,
0x641fc801,
0xc011c252,
0xc272641f,
0x641fc0e1,
0xc101c002,
0xc062641f,
0x641fc301,
0xc101c122,
0xc362641f,
0x641fc101,
0xc101c302,
0x82a3641f,
0x7000646f,
0x1e118081,
0xb0504178,
0x7100b054,
0x22408040,
0xa0544179,
0x80f1b064,
0x456d2201,
0x22007000,
0xb060416d,
0xc108616a,
0x39508270,
0x1e003980,
0xc1014186,
0x14183001,
0xc1091a18,
0x39608280,
0x1e003980,
0xc1014190,
0x14193001,
0x827b1a19,
0x393b313b,
0x313b398b,
0x45991e0b,
0x828ac01b,
0x392a312a,
0x1e0a398a,
0xc01a45a0,
0x722c7000,
0xb2c092e9,
0x10731062,
0xc3fd10a1,
0x722c7000,
0xb2c092e8,
0x10531042,
0xc1fd10b1,
0x722c7000,
0x10c292e9,
0xc4011073,
0xb2c0c03d,
0x722c7000,
0x104292e8,
0x10b11053,
0xb2c0c1fd,
0x722c7000,
0xb2c092e9,
0x10731062,
0xc3fd10a1,
0x722c7000,
0xb2c092e9,
0x10c21073,
0xc03dc401,
0xb0507000,
0x7100b054,
0x22408040,
0xb06441dc,
0x220080f0,
0x61e241d1,
0x41d12200,
0x8081b060,
0x45d11e11,
0xa054a050,
0x90b01240,
0x82a3b032,
0x39533953,
0xc0507000,
0x10d09100,
0x7100b061,
0x1c231412,
0x91334df6,
0x7000b110,
0xb1109132,
0x700069ee,
0x9100c050,
0xb06110d0,
0x18137100,
0x4a051c32,
0xb1109132,
0x91337000,
0x69fdb110,
0xc0507000,
0x10d09150,
0x7100b061,
0x1c231412,
0x91834e14,
0x7000b160,
0xb1609182,
0x70006a0c,
0x9150c050,
0xb06110d0,
0x18137100,
0x4a231c32,
0xb1609182,
0x91837000,
0x6a1bb160,
0x10247000,
0x1c02c0c0,
0x6424462d,
0x643c622e,
0x10421015,
0xc0c01612,
0x1c021610,
0x64244637,
0x643c6238,
0x14153141,
0x31801040,
0x10541405,
0x04047870,
0xc0e67000,
0x106c3186,
0x398182b1,
0x04017880,
0x10671416,
0x04077880,
0xc3f082b1,
0x14170401,
0x318082b0,
0x140c3980,
0xc1867000,
0x10673186,
0x788082b1,
0x14160401,
0x141782b1,
0x641c7000,
0xc122c111,
0xc470641f,
0xc1116a64,
0x641fc0c2,
0x646f65d1,
0x6a6bc2b0,
0xc0c2c221,
0x7000641f,
0xc1116434,
0x6437c0a2,
0x6a75c470,
0xc162c331,
0x65d16437,
0xc2b0646f,
0xc4416a7c,
0x6437c162,
0x00007000,
0x00000000,
0x00000000,
0x72057306,
0x720e720b,
0x7100b050,
0xb0608081,
0x8092a050,
0x46a62241,
0xc1f18080,
0x16300410,
0x14011101,
0x62b86c01,
0x62b862b8,
0x62b862b8,
0x62b862b8,
0x62b862b8,
0x62b862b8,
0x62b862b8,
0x06f18091,
0x80823121,
0x14122a42,
0x11011632,
0x6c011421,
0x62b862cd,
0x62b962cd,
0x62bd62c1,
0x62b862b8,
0x647e62c5,
0x64ad656a,
0x64d562c5,
0x64fc656a,
0x652262c5,
0x654e66e5,
0x121062c5,
0x720e90b0,
0x72057306,
0x90301210,
0xc460628a,
0x782091a0,
0x78309260,
0x78409270,
0x78509280,
0x78609290,
0x781092b0,
0xc1f091e0,
0x826090a0,
0x06f03940,
0x31101001,
0x92501410,
0xa0bc62c5,
0xb0e3a0e2,
0x80f0a054,
0x46f02250,
0x22008040,
0x62e847f6,
0xa040a0e3,
0x318d827d,
0x8260398d,
0x100906f0,
0x394a826a,
0x826006fa,
0x06f03980,
0x10ab100e,
0x10c210bc,
0x722e6449,
0x67f9ce40,
0xb003b013,
0xb053679a,
0xb054b050,
0xb013b064,
0x8260677c,
0x471322e0,
0x71006783,
0x22018041,
0x80f047f6,
0x47262210,
0x47e322f0,
0x2231b064,
0xb0634313,
0x826067a0,
0x471322e0,
0x63136747,
0x81bfb064,
0x3d8f318f,
0x934fde30,
0x710067f9,
0x22018041,
0xb06447f6,
0x225080f0,
0xb0634340,
0x22c18261,
0x67a0473b,
0x826167d4,
0x472d22d1,
0x632d6747,
0x318181b1,
0xde203d81,
0x67f99341,
0x820062e5,
0x82239210,
0xa2e082e7,
0x4f5618d3,
0x16130bf3,
0x4b7b1ce3,
0x82339213,
0x6367143b,
0x47621cba,
0x4b621e23,
0x4f621ce3,
0x2207b2e0,
0xa2e04362,
0x636d1a1b,
0x4b7b1ce3,
0x82339213,
0x1cab183b,
0x1c9b4f77,
0x1cbc4b79,
0x10b2437b,
0x22d08260,
0x80f04374,
0x477b2210,
0x677c6449,
0x10ab637b,
0x109b636b,
0x7000636b,
0x06f08280,
0x7100b063,
0x10bc6b7e,
0x82027000,
0x82229212,
0x18128251,
0x181281a1,
0x31818291,
0x1c123d81,
0xb0e24b91,
0xc7f1b032,
0x4f951421,
0x91b2c812,
0xb03191c2,
0x7000b0e1,
0xc0061208,
0x91b0c800,
0x700091c0,
0x82008251,
0x82209210,
0x81a11810,
0x14061810,
0x829280e1,
0x3d823182,
0x4bb41c20,
0x2221b0e2,
0xb03247b8,
0x67f9ce10,
0x43b82221,
0xb032a0e2,
0x39418281,
0x1e0106f1,
0x161843c5,
0x3010c010,
0x47d31c08,
0x3c101060,
0xc7f11006,
0x4fc91461,
0x91b6c816,
0x318181c1,
0x1c163d81,
0x91c64bd0,
0xc006b031,
0x70001208,
0x318181b1,
0x82903d81,
0x18013980,
0x4be21cf1,
0x80b01401,
0x47e222c0,
0xb033b0bc,
0xa0037000,
0xb064b063,
0x654eb0ef,
0x80407100,
0x47f62200,
0x6522b064,
0x7100a0ef,
0x22008040,
0xb06447f6,
0x6313b003,
0xa003a0e3,
0x93307000,
0x22008320,
0xb31047fa,
0x00007000
};
PATCH_FUN_SPEC void rf_patch_rfe_genfsk(void)
{
#ifdef __PATCH_NO_UNROLLING
uint32_t i;
for (i = 0; i < 512; i++) {
HWREG(RFC_RFERAM_BASE + 4 * i) = patchGenfskRfe[i];
}
#else
const uint32_t *pS = patchGenfskRfe;
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