Search found 107 matches

by Thargon
Fri May 15, 2020 12:53 pm
Forum: Development and Feedback
Topic: [NOTE] Things nice to have
Replies: 15
Views: 9359

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: 292

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: 1188

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: 1188

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: 1188

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: 1188

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: 1188

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: 437

Re: STM32 GPIO LLD register naming issue Topic is solved

Hi,

the fix works fine for me. Thank you!
by Thargon
Mon Oct 14, 2019 11:46 am
Forum: Bug Reports
Topic: STM32 GPIO LLD register naming issue Topic is solved
Replies: 3
Views: 437

STM32 GPIO LLD register naming issue Topic is solved

Hi, I just encountered a compilation error when calling palIsLineEventEnabledX() using an STM32L476. The function is defined identically in all three GPIO LLD versions: #define pal_lld_ispadeventenabled(port, pad) \ (bool)((EXTI->IMR & (1U << (uint32_t)pad)) != 0U) Now the issue is, that IMR is ...
by Thargon
Mon May 20, 2019 1:15 pm
Forum: Small Change Requests
Topic: Enhanced event filtering
Replies: 5
Views: 893

Re: Enhanced event filtering

I see that there is some a priori knowledge used for thread handling, depending whether it is an AND or OR condition. I also understand that modifying all involved components is not trivial and is probably rather something that should be implemented for a major release. However, I disagree that my s...

Go to advanced search