Search found 35 matches

by tsichevski
Fri Oct 26, 2018 10:01 pm
Forum: ChibiOS/HAL
Topic: usb_pump thread does not restore after chSysDisable/Enable
Replies: 6
Views: 824

Re: usb_pump thread does not restore after chSysDisable/Enable

Yes, my main() looks like this: for(;;) { chSysInit(); ...initialize app threads and periphery chThdWait(... the main control loop thread); ...stop app threads and shutdown periphery chSysDisable(); // stop the system timer STM32_ST_TIM->CR1 &= ~(TIM_CR1_CEN); nvicDisableVector(STM32_TIM2_NUMBER...
by tsichevski
Fri Oct 26, 2018 5:47 pm
Forum: ChibiOS/HAL
Topic: usb_pump thread does not restore after chSysDisable/Enable
Replies: 6
Views: 824

Re: usb_pump thread does not restore after chSysDisable/Enable

> Try stopping/starting the USB driver.
I do this. This does not affect the usb_pump thread. There is no means to stop it nicely either.
As a workaround, I zero the USBD1.tr field after the RT is stopped by chSysDisable().

Regards,
Vladimir
by tsichevski
Fri Oct 26, 2018 3:08 pm
Forum: Bug Reports
Topic: Restarting an I2S transfer changes alignement in DMA RX buffer
Replies: 19
Views: 3435

Re: Restarting an I2S transfer changes alignement in DMA RX buffer

I've managed to recover from this problem. Before starting DMA, I explicitly fetch a few half-words from the I2S data register, and find where the sample start sequence begins. Unfortunately, this solution is not universal: is works for my particular codec chip :(

Regards,
Vladimir
by tsichevski
Fri Oct 26, 2018 2:49 pm
Forum: Bug Reports
Topic: halt in chSysGetStatusAndLockX() Topic is solved
Replies: 2
Views: 657

halt in chSysGetStatusAndLockX() Topic is solved

Hi all, ChibiOS_17.6.3 This function was called from a thread, but the stack trace shows the chSysLockFromISR() was called: syssts_t chSysGetStatusAndLockX(void) { syssts_t sts = port_get_irq_status(); if (port_irq_enabled(sts)) { if (port_is_isr_context()) { chSysLockFromISR(); } else { chSysLock()...
by tsichevski
Fri Oct 26, 2018 1:51 pm
Forum: ChibiOS/HAL
Topic: usb_pump thread does not restore after chSysDisable/Enable
Replies: 6
Views: 824

usb_pump thread does not restore after chSysDisable/Enable

Hi all, I use ChibiOS_17.6.3 I use power STOP mode to save power on my battery-powered device. I shut my system down and restart it according to the recommendations here: http://www.chibios.org/dokuwiki/doku.php?id=chibios:kb:power Everything goes well, but I noticed that the thread named "usb_...
by tsichevski
Wed Jun 20, 2018 8:38 am
Forum: ChibiOS/HAL
Topic: Timers: how to set the next delay in the callback
Replies: 4
Views: 806

Re: Timers: how to set the next delay in the callback

You should check the reference manual for your chip. E.g. the STM32F446 and also others have a preload bit which enables the shadow register. (ARPE) ... Thanks, it did the trick! The only downside is I have to fix it in the ChibiOS code, since the value 1 of the bit is hardwired in the gpt_lld_star...
by tsichevski
Tue Jun 19, 2018 10:59 pm
Forum: ChibiOS/HAL
Topic: Timers: how to set the next delay in the callback
Replies: 4
Views: 806

Timers: how to set the next delay in the callback

Hi, I need a repetitive timer, with variable interval. I want the next interval be set in the timer callback. I.e. when the timer fires, I decide when to fire it next. I implemented it using ChibiOS GPT. I start the timer with gptStartContinuous(), and set the next interval with gptChangeIntervalI()...
by tsichevski
Wed Jun 13, 2018 11:49 am
Forum: ChibiOS/HAL
Topic: Chibios 18.2.1 and interrupts
Replies: 3
Views: 623

Re: Chibios 18.2.1 and interrupts

Thanks, Giovanni. No, these are the TIM8 interrupts, though I do not use this timer. And after I've provided empty handlers for all the TIM8 interrupts, the interrupts with lesser numbers continue to trigger :( > try starting from a new demo as template... I did it once with ChibiOS 17, and a have a...
by tsichevski
Wed Jun 13, 2018 7:30 am
Forum: ChibiOS/HAL
Topic: Chibios 18.2.1 and interrupts
Replies: 3
Views: 623

Chibios 18.2.1 and interrupts

Hi, I'm trying to upgrade from ChibiOS_17.6.3 to Chibios 18.2.1 by replacing corresponding files in my project. I've managed to build the executable, but when started, it fires (unhandled in my case) exceptions starting from VectorF8 downward (i.e. VectorF4, VectorF0 and so on.). These were never en...
by tsichevski
Tue Jun 12, 2018 7:11 pm
Forum: ChibiOS/HAL
Topic: Chibios 18.2.1 and CRC driver
Replies: 2
Views: 563

Re: Chibios 18.2.1 and CRC driver

Thank you, Giovanni! I've added the 'low power mode' parameter to the rccEnableXXX() call. And it did the trick!
Also I had to add the hal_community.h and halconf_community.h to the project.

Regards,
Vladimir

Go to advanced search