Can I do my own Ticker-based serial reader ?

13 Nov 2009 . Edited: 13 Nov 2009

Another thought I had about my serial buffering woes - could I (or should I) do all my serial reading in a Ticker-powered interrupt function ? It would need to run every millisecond, to read a maximum of 10 bytes at 115200 baud.

I know I can write code to do that, but what I don't know is if I should expect the result to actually be reliable. I'm a bit hazy on the possible interactions with other interrupt functions, and I don't know if the Serial code is already interrupt-based in a way which woudl cause a fight.

Any thoughts ?

Richard

13 Nov 2009 . Edited: 13 Nov 2009

Hi,

Richard Sewell wrote:
Another thought I had about my serial buffering woes - could I (or should I) do all my serial reading in a Ticker-powered interrupt function ? ... I don't know if the Serial code is already interrupt-based in a way which woudl cause a fight.

You could certainly try it. The Serial interface is currently just polling, so shouldn't interract.

I got most the way through the interrupt-based Serial stuff, then paused to ponder a few things around wider M3 vs ARM7 differences. I'll get something out early next week.

Simon

13 Nov 2009

OK - I'll hang on for your stuff, unless I get very bored over the weekend.

 

thanks,


R.