开发者

AVR Long running code from within timer interrupt

I've got some code that needs to run every 2 minutes which seems simple enough. The problem seems that triggering a long running process fr开发者_JAVA百科om within a timer causes the timers to go wobbly? any suggestions.

My C knowledge is not that great so help me out with some basic ideas. The MCU is an Atmel Mega128L

The long running process is an http call through a Telit GSM device (through UART1), this works great on its own but needs to be run out of the main loop as it needs to monitor other processes.


I have been been told to set a flag within the interrupt and have those long-taking jobs done from the main routine, which checks for the flag perpetually, the task loop.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜