Search found 130 matches

by tridge
Fri May 04, 2018 9:26 am
Forum: ChibiOS/RT
Topic: change thread priority from a timer callback
Replies: 14
Views: 1876

Re: change thread priority from a timer callback

Main can do a chEvtGetAndClearEvents(...) in its loop and can then drop its own priority. The problem is that the main thread may be in a large block of expensive maths when the timer goes off, so it isn't checking events. I'm now working on a different approach where I'm adding a call into the AP_...
by tridge
Fri May 04, 2018 8:55 am
Forum: ChibiOS/RT
Topic: change thread priority from a timer callback
Replies: 14
Views: 1876

Re: change thread priority from a timer callback

ok, trickier than I expected. > What is doing this SPI thread when you want to change its priority? you may consider make the SPI thread change its own priority based on a > global state adding check points in between SPI operation, that would be much faster that going through the decision tree requ...
by tridge
Fri May 04, 2018 4:48 am
Forum: ChibiOS/RT
Topic: change thread priority from a timer callback
Replies: 14
Views: 1876

change thread priority from a timer callback

In ArduPilot we have the concept of a temporary boost to a threads priority. This is used to balance the priority requirements of SPI bus threads with flight control loop threads. To implement this we want to be able to change the priority of a thread from a chVT timer callback. This allows the thre...
by tridge
Mon Feb 26, 2018 6:40 am
Forum: User Projects
Topic: Presentation on ArduPilot switch from NuttX to ChibiOS
Replies: 7
Views: 5139

Presentation on ArduPilot switch from NuttX to ChibiOS

I gave a talk last week at the annual ArduPilot developer conference on the switch to ChibiOS from NuttX in the project: https://www.youtube.com/watch?v=y2KCB0a3xMg&t=2s (it's a bit long as I got carried away, sorry!) Slides are here: http://uav.tridgell.net/presentations/ArduPilot_2018/chibios....
by tridge
Mon Feb 12, 2018 11:38 am
Forum: Bug Reports
Topic: correct stepping for STM32F405 OTG ?
Replies: 5
Views: 889

Re: correct stepping for STM32F405 OTG ?

> Is it possible there is something wired at board level? At first I was sure it was a weird UART property with CTS/RTS, but when I found the problem happened with the UART disabled and the pin just pulled low (either by setting as a GPIO low output or with external pulldown) I had to discount it be...
by tridge
Mon Feb 12, 2018 5:15 am
Forum: Bug Reports
Topic: correct stepping for STM32F405 OTG ?
Replies: 5
Views: 889

correct stepping for STM32F405 OTG ?

We just hit a really bizarre problem with ArduPilot on a STM32F405RGT6. It is an open hardware autopilot board called a "OpenPilot Revolution", widely used by several autopilot projects. It has USART1 on PA9/PA10 and USB on PA11/PA12. When we ported it to ChibiOS (based on 17.6.0 with a fe...
by tridge
Sat Jan 20, 2018 10:21 pm
Forum: User Projects
Topic: ArduPilot port to ChibiOS
Replies: 3
Views: 2084

Re: ArduPilot port to ChibiOS

Thanks Giovanni! One question I had was about the STM32 DMA_MSK values. We noticed that there are some DMA channel options missing in the ChibiOS headers. For example, STM32_SPI1_TX_DMA_MSK for the F412 is missing the (2,2) option from the datasheet. Is this deliberate due to some other conflict or ...
by tridge
Sat Jan 20, 2018 7:58 am
Forum: User Projects
Topic: ArduPilot port to ChibiOS
Replies: 3
Views: 2084

ArduPilot port to ChibiOS

I thought it may interest some people that ArduPilot (see http://ardupilot.org/ ) now supports ChibiOS. Up till now most of the autopilot boards we support in the ArduPilot project have been running on top of NuttX. We have done a ChibiOS port to gain more efficiency (it is smaller and faster), plus...
by tridge
Mon Sep 25, 2017 9:20 am
Forum: General Support
Topic: safely re-enabling interrupts after chSysDisable() Topic is solved
Replies: 2
Views: 654

Re: safely re-enabling interrupts after chSysDisable() Topic is solved

Giovanni wrote:Hi,
It is possible to do this in a portable way:

thanks, much appreciated!
by tridge
Mon Sep 25, 2017 8:47 am
Forum: General Support
Topic: safely re-enabling interrupts after chSysDisable() Topic is solved
Replies: 2
Views: 654

safely re-enabling interrupts after chSysDisable() Topic is solved

After using chSysDisable() to disable interrupts the obvious thing to re-enable interrupts is chSysEnable(). That doesn't seem to cope with the case where the caller of the function had also disabled interrupts, so I'm wondering if there is a recommended approach to restore the previous interrupt ma...

Go to advanced search