Skip to main content
Graduate II
January 9, 2024
Solved

STM32C011 nRST Problem

  • January 9, 2024
  • 5 replies
  • 3707 views

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

 

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    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

    5 replies

    Technical Moderator
    January 10, 2024

    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

    ST Employee
    January 10, 2024

    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

    TKana.1Author
    Graduate II
    January 10, 2024

    Thank you Simon,

     

    Explains a lot more than the reference manual

     

    Kind regards,

    Tim

     

    ST Employee
    January 10, 2024

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

     

    TKana.1Author
    Graduate II
    January 10, 2024

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

    Graduate II
    April 11, 2024

    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

    Technical Moderator
    April 11, 2024

    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

    Graduate II
    April 12, 2024

    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