Jump to content
Sign in to follow this  
Flyer

Novo Advice

Recommended Posts

Dave

 

I'm trying to read a fast asynch datafeed that broadcasts 52 characters at 115200 baud (4.5msec) every 1/64th second (15msec). I don't need to capture every packet, two a second would be fine .

It appears that unless I do all the processing on the incoming characters polled and with interrupts disabled I am losing characters. Certainly my simple approach of setting a semaphore in the receive ISR does not work even with the receive task set at top priority.

 

Knowing the internals of Novo, can you offer any advice for an optimum approach

 

Thanks

 

Peter

Share this post


Link to post
Share on other sites

Flyer,

I'm trying to read a fast asynch datafeed that broadcasts 52 characters at 115200 baud (4.5msec) every 1/64th second (15msec). I don't need to capture every packet, two a second would be fine .

It appears that unless I do all the processing on the incoming characters polled and with interrupts disabled I am losing characters. Certainly my simple approach of setting a semaphore in the receive ISR does not work even with the receive task set at top priority.

 

Knowing the internals of Novo, can you offer any advice for an optimum approach

Novo is a co-operative multi-tasking RTOS, that means that any task can block another. With 115200 baud, characters are arriving at the rate of 1 every 86 micro seconds. The best approach is to buffer the characters in the ISR, and then process the buffer in your task. You can use a counting semaphore to keep track of how many characters are in the buffer by signalling it every time a character is received. You processing task can wait for the semaphore to be signal and then handle the characters.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...