2007-09-30 05:18 AM
Remapping PD0 and PD1
2011-05-17 03:15 AM
I'm using the STM32F103 device in a 48-pin package. I'm using the internal oscillator to clock the chip so I'd like to remap Port D pins 0 and 1 to GPIO lines. I use the following code to initialize them:
Code:
GPIO_PinRemapConfig(GPIO_Remap_PD01, DISABLE); GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_InitStruct.GPIO_Pin = GPIO_Pin_1; GPIO_Init(GPIOD, &GPIO_InitStruct); GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0; GPIO_Init(GPIOD, &GPIO_InitStruct); Later when I try to change the state of the output pin D0 and probe it with a multimeter, the voltage seems to stay at about 0.7V. This happens whether I set the pin to logic 1 or logic 0. All other GPIO pins work and toggle as intended. What could I be doing wrong? Thanks!2011-05-17 03:15 AM
2011-05-17 03:15 AM
There is a bug in the rev.A silicon - you'll need to get the errata sheet.