cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with configuration of PF2_NRST pin of STM32C011J6

Avonsytems
Associate

STM32C011J6.jpg

Here,

PF2_NRST pin (Pin Number - 4) is configured as digital input pin.

And PA13 pin (Pin Number- 7) is configured as digital output.

When toggling the pin PA13, getting proper voltage level 3.3 volts and 0 volt. While reading low level on the input pin the controller is pulling down the output pin level from 3.3 volts to 1 volt. Tested in both conditions i.e internal pull up enabled and the disabled. Please check the below lines of code.

/*Configure GPIO pin : IR_INT_Pin */
GPIO_InitStruct.Pin = IR_INT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(IR_INT_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : RELAY_OUT_Pin */
GPIO_InitStruct.Pin = RELAY_OUT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(RELAY_OUT_GPIO_Port, &GPIO_InitStruct);

1 REPLY 1
KnarfB
Principal III

Did you disable NRST pin function in the option bytes?

hth

KnarfB