cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030 PROGRAMMING

sav gas
Associate II
Posted on June 17, 2017 at 18:12

Hi all,

with uvision5 I'd make a project that works in debug, but when I program the flash of STM32 the adc peripheral doesn't works. I use Nucleo-64 board.

Any suggestion?

Thanks 

6 REPLIES 6
Posted on June 17, 2017 at 20:34

>>Any suggestion?

Make sure you enable all the clocks you need, and are not reliant on ones the debugger enables. Ditto pins

Make sure BOOT0 is low.

Add instrumentation to your code so you can understand what's happening via USART/VCP without the debugger running.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Luca Sevà
Associate
Posted on June 17, 2017 at 22:50

I suggest you (if you haven't done it yet) to use the cubeMX software to generate the 'base' code that you will modify. this will ensure that the clock needed are already setted as supposed. Othe than that tou can use the gui to configure the gpio pins that you want to use as you desire and set options like interrupts....

You can also implement a sort of testing function that send diagnostic data that are relevant for the correct functionality of your particular project.

I hope I've helped you.

Posted on June 18, 2017 at 12:43

Hi Clive one,

the clock and the Boot0 seems correct. The rest of project works, exception for ADC. I noted with oscilloscope, in debug, that there is a periodic signal outgoing from adc pin. I don't understand why. 

Posted on June 18, 2017 at 15:17

>>I don't understand why. 

Hard for me too, not seeing any code.

Instrument your code so you have some clue about what's happening, if it is not running at all, or stuck in a loop somewhere.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 18, 2017 at 17:13

I'd made, but with no results.

Thanks anyway. 

Posted on June 19, 2017 at 08:02

Hi Clive One,

I noted that this project has the same problems described before. It's is a project from 'STM32Cube_FW_F0_V1.8.0\Projects\STM32F030R8-Nucleo\Examples\ADC'. Can you examine?

Thanks: