Page 1 of 1

Unexpected reset on STM32F030F4

Posted: Wed Dec 30, 2015 12:47 pm
by hobby16

Code: Select all

My configuration
RTOS : chibiOS 3.0.4
IDE : Emblocks 2.30
uP :
STM32F103C8
STM32F030F4


Hi,
First, I would like to thank Giovanni for the great chibiOS. HAL is much much greater than the ST bloatware interface (let alone the horrible ST32CubeMX). I have managed to have it work beautifully on EmBlocks with template projects for HAL, nil and RT on a $3 STM32F103C8 board (if someone is interested, I can post them on the forum, I had a hard time configuring EmBlocks to compile and link properly the chibiOS examples).

Now my question : I have ported on emblocks a RT test project (led flashing & uart sending) on a STM32F030F4 based on the demo example NIL-STM32F051-DISCOVERY. The processor link file is for STM32F051x8 so for STM32F030F4, I have to change the OS timer to timer3 and specify it's a 16 bit timer.
I have the led flashing in one task and Serial1 sending data in another task, all is fine except that main() is restarted every 250ms. It's as if a reset occurs every 250ms and I have no idea how to trace it. I have ported a simple flashing routine to HAL , to eliminate the possibility that the bug might come from the RTOs, and also to RT, but the same bug occurs at the same rate.
Anyone has an idea where it comes from or how & where to trace it ? (I have just started on STM32 2 weeks ago, so with minimal experience on this great stuff). Thank you in advance, because I have spent hours on it and lack idea how to get further.

Re: Unexpected reset on STM32F030F4

Posted: Wed Dec 30, 2015 2:19 pm
by Giovanni
Hi,

Is it possible that the watchdog is enabled?

Giovanni

Re: Unexpected reset on STM32F030F4

Posted: Wed Dec 30, 2015 3:51 pm
by hobby16
Giovanni wrote:Is it possible that the watchdog is enabled?
Hell, that's it !
I launch the st-link utility, open the "Option bytes" menu, check the WDG_SW box, and voilĂ , no more unwanted reset.
Thank you so much Giovanni !

Re: Unexpected reset on STM32F030F4

Posted: Tue Jan 05, 2016 8:16 pm
by hakko
HI! Can you share your full setup files?