NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Hard Real-Time?
On Wed, Apr 15, 2020 at 01:14:02PM -0700, Michael Cheponis wrote:
> Is there already a way to do "hard real time" on NetBSD?
>
> To me, "hard real time" means from an external pin going 'high' to the 1st
> instruction of my driver executing is on the order of (up to) 10 usec.
>
> Many eons ago, I did this on BSD4.3 VAX 785 and achieved < about 100 usec
> jitter. It was a Royal Pain to do, since so many places in the kernel
> turned off interrupts as it massaged various data structures. The pain was
> to find every one of those and break them down to absolutely minimize the
> time interrupts were turned off.
>
> But it worked: Here it is controlling various hopping machines:
> https://www.youtube.com/watch?v=mG_ZKXo6Rlg&feature=youtu.be&t=34 I'm
> sitting controlling the thing; the umbilical goes back to a UNIBUS
> interface in the VAX. Timesharing only slowed down; it did not stop during
> operation.
>
> I'm especially interested in getting the RPi to operate 'hard real time' on
> NetBSD. I mainly want to use the RPi to control a robot -- low level as
> well has higher-level planning/control.
It should be doable in an interrupt handler running at high IPL - these days
the global interrupt enable flag is turned off for very short time
(a few instructions) on NetBSD. Maybe even IPL_VM would be acceptable.
But your GPIO needs to be able to generate an interrupt.
I know it works on Allwinner A20, but I'm much less familiar with RPI.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index