Search found 35 matches

by sdalu
Tue Feb 28, 2017 10:55 am
Forum: User Projects
Topic: buzzer player
Replies: 7
Views: 5337

Re: buzzer player

Hi, That's what I'm using (sorry for the delay, these times, I'm not actively reading the forum) I'm using standard halconf/mcuconf for the STM32F042K6 with PWM enabled // PWM static const PWMConfig pwm_cfg = { .frequency = 1000000, /* 1MHz PWM clock frequency. */ .period = 250, /* Initial PWM perio...
by sdalu
Thu Sep 22, 2016 5:45 pm
Forum: STM32 Support
Topic: NUCLEO-F042K6 and PWM on TIM14 Topic is solved
Replies: 1
Views: 2288

NUCLEO-F042K6 and PWM on TIM14 Topic is solved

Hi

According to the datasheet, it seems possible to use TIM14 CH1 as a PWM, but I don't see support for TIM14 in the hal pwm code.

Is there some restrictions?

Thanks
by sdalu
Tue Aug 09, 2016 10:04 pm
Forum: User Projects
Topic: buzzer player
Replies: 7
Views: 5337

Re: buzzer player

Hi. You need to use ruby 2.3, due to the &. syntax and some of the Enumerable methods Volume is currently not handled by the driver as it is not possible to control it by using only the pwm driver. It would requires additional circuitry to control it using the voltage. If you can provide me with...
by sdalu
Fri Aug 05, 2016 9:50 pm
Forum: User Projects
Topic: buzzer player
Replies: 7
Views: 5337

buzzer player

I've written a small code to allow basic control of a buzzer and to play "melody" (using a compact format)

I'm putting the link here, if it can be useful to someone else.

https://github.com/sdalu/kakapo
by sdalu
Thu Jul 28, 2016 3:41 pm
Forum: Small Change Requests
Topic: shell info command improvement
Replies: 6
Views: 4340

Re: shell info command improvement

Also it would be very convenient if it was possible to extend the info command with new information, perhaps something like shell_cmd.h #if defined(SHELL_CMD_INFO_EXTRA) SHELL_CMD_INFO_EXTRA(BaseSequentialStream *chp, int argc, char *argv[]); #endif shell_cmd.c static void cmd_info(BaseSequentialStr...
by sdalu
Thu Jul 28, 2016 3:27 pm
Forum: Small Change Requests
Topic: shell info command improvement
Replies: 6
Views: 4340

shell info command improvement

Hi It would be nice to have the "info" command listing the hal drivers that have been compiled in, something like: chprintf(chp, "HAL drivers: %s"SHELL_NEWLINE_STR, "" #if defined(HAL_USE_RTC) && HAL_USE_RTC " RTC" #endif #if defined(HAL_USE_PAL) &...
by sdalu
Sun Jul 10, 2016 3:15 pm
Forum: ChibiOS/HAL
Topic: Test case: out of time window
Replies: 2
Views: 2164

Test case: out of time window

I'm working on nrf52 port, I've got one test case failing with "out of time window" (3.2) Test is starting at time 3337ms, ending at 4337ms, which seems to "nearly" meet the 1000 ms timeout requirerment of the test. Test is using test_assert_time_window(time + MS2ST(1000), time +...
by sdalu
Thu Jun 30, 2016 3:22 pm
Forum: ChibiOS/HAL
Topic: Driver for button
Replies: 10
Views: 6558

Re: Driver for button

I'm no expert at embedded system, so when I wrote my little code I googled a lot, and found this docummentation about debouncing: http://www.eng.utah.edu/~cs5780/debouncing.pdf At page 6, it seemed to me that using an interrupt was not a good idea, and I went for the easy way of a virtual timer kick...
by sdalu
Fri Jun 24, 2016 10:01 am
Forum: ChibiOS/HAL
Topic: Driver for button
Replies: 10
Views: 6558

Re: Driver for button

Having an abstraction of a general user-input system would be great. I'm not feeling doing it by myself, but would be happy to help.
by sdalu
Thu Jun 23, 2016 10:46 pm
Forum: ChibiOS/HAL
Topic: Driver for button
Replies: 10
Views: 6558

Driver for button

Hi, (I'm not sure if it is the right forum section to post) I've started to write a component for handling switch/button, so to avoid having to write the same code every time. It is handling debouncing, grouping 2 buttons to emulate a third one, and optionally generate dbl-click and longpress. Could...

Go to advanced search