Search found 109 matches

by Thargon
Thu Jul 09, 2020 7:35 am
Forum: ChibiOS/RT
Topic: 64bit OS time
Replies: 24
Views: 3143

Re: 64bit OS time

Just put some more thought in the topic and realized that my solution could be enhanced to some kind of "almost tickless" mode, allowing for timers and timeouts of arbitrary duration. First off, the accumulation ISR actually is a periodic tick. Now, whenever a timer is set or a timeout was...
by Thargon
Wed Jul 08, 2020 8:29 pm
Forum: ChibiOS/RT
Topic: 64bit OS time
Replies: 24
Views: 3143

Re: 64bit OS time

I implemented the feature some time ago in my project. Just have a look at the _systimer in my code (https://opensource.cit-ec.de/projects/amiro-os/repository/revisions/master/entry/core/src/aos_system.c). The idea is quite simple. That virtual timer fires periodically, accumulates the _uptime value...
by Thargon
Fri May 15, 2020 12:53 pm
Forum: Development and Feedback
Topic: [NOTE] Things nice to have
Replies: 15
Views: 10231

Re: [NOTE] Things nice to have

I submitted a patch some time ago for the STM32 I2Cv1 LLD: http://www.chibios.com/forum/viewtopic.php?f=38&t=4339 A more recent version compatible with ChibiOS 19.1 can be found in my project: https://opensource.cit-ec.de/projects/amiro-os/repository/changes/kernel/patches/I2C-without-DMA.patch?...
by Thargon
Thu Dec 12, 2019 2:12 pm
Forum: Bug Reports
Topic: chThdWait() may fail when registry enabled Topic is solved
Replies: 1
Views: 393

chThdWait() may fail when registry enabled Topic is solved

I just encountered an issue with the chThdWait() function when I enable the registry module. As a disclaimer, I am not quite sure whether this is actually a bug or intended behaviour. The scenario that causes my issue is quite simple: Thread A terminates thread B by calling chThdTerminate(&B) an...
by Thargon
Thu Nov 14, 2019 9:38 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1396

Re: encoding GPIO ports

The reliable and slow way to convert from port to bit mask is creating an association table but I really dislike such a crude solution. I absolutely support this statement! A cumbersome LUT cannot be called a "good solution". Just a detail, you can map multiple event sources to the same e...
by Thargon
Thu Nov 14, 2019 7:08 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1396

Re: encoding GPIO ports

[...] there is no guarantee it wont change in future devices. I read this as "might break portability and will thus not be implemented in ChibiOS". I would be absolutely fine with that argument ;) BTW, why don't use one EventSource for each port? you could mask port bits 1:1 with event fl...
by Thargon
Thu Nov 14, 2019 3:14 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1396

Re: encoding GPIO ports

Such a solution would not be portable, as it highly depends on the memory layout of each platform. The mentioned hal_pal_lld.h is defined on a per-port basis, while the PAL_PORT(), PAL_PAD() and PAL_LINE() macros are part of HAL (even though they are implemented for each port specifically). Moreover...
by Thargon
Thu Nov 14, 2019 1:52 pm
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1396

Re: encoding GPIO ports

Unfortunately, PAL_LINE() does not help me here, as it does not fulfill my flag-like encoding requirement. In my current solution, each pad is represented by an individual bit in the eventflags_t value. This is easy, since pads are numbered from 0 to 15, which can be used as-is for shifting. GPIO po...
by Thargon
Thu Nov 14, 2019 11:44 am
Forum: ChibiOS/RT
Topic: encoding GPIO ports
Replies: 11
Views: 1396

encoding GPIO ports

tl:dr: I would like to encode GPIO ports as integer values [0, 1, 2, ...]. Is there an existing macro/function for this or can it be introduced? In my project, I use a central event source to inform the whole system about GPIO events. In order to distinguish individual sources (i.e. pins) that trigg...
by Thargon
Tue Oct 22, 2019 12:51 pm
Forum: Bug Reports
Topic: STM32 GPIO LLD register naming issue Topic is solved
Replies: 3
Views: 523

Re: STM32 GPIO LLD register naming issue Topic is solved

Hi,

the fix works fine for me. Thank you!

Go to advanced search