2016-03-03 05:39 AM
Hi,
I am using STM32F072CB on a custom board in mbed compiler. I have used PF0 and PF1 pin as GPIO instead of HFE. But i am not able to control these pins as normal GPIO's. I have tested these pins having constant 1.85v and 0v.Can you please suggest me, how to use these pins as GPIO?Thank you. #pf1 #stm32f072 #pf0 #gpio2016-03-04 04:01 PM
I'm not specifically familiar with your problem (I haven't used the PF0/1 pins on an STM32F0 as GPIO, afaicr), but a quick look through the reference and user manuals suggests that all you should need to do is keep the HSEON flag clear (it is clear by default).
The startup code generated by mbed may have turned the HSE oscillator driver on, i.e. set the HSEON flag in the RCC->CR register. Quoting the reference manual,''For the additional functions like RTC, WKUPx and oscillators, configure therequired function in the related RTC, PWR and RCC registers. These functions
have priority over the configuration in the standard GPIO registers.'', so I'd start by debugging and checking whether the HSEON flag is set.
2016-03-08 02:25 AM
Thanks turner,
I have disabled the HSE function and I am able to control both the pins as normal GPIO.