2014-05-18 01:43 PM
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 LEDsCan 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 #stm32f32014-05-18 04:24 PM
2014-05-18 06:18 PM
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 crystal2014-05-18 07:22 PM
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.2014-05-18 07:31 PM
2014-05-19 05:20 AM
Make sure the PLL settings in system_stm32f3xx.c reflect your faster clock source, and that it's not used in bypass mode.
2014-05-19 05:37 AM
> all power pins are powered.
Including VDDA/VSSA? Is there a ceramic decoupling capacitor across these two pins? JW2014-05-19 03:21 PM
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.2014-05-19 03:27 PM
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=false2014-05-19 04:22 PM
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()