I'm having problem to get Task_sleep to work correctly.
Attached is a project based on the MSP430 SYS/BIOS task example. Here are some changes I made to the project:
- changed myTimer to tick at 10ms instead of 0.5 second.
- added clock module, enabled SWI, use timer B for sys/bios clock. The sys/bios clock ticks at 1000us.
- toggle P1.0 in myTaskFxn.
- added Task_sleep(1) in myTaskFxn. I meant to let the task sleep for 1ms since the sys/bios tick at 1000us.
If I commented out Task_sleep(1), I got 5 Hz 50% duty cycle square wave at P1.0. If I added Task_sleep(1), the timing is all wrong when measured at P1.0.
Could you please take a look at the project and let me know what else I need to do to make Task_sleep work? Thank you very much for your help.
Chun