Access to tick from another source file.
Posted: Fri Mar 12, 2021 5:46 pm
Hello,
I am trying to access live tick value from another source file (connected with a task priority 2). So far, I have wrote the following:
in stabilier.c file:
in other source file (lets assume filename: cf.c)
The output of the this program is given below:
Please let me know what I am doing wrong and suggest how I can access this. Thanks a lot.
I am trying to access live tick value from another source file (connected with a task priority 2). So far, I have wrote the following:
in stabilier.c file:
Code: Select all
uint32_t tick;
uint32_t *pTickPTR = &tick;
Code: Select all
extern uint32_t *pTickPTR;
uint32_t tick;
while(1){
...
tick1 = (*pTickPTR);
...
}
...
LOG_GROUP_START(KFChk1)
PARAM_ADD(LOG_UINT32, tick, &tick1)
LOG_GROUP_STOP(KFChk1)
Code: Select all
stabilier.tick = 2, KFChk1.tick = 0
.
.
.
stabilier.tick = 3102, KFChk1.tick = 1869
stabilier.tick = 3112, KFChk1.tick = 1869
stabilier.tick = 3122, KFChk1.tick = 1869
stabilier.tick = 3132, KFChk1.tick = 1869
.
.
.