Unexpected reset on STM32F030F4

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
hobby16
Posts: 2
Joined: Wed Dec 30, 2015 11:57 am

Unexpected reset on STM32F030F4

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Unexpected reset on STM32F030F4

Post by Giovanni »

Hi,

Is it possible that the watchdog is enabled?

Giovanni
hobby16
Posts: 2
Joined: Wed Dec 30, 2015 11:57 am

Re: Unexpected reset on STM32F030F4

Post 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 !
hakko
Posts: 2
Joined: Sun Jan 03, 2016 8:10 pm

Re: Unexpected reset on STM32F030F4

Post by hakko »

HI! Can you share your full setup files?
Post Reply