2018-01-15 07:08 AM
Moving code from NPX Freescale chip using CodeWarrior and Processor Expert. Have 4 lines that are used to monitor different voltages would like to know how the GPIO lines are configured to feed the ADC and check the values to see if the values are in or out of range?
2018-01-15 08:54 AM
Have you tried to install the STM32CubeMX? Every STM32 line has its own library. Once you run CubeMX it will download the library to support the MCU you select. Inside the lib package you will find some examples. ADC example is also provided for F0.
You can try to do it without using examples using the CubeMX code generator. Enable ADC through selecting analog inputs, generate the code, then look into HAL library manual to see what API to call to retrieve ADC values.
There is, as far as I remember, nice STM32 CubeMX-based training (ST-provided) covering many basic pheriperals where you can see the process of enabling particular functionality e.g. ADC, I2C etc.
Other option: google 'STM32F0 ADC' - there is online tutorial available (non ST provided).
No sure how deeply you wanna go into the details. Whether you need quick fix or wanna study the STM 32 deeply...
2018-01-15 10:30 AM
I will look into get STM32CubeMX. I am looking into an IDE for development also, do you consider this one by STM a good development system?
2018-01-16 12:33 AM
I use Keil IDE.
I would consider Atollic True Studio as well as ST invested in it so it might be interesting in the future (going to be free and tightly integrated with STM32 tools).