cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8 pins PD0 & PD1 not working as output help me to resolve this issue i am using stm32 cube mx ide

Rkolh.1
Associate II

I configured all pins of stm32f103c8 as output. All pins are toggling and only PD0 and PD1 aren't toggling .. I am using internal crystal of stm32f103c8 then obviously the PD0 and PD1 pins are free for configure as output or input.

13 REPLIES 13

#define __HAL_RCC_AFIO_CLK_ENABLE()  do { \

                    __IO uint32_t tmpreg; \

                    SET_BIT(RCC->APB2ENR, RCC_APB2ENR_AFIOEN);\

                    /* Delay after an RCC peripheral clock enabling */\

                    tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_AFIOEN);\

                    UNUSED(tmpreg); \

                   } while(0U)

Thank you friend.. you can try stm32f103c6

Simulation in protues 8.11​

void HAL_MspInit(void)

{

 /* USER CODE BEGIN MspInit 0 */

 /* USER CODE END MspInit 0 */

 __HAL_RCC_AFIO_CLK_ENABLE();

 __HAL_RCC_PWR_CLK_ENABLE();

 /* System interrupt init*/

 /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled

 */

 __HAL_AFIO_REMAP_SWJ_NOJTAG();

 /* USER CODE BEGIN MspInit 1 */

 /* USER CODE END MspInit 1 */

}

this also generated in my code

can you try simulation in protues for me?

protues 8.11 have stm32f103c6 device