This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于System_printf在定时器中断服务程序中调用时会出现异常

Other Parts Discussed in Thread: SYSBIOS

查看bios用户手册时,编写基于bios的Timer定时器程序发现了在tickFxn函数中调用System_printf函数时发生了

ti.sysbios.gates.GateMutex: line 97: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
xdc.runtime.Error.raise: terminating execution

而将System_printf("Current period = %d\n",Timer_getPeriod(mytimer));这句放入到Task中是可以运行的;

有个问题是通过调用Timer_getPeriod函数来获取定时器的周期,是需要等到定时器的时间到了触发才能准确的获取其周期,但是在定时器中断服务程序tickFxn函数中不能调用这个函数,请问如何获取定时器周期并打印出来,还有就是在定时器中断服务程序是不是真的不能调用System_printf函数,如果不能调用的话,那是否可以通过相应的措施弥补这一缺憾呢。

谢谢