AnsweredAssumed Answered

STM32F103 PD0 / PD1 - Cannot get them to remap as GPIO

Question asked by NanoGeek on Aug 14, 2013
Latest reply on Aug 14, 2013 by NanoGeek
I am attempting to remap pins PD0 and PD1 as GPIO and whenever I try to change the pin state, it stays low. Am I setting something up wrong?

Init Code:
    GPIO_InitTypeDef  GPIO_InitStructure;
    /*GPIOD Output Initialization*/
    //Disable HSE
    RCC->CR &= 0xFEFF;
    //Drive source and destination enable signals
    //Enable the GPIOD peripheral
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, ENABLE);
    //Re-map PD0 and PD1 as GPIO pins
    GPIO_PinRemapConfig(GPIO_Remap_PD01, ENABLE);
    GPIO_InitStructure.GPIO_Pin          = GPIO_Pin_0   |
    //Set the pin(s) to output mode, Push Pull
    GPIO_InitStructure.GPIO_Mode      = GPIO_Mode_AF_PP;
    //initialize the above settings
    GPIO_Init(GPIOD, &GPIO_InitStructure);

Code used for toggling:
        GPIOD->ODR &= ~(GPIO_Pin_0|GPIO_Pin_1);
        GPIOD->ODR   |=    (GPIO_Pin_0|GPIO_Pin_1);

Thanks in advanced!