2022-04-13 04:16 AM
I try to configure STM32F072 PC15 as input I/O using STM32F0xx Standard Peripherals Firmware Library, but not successful.
Ask for help.
Tim
2022-04-13 04:44 AM
Have you looked at the examples in the SPL?
How did you try to initialise the GPIO?
Regards
/Peter
2022-04-13 06:23 AM
PC15 may have RTC/LSE functionality that needs disabled. Show your code.
2022-04-13 06:58 PM
Hi Peter and TDK,
Thank your reply.
Where is the examples in the SPL (SPI)? In STM32F0xx_StdPeriph_Lib_V1.5.0/../STM32F0xx_StdPeriph_Examples?
Here is my code:
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE);
PWR_BackupAccessCmd( ENABLE );
RCC_LSEConfig( RCC_LSE_OFF );
GpioDriverInit(GpioC,GpioPin15,GpioInput);
Br,
Tim
2022-04-14 12:54 AM
Why do you think you cannot set the pin? Maybe it's a hardware problem.
> PWR_BackupAccessCmd( ENABLE );
You need to enable PWR clock in RCC first.
To test, you can do this all directly in registers in debugger, don't need to write any code.
JW