2017-06-17 09:12 AM
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
2017-06-17 11:34 AM
>>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.
2017-06-17 01:50 PM
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.
2017-06-18 05:43 AM
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.
2017-06-18 08:17 AM
>>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.
2017-06-18 10:13 AM
I'd made, but with no results.
Thanks anyway.
2017-06-19 01:02 AM
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: