cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303CC not working

cbhar
Associate II
Posted on May 18, 2014 at 22:43

Hi,

I used the stm32f3 discovery board to test some code and it works fine but when I run the same code on a custom breakout I made around the stm32f303cc it runs for a while and then stops.

The time it takes for the board to stop depends on the number in instructions I write. More the instructions faster does it stop working. And all i am doing is blinking LEDs

Can Anyone tell me what the issue can be? Since the code runs fine on the discovery board it seems to be a hardware issue but as far as I can tell the hardware is good. The oscillator traces are good. The reset line is pulled high along with a reset control capacitor and all power pins are powered.

#stm32f3-discovery #stm32f3
12 REPLIES 12
gusonela
Associate II
Posted on May 19, 2014 at 01:24

Posted on May 19, 2014 at 03:18

Start by enumerating the differences between your design and that of the STM32F3-DISCO.

Assume that if it were identical it would work, and start finding the differences.

Make sure you have an 8 MHz crystal
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
cbhar
Associate II
Posted on May 19, 2014 at 04:22

I have a 16 Mhz oscillator instead of a crystal. But I followed the design guidelines for it. I updated the HSE value in stm32f30x.h to 16000000.

I don't have pin B2 (BOOT1) grounded. I don't think that's necessary.

I don't have as many decoupling capacitors as on the discovery board but again I don't think that's really necessary.

I don't have any inductors since I don't plan on using the ADC.

I have made my own board using the same crystal with updated HSE value using the stm32f373cc and that worked fine. So I think that should work for this as well.

cbhar
Associate II
Posted on May 19, 2014 at 04:31

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6fA&d=%2Fa%2F0X0000000bsg%2FD5Y1KQJldA4xAce0iyyF5FUmJlAuzpxeCZeKh8X_BNA&asPdf=false
Posted on May 19, 2014 at 14:20

Make sure the PLL settings in system_stm32f3xx.c reflect your faster clock source, and that it's not used in bypass mode.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on May 19, 2014 at 14:37

> all power pins are powered.

Including VDDA/VSSA?

Is there a ceramic decoupling capacitor across these two pins?

JW
cbhar
Associate II
Posted on May 20, 2014 at 00:21

Yes. They are correct. The MCO pin PA8 gives 16Mhz clock and the setting are correct in the system_stm32f30x.c file.

I also tried using the HSI as the system clock to run the code but it would still stop after a while.

cbhar
Associate II
Posted on May 20, 2014 at 00:27

Yes even VDDA/VSSA are powered but there is no decoupling across them. Can that cause the micro-controller to just shut down like that?

I have attached the pdf of the schematic. Maybe there is something in it I am missing.

________________

Attachments :

MotherBoard_V1_sch.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0oS&d=%2Fa%2F0X0000000bdy%2F8cerkS3HG2ENny3BVD5T7ZF14bbBT6dN0Lc3Sv4366o&asPdf=false
Posted on May 20, 2014 at 01:22

If you are using an external oscillator, you need to use HSE in BYPASS mode.

Check PLL speed via MCO (does this or HSE stop when you code stops?)

Check the Flash wait state settings

Use a debugger to identify where your code stops, and why. You don't appear to have a JTAG/SWD connection, which would be a huge design failure if you actually need to debug and understand what's going on inside.

Schematic doesn't look unreasonable, the reset capacitor is incorrectly polarized (at least diagrammatically)

Run from a bench supply observe current in normally running mode, and once it stops.

Code is incomplete, perhaps it jams up in your delay routine? mWaitms()
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..