Search found 107 matches

by Thargon
Tue Feb 05, 2019 10:41 am
Forum: Small Change Requests
Topic: print message in chSysHalt
Replies: 5
Views: 706

print message in chSysHalt

Hi, when running ChibiOS in debug mode, I would like to get a human readable message if a sanity check (i.e. chDbgCheck or chDbgAssert) fails. So far I used the CH_CFG_SYSTEM_HALT_HOOK, which is called at the very end of the chSysHalt() function and accessed the UART LLD directly from within the hoo...
by Thargon
Thu Oct 18, 2018 8:15 am
Forum: Small Change Requests
Topic: incremental (quadrature) encoder interface and LLD
Replies: 1
Views: 585

incremental (quadrature) encoder interface and LLD

Hi, at the end of this post you can find a patch which introduces an incremental (quadrature) encoder interface (QEI) for HAL as well as a LLD implementation for STM32 TIMv1. Please note that the newly introduced files contain our custom header with according copyright and licence information , whic...
by Thargon
Wed Oct 17, 2018 5:37 pm
Forum: Small Change Requests
Topic: Introducing a thread hierarchy
Replies: 5
Views: 712

Re: Introducing a thread hierarchy

Hi, I've implemented a solution, which seems to work fine as far as I've tested it. I needed to modify quite some files (mostly the test suite) and you can find the complete patch at the end of this post. The new hierarchy system can be configured via the newly introduced configuration flags CH_CFG_...
by Thargon
Mon Oct 08, 2018 5:04 pm
Forum: Bug Reports
Topic: chTestAddX() fails during test suite Topic is solved
Replies: 6
Views: 738

Re: chTestAddX() fails during test suite Topic is solved

Hi, I've had another look at the issue and found a solution, which I hope will satisfy everyone. I'll start with a brief argument, followed by the code and a more detailed explanation. Looking at the function chTimeAddX(), the idea is to add some sysinterval_t value to a given systime_t and get the ...
by Thargon
Mon Oct 08, 2018 9:37 am
Forum: Small Change Requests
Topic: Introducing a thread hierarchy
Replies: 5
Views: 712

Re: Introducing a thread hierarchy

I didn't include a "kill" feature by design, it is inherently unsafe and there are a lot of corner cases. I absolutely support this. It's just in my very special case that I can do something nasty like that, but it doesn't need to be be a general feature of the OS (and probably should not...
by Thargon
Thu Oct 04, 2018 4:09 pm
Forum: Small Change Requests
Topic: Introducing a thread hierarchy
Replies: 5
Views: 712

Re: Introducing a thread hierarchy

That would be like processes in Posix. Yes, something similar would be nice. What happens when a parent terminates? In Posix orphans are assigned to the init process but we don't have such a thing. Isn't the main thread something like an init process? You may implement something like that by making...
by Thargon
Thu Oct 04, 2018 11:26 am
Forum: Small Change Requests
Topic: Introducing a thread hierarchy
Replies: 5
Views: 712

Introducing a thread hierarchy

Hi, I need a way to track child threads of any thread in order to shut down my system correctly. Basically my use case is that I want to implement an interface, which automatically stops a thread (after the CH_FLAG_TERMINATE flag has been set) and all its child threads (in any). As for the definitio...
by Thargon
Wed Sep 26, 2018 10:29 am
Forum: Bug Reports
Topic: chTestAddX() fails during test suite Topic is solved
Replies: 6
Views: 738

Re: chTestAddX() fails during test suite Topic is solved

Hi, that is true in my case as I use a 16 bit timer but set a frequency of 1MHz. I didn't say that the chTimeAddX() function is broken, though, but it seems the default kernel test suite is. In principle there should be no issue with my configuration as long as you don't try to use values greater th...
by Thargon
Thu Sep 13, 2018 3:08 pm
Forum: ChibiOS/HAL
Topic: STM32F1 DMA stream already allocated
Replies: 2
Views: 517

Re: STM32F1 DMA stream already allocated

Hi, solved it! Long time ago I wrote a patch (STM32/LLD/I2Cv1/) to allow non-DMA I2C communication, which relies on ISRs only. The patch could not be applied anymore with the latest ChibiOS but my script did not complain :oops: I reworked the patch, applied it and everything works like a charm :D Yo...
by Thargon
Thu Sep 13, 2018 12:42 pm
Forum: ChibiOS/HAL
Topic: STM32F1 DMA stream already allocated
Replies: 2
Views: 517

STM32F1 DMA stream already allocated

Hi, I encountered a DMA issue with my STM32F103 after porting my project to ChibiOS 18.2.x. When calling spiStart() on SPID2, I get a kernel panic in the spi_lld_start() function (DMA stream already allocated). The problem seems to be that I also use I2CD2, which allocates the same DMA channels befo...

Go to advanced search