In my project I need to change the GPS_VIO_PORT and GPS_VIO_BIT in order to use the USR2 pin as an impulse counter
So instead of the
- Code: Select all
#define GPS_VIO_PORT USR2_PORT
#define GPS_VIO_BIT USR2_BIT
I need to setup
- Code: Select all
#define GPS_VIO_PORT TIM2_PORT
#define GPS_VIO_BIT TIM2_BIT
I try to do it before including <td_config.h>
- Code: Select all
#include "config.h" //My config file that redefine GPS_VIO_PORT/BIT
/* This file declare all "dynamic" library data. It should be last included file
* Standard size value can be override before including this file
*/
#include <td_config.h>
I get the warning message :
- Code: Select all
...TD_RF_Module_SDK\lib\libtdcore\inc/td_config_chip.h:115:0: warning: "GPS_VIO_PORT" redefined [enabled by default]
In file included from ..\src\user_main.c:37:0:
...\inc/config.h:21:0: note: this is the location of the previous definition
But the GPS stack fails and I have this message on the serial link:
- Code: Select all
***** App start *****
Start fixing
[TRAP] Time:0.00:00:01. 1 : 25:GPS hard error | Param:0x00000000(0)
-- TRAP DUMP --
MSP:0x00000000 LINK:0x00008057
IRQTable:0x00000000
NVIC->IABR:0x00000000,0x00000000
HardFaultStR:0x00000000
FaultStatus:0x00000000:
Stack:0x200020A0-0x20002880
0x20002780 : 20002780 00000004 A90B0B00 20002880
0x20002790 : 00000200 20003E70 20001C60 00009951
0x200027A0 : 0000E41F 200027B4 A90B0B40 00007C87
0x200027B0 : 0000E41F 0000E41F 0000E429 200027B4
0x200027C0 : 00000000 0000E204 0000003C 000003E8
0x200027D0 : 00008026 00008057 00000001 00000001
0x200027E0 : 00000000 19007F8D 00000000 00000019
0x200027F0 : 00000001 00001A70 20003E70 00007E13
0x20002800 : 00000003 000000B4 FFFFFFFF 00000691
0x20002810 : 00000003 00000B45 00000003 000000B4
0x20002820 : 000004F1 00000E10 20000618 0000044D
0x20002830 : 00000E10 40000000 20001C40 0000024B
0x20002840 : 00000A28 00009AFD 00009AAD 00009BF9
0x20002850 : 00000000 00000301 00000000 0000E838
0x20002860 : 20000618 FFFFFFFF 00001A70 0000CE3D
0x20002870 : 00000000 00000129 00001A70 000000BD
-- TRAP Trace@0x20000000 --
Var 0:0
Var 1:0
Var 2:0
Var 3:71
Var 4:0
Var 5:0
Var 6:0
Var 7:23
-Stack trace-
0|0x0000804F
1|0x00007E13
2|0x00000691
3|0x00000B45
4|0x000004F1
5|0x0000044D
6|0x0000024B
7|0x00009AFD
8|0x00009AAD
9|0x00009BF9
10|0x00000301
11|0x0000CE3D
THe only way i found is to comment the lines in td_config_chip.h
- Code: Select all
//#define GPS_VIO_PORT USR2_PORT
//#define GPS_VIO_BIT USR2_BIT
Do you know if there is a solution in order not to edit the telecom design sdk files?
I work now with sdk 6.3.2 but it was the same with 5.X.X
I compile with eclips on Windows 10
Thanks