1 |
5 |
sergeykhbr |
/*****************************************************************************
|
2 |
|
|
* @file
|
3 |
|
|
* @copyright Copyright 2015 GNSS Sensor Ltd. All right reserved.
|
4 |
|
|
* @author Sergey Khabarov - sergeykhbr@gmail.com
|
5 |
|
|
* @brief GNSS Engine memory map description.
|
6 |
|
|
****************************************************************************/
|
7 |
|
|
#ifndef __MAP_GNSSENGINE_H__
|
8 |
|
|
#define __MAP_GNSSENGINE_H__
|
9 |
|
|
|
10 |
|
|
#include <inttypes.h>
|
11 |
|
|
|
12 |
|
|
static const uint32_t GNSS_FLAG_ACC_READY = 0x80000000;
|
13 |
|
|
static const uint32_t GNSS_FLAG_WAS_COREPOCH = 0x40000000;
|
14 |
|
|
static const uint32_t GNSS_FLAG_SYMBSYNC_SET = 0x20000000;
|
15 |
|
|
static const uint32_t GNSS_FLAG_PHASECORR = 0x10000000;
|
16 |
|
|
|
17 |
|
|
static const uint32_t GNSS_SETTINGS_SIGN_IF = 0x40000000;
|
18 |
|
|
|
19 |
|
|
static const uint32_t GNSS_MISC_GPSSF_ENA = 0x00000001; // Glonass self-test: 0=disable; 1=enable
|
20 |
|
|
static const uint32_t GNSS_MISC_GLOSF_ENA = 0x00000002; // GPS self-test
|
21 |
|
|
static const uint32_t GNSS_MISC_GPS_MAGN_OFF = 0x00000004; // 0=binary offset; 1=signed magnitude
|
22 |
|
|
static const uint32_t GNSS_MISC_GLO_MAGN_OFF = 0x00000008; // 0=binary offset; 1=signed magnitude
|
23 |
|
|
|
24 |
|
|
typedef struct ReadChannel_fields {
|
25 |
|
|
volatile uint32_t PrnEpochCnt;
|
26 |
|
|
volatile uint32_t Flags;
|
27 |
|
|
volatile uint64_t MeasCodeAcc;
|
28 |
|
|
volatile uint64_t MeasCarr;
|
29 |
|
|
volatile int32_t Q;
|
30 |
|
|
volatile int32_t I;
|
31 |
|
|
volatile int32_t QmF;
|
32 |
|
|
volatile int32_t ImF;
|
33 |
|
|
volatile int32_t QpF;
|
34 |
|
|
volatile int32_t IpF;
|
35 |
|
|
volatile int32_t QmT;
|
36 |
|
|
volatile int32_t ImT;
|
37 |
|
|
volatile int32_t QpT;
|
38 |
|
|
volatile int32_t IpT;
|
39 |
|
|
} ReadChannel_fields;
|
40 |
|
|
|
41 |
|
|
typedef struct WriteChannel_fields {
|
42 |
|
|
volatile uint32_t CodeNcoTh;
|
43 |
|
|
volatile uint32_t CarrNcoTh;
|
44 |
|
|
volatile uint32_t CodeNco;
|
45 |
|
|
volatile int32_t CodeNcoShift;
|
46 |
|
|
volatile int32_t CarrNcoIF;
|
47 |
|
|
volatile int32_t CarrNcoF0;
|
48 |
|
|
volatile int32_t DltCarrNco;
|
49 |
|
|
volatile uint32_t InitPrnG2;
|
50 |
|
|
volatile uint32_t Settings;
|
51 |
|
|
volatile uint32_t DropSyncUseStrob;
|
52 |
|
|
volatile uint32_t AccInterval;
|
53 |
|
|
volatile uint32_t unused[5];
|
54 |
|
|
} WriteChannel_fields;
|
55 |
|
|
|
56 |
|
|
typedef struct GnssChannel_fields {
|
57 |
|
|
union {
|
58 |
|
|
ReadChannel_fields r;
|
59 |
|
|
WriteChannel_fields w;
|
60 |
|
|
} u;
|
61 |
|
|
} GnssChannel_fields;
|
62 |
|
|
|
63 |
|
|
typedef struct GnssTimer_fields {
|
64 |
|
|
volatile uint32_t rw_MsLength;
|
65 |
|
|
volatile uint32_t r_MsCnt;
|
66 |
|
|
volatile int32_t rw_tow;
|
67 |
|
|
volatile int32_t rw_tod;
|
68 |
|
|
volatile uint32_t unused[12];
|
69 |
|
|
} GnssTimer_fields;
|
70 |
|
|
|
71 |
|
|
typedef struct GnssNoise_fields {
|
72 |
|
|
volatile uint32_t rw_Carrier;
|
73 |
|
|
volatile uint32_t rw_CarrierTh;
|
74 |
|
|
volatile uint32_t rw_AccLength;
|
75 |
|
|
volatile uint32_t reserved;
|
76 |
|
|
volatile uint32_t r_GpsAmp;
|
77 |
|
|
volatile uint32_t r_GpsFiltSum;
|
78 |
|
|
volatile uint32_t r_GloAmp;
|
79 |
|
|
volatile uint32_t r_GloFiltSum;
|
80 |
|
|
volatile uint32_t unused[8];
|
81 |
|
|
} GnssNoise_fields;
|
82 |
|
|
|
83 |
|
|
typedef struct GnssMisc_fields {
|
84 |
|
|
volatile uint32_t Date;
|
85 |
|
|
volatile uint32_t GenericChanCfg;
|
86 |
|
|
volatile uint32_t CarrierNcoTh;
|
87 |
|
|
volatile int32_t CarrierNcoIF;
|
88 |
|
|
volatile uint32_t SfCodeNcoTh;
|
89 |
|
|
volatile uint32_t SfCodeNco;
|
90 |
|
|
volatile uint32_t unused2[9];
|
91 |
|
|
volatile uint32_t InputCfg; // select selftest, change bin/off to sign/mag
|
92 |
|
|
} GnssMisc_fields;
|
93 |
|
|
|
94 |
|
|
typedef struct GnssEngine_map {
|
95 |
|
|
GnssMisc_fields misc;
|
96 |
|
|
GnssTimer_fields tmr;
|
97 |
|
|
GnssNoise_fields noise;
|
98 |
|
|
GnssChannel_fields chn[256]; // any number.
|
99 |
|
|
} GnssEngine_map;
|
100 |
|
|
|
101 |
|
|
#endif // __MAP_GNSSENGINE_H__
|