Hi Baldhead,
What Houwenxiang is asking for is a full project that can be compiled, flashed, run, and will show the problems. It's not possible to debug individual pieces of code by themselves, and the context is not always clear when you can't see everything.
A zip file could be attached to this thread. Or if you don't wish to post the project publically then sending a link to Houwenxiang via Private Message should be OK.
Angus