STM32F103C8 resetinng

The official STMicroelectronics Arduino core
Partha
Posts: 4
Joined: Tue Oct 11, 2016 4:09 am
Location: India

STM32F103C8 resetinng

Postby Partha » Tue Oct 11, 2016 4:20 am

Hello all,
I have an STM32F103C8 based custom board. When I load a very simple program to toggle an LED, the LED toggle for a few seconds and the controller resets. I have also noticed, if I load the program through Flash loader, the LED toggles for a few seconds. If I directly execute the code by makinf boot0 pin low, the controller is resetting much faster. What could be the problem? Thanks for your time.
Partha

User avatar
ahull
Posts: 1423
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: STM32F103C8 resetinng

Postby ahull » Tue Oct 11, 2016 8:19 am

What value of current limiting resistor is used with the LED? Which pin is the LED on?
- Andy Hull -

edogaldo
Posts: 214
Joined: Fri Jun 03, 2016 8:19 am

Re: STM32F103C8 resetinng

Postby edogaldo » Tue Oct 11, 2016 10:15 am

Check there are no poor solderings which cause any shortcut.

Partha
Posts: 4
Joined: Tue Oct 11, 2016 4:09 am
Location: India

Re: STM32F103C8 resetinng

Postby Partha » Tue Oct 11, 2016 5:50 pm

@Andy Hull,
LEDs are driven by a ULN2003 IC therefore there is no excess current through port pins, if that was your doubt. The pin used to drive one LED is PORTB 7 or PB7. I have disabled the second LED.

@edogaldo
I have checked, will check again. If there is some short circuit, then the controller should become hot and go into thermal shut down. This is not the case. Controller is cool.
Partha

User avatar
RogerClark
Posts: 5470
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32F103C8 resetinng

Postby RogerClark » Tue Oct 11, 2016 7:37 pm

How many boards did you make?

Are you basing this analysis on just one board, which conceivably has a faulty chip?

Other possible causes could be faulty crystal oscillator.

Really this is a hardware fault, either in your design or manufacture, or component faults.

Buy a Maple Mini board compare your design with it, as Maple mini is open source and stable hardware

Partha
Posts: 4
Joined: Tue Oct 11, 2016 4:09 am
Location: India

Re: STM32F103C8 resetinng

Postby Partha » Wed Oct 12, 2016 2:55 am

Hi RogerClark,

This same board worked initially. Initially I used StLink V2 (SWD) jtag to load the code into the device. Some times the code will not load, sometimes I get a message that read is disabled (I re enabled by going into options tab). It was after this the chip started resetting. I then switched to serial port loading using flash loader. Is there a possibility that WDT got set in the chip which never resets even after power down? (I never enabled WDT in my code but the way chip is behaving). If the chip is faulty, then even flashing loading should not work. I have two more bare boards. Have to get components soldered.
Partha

Partha
Posts: 4
Joined: Tue Oct 11, 2016 4:09 am
Location: India

Re: STM32F103C8 resetinng

Postby Partha » Wed Oct 12, 2016 8:16 am

SOLVED
I think this may help people who get stuck with similar problem. What happened was, when I used JTAG and ST Link software to program the controller, the WDT got enabled (reason I have no clue). What is not known is - WDT can be enabled and saved/set and whenever application is run WDT gets enabled (I think, cause boot loader is working not resetting). I am attaching a snap shot of the settings. May help some one in future save lots of hours and agony.

Thanks for your time and support.
settings.png
settings.png (227 KiB) Viewed 392 times
Partha

User avatar
RogerClark
Posts: 5470
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32F103C8 resetinng

Postby RogerClark » Wed Oct 12, 2016 8:57 am

Thanks @Partha

I don't think anyone else has ever had this problem, but thanks for sharing the information as it may be useful to someone else in the future


Return to “STM Core”

Who is online

Users browsing this forum: No registered users and 1 guest