I have encountered a strange problem that program goes into HandlePIOEvent() function before goes into AppInit() with a strange pio interrupt(0x00004300), is this the software error or harfware error? why this would happen? what confused me that i have download another program to the same board but this not happened ? Is it possible dueing to the xIDE bug? Does anyone can help me? Really confused,
Hardware error or software error
Posted: Mon, 2016-08-29 20:13
also, another phenomenon is that the timer sometimes can't stop. is this abnormal phenomenon caused by the former abnormal behavior?
Loris,
Since HandlePIOEvent() appears only on CSRmesh I presume it cause is something on mesh close bin aria, the standard CSR SDK do not have this HandlePIOEvent(). And since it in close lib, you can't fix it.
Passable Workaround: (I never test that)
Add and set a global flag in AppInit() and if it not set in HandlePIOEvent ignore the PIO event.
Hi, Nissim,
Thanks for your reply. But CSRmeshInit() is done in AppInit(). so this is really confusing that program goes into PIO handler before csrmesh start.
Because this abnormal phenomenon appears only on the powerup once, so I can ignore this signal. But I just want to know why this happen. and the strange behaviour that timer can't stop sometimes may be caused by this strange error. do you have any suggestion on debuging this issiue about the timer?
!
Loris
Many tasks are done before AppInit().
AppInit() is the point that CSR firmware gives you a way to add your code.
Since CSR decided to hide the way they do mesh, they did all setting before AppInit()
In any case, it is not a hardware error.
Call my Skype nissim.test maybe I can offer other ways to solve your problem.
Loris
Many tasks are done before AppInit().
AppInit() is the point that CSR firmware gives you a way to add your code.
Since CSR decided to hide the way they do mesh, they did all setting before AppInit()
In any case, it is not a hardware error.
Call my Skype nissim.test maybe I can offer other ways to solve your problem.
Hi, Nissim ,
I think I have found the source, it caused by a timer id confilct. I have debug the program and I find that sometimes calling the API TimerCreate() returns a timer id that is the same as other timers , so it may cause unexpected behaviour, I think this is a bug. so when I suggest that we should invalid the timer and then use TimerCreate() to recreate.
Loris,
Hi , Nissim,
I think I have make a mistake to the post the answer to the related question.
1、Timer id confilct may cause unexpected behaviour, for example can't go into the timer's callback as expected sometimes, because timercreate() has returned a same timer_id as other timer.
2、About the question that get PIO interrupt before go into AppInit():
I think this is a bug of xIDE, this abnormal phenomenon does not cause othe abnormal behaviour in the running, and it just appeared once at startup, so I have ignored it. When I changed the position of App code to 0xXXXX in project property setting, pio_changed in the debug mode also changed to 0xXXXX, so I think this is a bug, but I'm not sure.