cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C011 nRST Problem

TKana.1
Associate III

Hi,

I started working on STM32C011J4.

Systick, PWM, ADC, GPIO works just fine. Set pin4 to NRST_MODE 2 via STM32CubeProgrammer (v2.15.0) as GPIO. 

MCU gets stuck at reset if pin4 is low at power on reset. After applying 1.4V or higher to it momentarily (even leaving it floating), MCU starts running and pin4 acts as GPIO, no reset functionality until next power cycle.

Any thoughts?

Thanks,

Tim

 

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Unfortunately, you have fallen into a trap, RM0490, section 5.1.2 mentions the reason under Fig 8:

Caution:Upon power reset or wakeup from shutdown mode, the NRST pin is configured as Reset input/output and driven low by the system until it is reconfigured to the expected mode when the option bytes are loaded, in the fourth clock cycle after the end of tRSTTEMPO time (see datasheet).

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8
Peter BENSCH
ST Employee

Unfortunately, you have fallen into a trap, RM0490, section 5.1.2 mentions the reason under Fig 8:

Caution:Upon power reset or wakeup from shutdown mode, the NRST pin is configured as Reset input/output and driven low by the system until it is reconfigured to the expected mode when the option bytes are loaded, in the fourth clock cycle after the end of tRSTTEMPO time (see datasheet).

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Simon.T
ST Employee

Hello,

 

You must ensure that, upon power-on, the level on the NRST pin can exceed the minimum VIH(NRST)
level specified in datasheet. Otherwise, the device does not exit the power-on
reset. This applies to any NRST configuration set through the NRST_MODE[1:0] bitfield, the GPIO mode
inclusive.

 

Best regards,

 

Simon

Thank you Simon,

 

Explains a lot more than the reference manual

 

Kind regards,

Tim

 

This text will be added on the next Reference Manual and Datasheet document revision. 

 

TKana.1
Associate III

Will help a lot. Would be a disaster for me to find it out after mass production for example

PGump.1
Senior

Hi

Given that the maximum internal pullup resistance for the NRST is 55k, and if you want to use it as a dedicated input, than you need a minimum series resistance of 124k (to meet 0.7VCC) - is this correct?

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.
Peter BENSCH
ST Employee

No, that is not correct. For the function of the pin on which NRST is also available, you should read RM0490, section 5.1.2. According to this, you have one of three functions on the STM32C011 pin:

  • Reset Input/Output
  • Reset Input
  • GPIO pin

You will only find the internal NRST pull-up on the pin if it is also configured as NRST, i.e. either Reset Input/Output or Reset Input. If the pin is configured as a GPIO, it has the usual individually configurable and optional pull resistors for GPIOs.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you for your reply.

RM0490 says that the NRST pin is a RESET I/O pin for the first 4 clock cycles...

Tests here have concluded that the clock cycles DON'T advance while the NRST is held low, even with the Option Bytes set the NRST as a GPIO...

I have to allow the NRST to go high before the device will operate.

STM32CubeProgrammer complains that the device is held in a Reset state.

I put a 120k resistor in series - all good... Luckily, in my case, this resistor won't affect the application.

Kind regards
Pedro

 

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.