Skip to contentSkip to conversation

Blackfin BF537 userspace - kernelspace strategy

Xenomai-help Daniele Pagani 1 participant 1 message Dec 5, 2008

lore
Share & tools
lore
#0 lore raw

Dear sirs,

I'm using uClinux with Xenomai on BF537 and it works fine.

But, I need to understand the best strategy to use about Linux/Xenomai and userspace/kernelspace.

I'm using sport driver for audio input/ouput and my application does audio alghoritms on these buffers (I'm working fine with 16x2 sample @48khz that is something like 2ms of audio latency time).

The driver is developed in Linux environment (without real time), using 2d-dma buffering and dma_copy in function read/write.

Then, I develop, in userspace, application using Xenomai native library with function such as:
rt_task_create
rt_task_start

and inside the real time task I'm using read/write function according to the char device driver sport. The priority of the task is set to 99.

Anyway, when I'm using this configuration, sometimes a calling to a webserver (that is running on the same machine) could cause an error on the audio output, so I think that something is not in real time environment.

So the question is, what I need to do?

1) write real time driver (very difficult now for me)

2) write userspace application with real time interrupt and dma management? If yes, I don't understand if in Xenomai context I can set the Blackfin register from a userspace application or if in Xenomai context has no sense to speak about user/kernel space.

Sorry for my confusion.

Best regards,
Daniele.