2021-10-12 12:23 AM
Hello, I have a STM32F407VGT6 built into our application, During developement Iam facing some strange issue where NRST pin goes below logic level over the time(in few days), This issue happens in some of our boards. Our Circuitary only contains 0.1uF Capacitor connected across NRST pin and i assume there is internal circuitary which pulls NRST pin high so I have not connected any external pull up. I have tried replacing Cap but it didnt solve the issue. Now, I am planning to connect 10K strong pull up resistor across NRST pin. So, Could you please suggest if it is fine to add external pull up to NRST Circuit and please explain what could be the reason for the issue.
Additional question: Will internal Software Reset or watchdog reset drive that external NRST pin?
2021-10-12 12:52 AM
> Will internal Software Reset or watchdog reset drive that external NRST pin?
Yes.
JW
2021-10-12 07:00 AM
> So, Could you please suggest if it is fine to add external pull up to NRST Circuit and please explain what could be the reason for the issue.
It's fine (but unnecessary) to add a 10k external pullup, but it's unlikely to solve the issue. Probably, the chip is being reset internally due to a watchdog, BOR or other circuitry. Instrument the code to output the RCC_CSR flags on startup so you can see the source of the reset.
2021-10-12 07:53 AM
Thank you so much for your support.
My biggest concern is that controller not coming out of reset (NRST always Low) until or unless i remove the supply and plug in again manually.I have also tried Hard Reset but still it doesn't work. It would be great if you can tell me the possible reasons for nRST to go Low from uC.
2021-10-12 08:05 AM
My guess is a brown-out reset. Or damaged hardware. Or improper schematic/design.
2021-10-12 09:33 AM
Did you observe the NRST pin using an oscilloscope?
JW
2021-10-12 10:14 AM
>Did you observe the NRST pin using an oscilloscope?
No, I could not do that because the issue is not consistant , happens over the time(in days).
>My guess is a brown-out reset. Or damaged hardware. Or improper schematic/design.
I guess damaged HW may not be the reason as its working after i reset manually. I suspect BOR but not sure because when i verified my MCU VDD supply during the issue it was 3V which internally connected to nRST via pull up.I have also read that BOR is always active in STM32F4 devices and will keep the device in reset state until it gets proper supply.
Now, my last question is how can BOR pulls nRST Low even though there is enough supply to power the MCU, is it due to wrong Power-up sequence?
Thank You in Advance!!
2021-10-12 10:36 AM
2021-10-12 10:47 AM
2021-10-12 12:51 PM
As @TDK said: "Instrument the code .. so you can see the source of the reset." Using HAL:
int main(void)
{
/* USER CODE BEGIN 1 */
char *reset_cause = "unknown";
if( __HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST) ) {
reset_cause = "IWDG";
} else if( __HAL_RCC_GET_FLAG(RCC_FLAG_BORRST) ) {
reset_cause = "BOR";
} else if( __HAL_RCC_GET_FLAG(RCC_FLAG_PORRST) ) {
reset_cause = "POR";
} else if( __HAL_RCC_GET_FLAG(RCC_FLAG_PINRST) ) {
reset_cause = "PIN";
}
// and so on
__HAL_RCC_CLEAR_RESET_FLAGS();
and output the result.
hth
KnarfB