Auteur: Didier Kryn Date: À: dng Sujet: Re: [DNG] Information request (maybe OT - - - dunno)
Le 13/05/2023 à 21:42, Simon a écrit : > o1bigtenor via Dng <dng@???> wrote:
>
>> I am in the beginning throes of an embedded system (SoC, and/or
>> microcontroller) design.
>>
>> Have been reading somewhat on the use of RTOS vs and OS (thinking
>> perhaps FreeRTOS and Devuan). My initial problem is a weighing 'cell'
>> where I'm weighing liquids being deposited in a 'jar'.
>> (A second would be items deposited (and then removed in stages) from a
>> 4 wheel cart.)
>>
>> How does one decide when a RTOS is more appropriate than an OS?
> As already says, it comes down to “if I want X to happen at time Y, how reliable do I want Y to be ?”
> These days, something as cheap as a Pi runs so fast that many tasks that would have needed an RTOS back when I used to be involved with this stuff can be done “reliably enough” without going “hard” RT. A secondary question is “does someone die or lose limbs if it goes wrong ?” - which also influences the decision since you’d never pass a safety case for something where the answer is “yes” with a raspberry pi and a generic OS.
>
> And as part of the mix, you have trade-offs. So while you could just chuck in (say) an ARM SoC and use brute force to create near-enough RT operation, you might decide that the reliability downside of running millions of lines of code to emulate a few TTL chips is too much - and so you’d be better using something smaller & simpler, and then having to do more low-level stuff to make things work.
>
> In other words, there isn’t “an” answer. What you’d have to do is make a list of options, filter them to remove any that wouldn’t meet some non-optional requirement, and then list the pros & cons of each so you can decide which is the optimum choice.
> I think there are ready-made circuits associating an FPGA and a cpu.
FPGA provide true multitasking, though the tasks are relatively
simple. You can program them in VHDL, a language inspired from Pascal,
which is very appropriate for the building blocks of the logic, while
the global structure is often nicer when buit with a graphical tool.
Maybe you can do all the job with an FPGA. This wouild be the best.
Or just use a computer to tart-stop the FPGA and monitor it, like
through a micro web server.