Search found 671 matches

by steved
Wed May 13, 2020 3:42 pm
Forum: ChibiOS/RT
Topic: Strings to mailboxes
Replies: 15
Views: 350

Re: Strings to mailboxes

chprintf() isn't of itself blocking; it just passes characters on to a character stream, which is what determines blocking behaviour. If you use Chibi's SERIAL driver (think I said 'UART' earlier, which might have confused things), that has a circular output buffer of configurable size. So as long a...
by steved
Wed May 13, 2020 2:50 pm
Forum: ChibiOS/RT
Topic: Strings to mailboxes
Replies: 15
Views: 350

Re: Strings to mailboxes

My thinking was that the printf() logic is going to take exactly the same time to generate a character stream regardless of where it goes. It's the time to save that stream somewhere that varies with method (and even with your 2-thread solution you can reach a point where there is no more temporary ...
by steved
Wed May 13, 2020 1:31 pm
Forum: ChibiOS/RT
Topic: Strings to mailboxes
Replies: 15
Views: 350

Re: Strings to mailboxes

It's nothing particularly special (although I've edited out some complications peculiar to my requirements).
I've used a different name for the function, but it should be possible to override the library printf().
by steved
Wed May 13, 2020 1:16 pm
Forum: ChibiStudio
Topic: Studio 2020 - no V5 compiler
Replies: 6
Views: 141

Studio 2020 - no V5 compiler

Unless I missed the update, GCC V5 is still needed for M0. The binaries aren't in the latest Chibistudio release (although the startup files are).

Not a problem for existing users, who can just copy across from an older installation, but might confuse newcomers.
by steved
Tue May 12, 2020 4:35 pm
Forum: ChibiOS/RT
Topic: Strings to mailboxes
Replies: 15
Views: 350

Re: Strings to mailboxes

Dependent on how you're outputting to the UART, you might not need a mailbox; the UART driver implements a circular buffer, whose size you can configure; it's then just emptied in the background. However you'll then probably need a mutex to manage access to the output buffer - it gets fun working ou...
by steved
Sun May 10, 2020 9:21 am
Forum: Development and Feedback
Topic: [PROBLEM] Dead PC...
Replies: 16
Views: 495

Re: [PROBLEM] Dead PC...

You don't need performance for a backup server, so I stick a miniITX motherboard and a couple of drives in a small case - "headless" Linux and software RAID1 (so you're not reliant on how the motherboard manages the RAID if something breaks). Low power, so cheap to run. We get mains dropou...
by steved
Sat Apr 25, 2020 8:53 pm
Forum: Development and Feedback
Topic: Precision periodic timer using virtual timers
Replies: 7
Views: 449

Re: Precision periodic timer using virtual timers

About jitter, VTs use a delta list structure, only the first element on the list processed but the algorithm is not executed in constant time. If it happens that multiple timers elapse around the same tick ("around" because the delta parameter) then complexity is N, it is that loop where ...
by steved
Sat Apr 25, 2020 1:11 pm
Forum: Kinetis Support
Topic: I2CD2 doesn't work while I2CD1 does, what's the catch?
Replies: 4
Views: 794

Re: I2CD2 doesn't work while I2CD1 does, what's the catch?

Certainly there are people running multiple I2C ports on Chibi, so there is no underlying constraint.
As Giovanni said, probably some annoying little detail - multiple pin assignments to the same function, hardware setup, interrupt configuration or similar.
by steved
Sat Apr 25, 2020 1:08 pm
Forum: Development and Feedback
Topic: Precision periodic timer using virtual timers
Replies: 7
Views: 449

Re: Precision periodic timer using virtual timers

I find I've always got a spare timer to use as the base for things like this; adding a virtual timer to the list takes an indeterminate (and possibly significant, if you have lots of VTs) time to add to the list, so I prefer to avoid the overhead, especially for short times. (Plus doesn't rescheduli...
by steved
Wed Apr 15, 2020 9:11 pm
Forum: ChibiOS/RT
Topic: ChibiOS/RT
Replies: 4
Views: 294

Re: ChibiOS/RT

Another way to do what you want is to have a thread which waits on either an event (the thread-specific event flags are easiest to understand) or a semaphore. Then set up a regular 'tick' from either one of the hardware timers (suggested if you are using short intervals; <100msec, say) or the Chibi ...

Go to advanced search