Search found 37 matches

by Engemil
Tue Feb 24, 2026 1:43 pm
Forum: ChibiOS/HAL
Topic: USB freezes when not reading serial data, bug or by design?
Replies: 2
Views: 9402

Re: USB freezes when not reading serial data, bug or by design?


Hi,

I think you should work with timeouts, if the host stops polling for data (buffers full) then packets are not sent. USB_ACTIVE means that the device has been enumerated not that it is under active polling.

You may try writing with a timeout, on timeout add a delay before retrying. The ...
by Engemil
Mon Feb 23, 2026 11:05 pm
Forum: Bug Reports
Topic: Fixed broken TIM2 for STM32C0xx
Replies: 2
Views: 12034

Fixed broken TIM2 for STM32C0xx

Hi!

Fixed broken TIM2 for STM32C0xx on stable_21.11.x. Caused by missing include, init and deinit of TIM2 IRQ in os/hal/ports/STM32/STM32C0xx/stm32_isr.c

I confirm TIM2 now works for STM32C071RB.


From 12540053b7a96dc2640e640dbb3df0ae0321e78c Mon Sep 17 00:00:00 2001
From: engemil <engemil@users ...
by Engemil
Mon Feb 23, 2026 10:29 pm
Forum: ChibiOS/HAL
Topic: USB freezes when not reading serial data, bug or by design?
Replies: 2
Views: 9402

USB freezes when not reading serial data, bug or by design?

Hi!

Using ChibiOS Stable release 21.11.x
Microcontroller: STM32C071RB

I've been testing the USB driver for a while now, and have come to discover a situation where the microcontroller (STM32C071RB) freezes.

Steps:
- Simple example code, loop every 1 second print with chprintf the text "Test ...
by Engemil
Tue Dec 16, 2025 10:56 pm
Forum: Small Change Requests
Topic: Fixed USB for STM32C0xx (for HAL conf v9 and RT conf v8)
Replies: 1
Views: 4054

Fixed USB for STM32C0xx (for HAL conf v9 and RT conf v8)

Hi!

Based on development version of ChibiOS (github commit c474a2d75d31ce7e551c6ae69ba75dfdc95a9b7c) (to become version 21.11.5??), I fixed problems with USB for STM32C0xx, with for HAL config file version 9, RT config file version 8, and newest mcuconf for STM32C071RB.

Updated STM32C0xx port ...
by Engemil
Sun Dec 14, 2025 9:07 pm
Forum: STM32 Support
Topic: Question; How to use other channels than TIMx_CH1 with DMA (+ PWM)?
Replies: 2
Views: 4282

Re: Question; How to use other channels than TIMx_CH1 with DMA (+ PWM)?

Hi Giovanni!

SOLVED ! Thanks for the clarifications! It was just as simple as enabling the DMA request in TIM_DIER . The CCxDE (CC1DE, CC2DE, CC3DE, CC4DE) needs to be enabled ( 0x01 ) for each correlating channel to work (TIM1_CH1, _CH2, ...).

I'll leave a note here for people to see:

I checked ...
by Engemil
Sun Dec 14, 2025 2:26 am
Forum: STM32 Support
Topic: Question; How to use other channels than TIMx_CH1 with DMA (+ PWM)?
Replies: 2
Views: 4282

Question; How to use other channels than TIMx_CH1 with DMA (+ PWM)?

Hi!

I got DMA with PWM working with TIM1_CH1 , TIM16_CH1 , and I guess all TIMx_CH1 . However, I seem to have a problem with utilizing other TIM channels, such as TIM1_CH3 . And here I'm not sure if there are steps missing to make it work?

ChibiOS version: Newest ( Master branch, commit ...
by Engemil
Sat Sep 13, 2025 11:34 pm
Forum: STM32 Support
Topic: [SOLVED] STM32C071RB DMA callback not working?
Replies: 1
Views: 7439

Re: STM32C071RB DMA callback not working?

SOLUTION!

I accidentally came over how to fix it, after trying to add more functions :lol:

Solution is after calling dmaStreamDisable(), you must always setup the mode again with dmaStreamSetMode().
by Engemil
Sat Sep 13, 2025 10:55 pm
Forum: STM32 Support
Topic: [SOLVED] STM32C071RB DMA callback not working?
Replies: 1
Views: 7439

[SOLVED] STM32C071RB DMA callback not working?

Hi!

I've been trying to setup a simple example on controlling a LED (WS2812) on the STM32C071RB chip with PWM + DMA. Most things work! However, it seems that the callback dma_callback is never called. Any tips on what to look for to make it work?

Here is the main.c file for the example code ...
by Engemil
Sat Aug 30, 2025 8:55 pm
Forum: ChibiOS/HAL
Topic: PWM on STM32C0xx and STM32F40xx not reaching potential period time
Replies: 3
Views: 9004

Re: PWM on STM32C0xx and STM32F40xx not reaching potential period time

Alright, I just double checked the numbers, and it seems to be alright.

But, I just discovered something I didn't think would have affected the example code. If I commented out the following lines


pwmEnablePeriodicNotification(APP_PWM_DRIVER);



pwmEnableChannelNotification(APP_PWM_DRIVER ...
by Engemil
Fri Aug 29, 2025 11:01 pm
Forum: ChibiOS/HAL
Topic: PWM on STM32C0xx and STM32F40xx not reaching potential period time
Replies: 3
Views: 9004

PWM on STM32C0xx and STM32F40xx not reaching potential period time

Hi!

I've been experimenting this week with the PWM driver for both a Nucleo-C071RB board and a Nucleo-F401RE board.

I seem not to be able to reach periods of 1.25us (trying to build a simple ws2812 example).

ChibiOS: stable_21.11.x branch
Boards: NUCLEO-C071RB (48MHz clock) and NUCLEO-F401RE ...