Search found 107 matches

by Thargon
Wed Mar 04, 2015 12:57 pm
Forum: User Projects
Topic: ADC analog watchdog for STM32F4xx
Replies: 0
Views: 1071

ADC analog watchdog for STM32F4xx

I managed to get the ADC analog watchdog running for the STM32F4xx platform. The patch can be applied to ChibiOS/RT version 2.6.7 and changes the files ⋅  os/hal/platforms/STM32F4xx/adc_lld.h ⋅  os/hal/platforms/STM32F4xx/adc_lld.c os/hal/platforms/STM32F4xx/adc_lld.h : The adcer...
by Thargon
Mon Feb 16, 2015 2:29 pm
Forum: General Support
Topic: chibios_rt::Timer
Replies: 5
Views: 1322

Re: chibios_rt::Timer

Hi again, thanks for the link, though it didn't help me in this particular case :( I don't have a dev board at hand right now, so I cant use the debugger stack trace. What I just did, was to read the dbg_lock_cnt and isr_lock_cnt variables (which seem to be relevant for the SV#4 error) just before I...
by Thargon
Mon Feb 16, 2015 12:35 pm
Forum: General Support
Topic: chibios_rt::Timer
Replies: 5
Views: 1322

Re: chibios_rt::Timer

Hi, thanks for your quick reply. If that was the case, why do I get SV#10 without chSysLock()? Maybe I don't understand the locking system yet, but I can't find a good explanation in the documentation. The documentation just states Function Class: Special function, this function has special requirem...
by Thargon
Mon Feb 16, 2015 11:35 am
Forum: General Support
Topic: chibios_rt::Timer
Replies: 5
Views: 1322

chibios_rt::Timer

Hi guys, I'm trying to implement some state machine like behaviour and would like to use a timer to trigger an upcoming state. I just want to wait for some time and then trigger an event for one specific thread (no broadcast). Since evereything else is done in C++, I would prefer to use the provided...
by Thargon
Thu Feb 05, 2015 4:47 pm
Forum: STM32 Support
Topic: ADC analog watchdog
Replies: 10
Views: 3520

Re: ADC analog watchdog

I thought of a similar solution: 1 - stop adc convertion 2 - set the driver state to ADC_ERROR 3 - if an error callback was set: call it 4 - if the driver state is still ADC_ERROR : 4.1 - set the related ADCConvertionGroup to NULL 4.2 - stop and 'detach' the related thread This way, a watchdog inter...
by Thargon
Thu Feb 05, 2015 1:26 pm
Forum: STM32 Support
Topic: ADC analog watchdog
Replies: 10
Views: 3520

Re: ADC analog watchdog

Hi, thanks for your reply! As I understand, the according method in the implementation for the F3 is CH_IRQ_HANDLER() (os/hal/platforms/STM32F30x/adc_lld.c:253), which calls adc_lld_serve_interrupt() in line 215, which again calls the _adc_isr_error_code() makro (os/hal/include/adc.h:264) dependig o...
by Thargon
Wed Feb 04, 2015 5:27 pm
Forum: STM32 Support
Topic: ADC analog watchdog
Replies: 10
Views: 3520

ADC analog watchdog

Hi all, I'm having some troubles to solve the following problem with the ADC watchdog. What I want to do : Basically, I want to be informed when the measured voltage rises above / drops below a certain threshold (in order to enable/disable a battery charger) but without having to measure it explicit...

Go to advanced search