I now have ChibiOS/RT and FreeRTOS running on Due. Should I bother to post them?

It seems like few Arduino users need or want to use a real-time kernel.

Here is the typical response from an "old timer" about using a RTOS.

Quote

When I author code that will run *UNDER* an OS, I by definition do not have access to the resources that will allow me to thread my own code. I am force to use the provided OS threading model and constructs.

I've developed some very complex systems though the years. I've been programming in ASM before C even existed.

I have never used an "RTOS", I've always teased out and separated my code so timer interrupts always provide me the abilty to implement the required schedules. I'm also careful to author my code so scheduling can be changed around without complete rewrites. A recent design included a design that had Zigbee Radio (proprietary comm), Ethernet, host Serial, and a ton of real-time I/O, including router functions to packet route / bridge radio and Ethernet *AND* host serial traffic (packets route across all 3 "channels"). No RTOS was used, and suspect any RTOS would have cause a lot of packet jitter where the current system is very deterministic ...

So what is the primary motive for which people feel the need to use RTOS's on micro-controllers? Sorry, I don't get it.

I am an "old timer" and have used real-time kernels since the mid 1970s. Often using a real-time kernel makes an application really easy.

Here are two tasks for a data logger that trivially logs data to an SD at 1000 points/second without losing data because of the occasional long SD write latency.

I ran this on Due with a buffer queue of 250 points, enough for a 250 millisecond write latency. The ADC reader put data at the head of the queue and the SD writer takes data from the tail of the queue.

It could easily log data at much faster rates if a timer was used to trigger the data read thread.

Here is the ADC read task. In my example it runs every 1000 microseconds and reads four ADC channels.

The example is great-- because it obviously works and I would like to experiment with it. My problem is that I do not find or can guess how you hooked up your Arduino Due with an Sd card shield (I have a SEEED Studio SD card shield v 3.1). Could you please devote a few words to that?