AnsweredAssumed Answered

Problem caused by NRST pin to perform system reset

Question asked by bing.fang on Jun 15, 2015
Latest reply on Jun 15, 2015 by Clive One
Hi,

I am using STM32F405.

The NRST pin is connected to Vdd through a 100k pull-up resistor and to GND with a 0.1uF capacitor, just follows the design of STM32F4-Discovery. The NRST pin is also connected to GND with a 2-pin header for system reset purpose just like the push button on STM32F4-Discovery.

Sometimes when I try to reset the system by connecting jumper to the 2-pin header. My program will get stuck at the first SPI1 send statement. There is nothing sending out at SDO pin of STM32 but the SCLK pin keeps sending out SPI clock. It seems that SPI1 send is not finished. By the way, SPI1 is used to communicate with external ADC. No matter I reset the system by connecting NRST pin to GND or turning off the power supply, it will always get stuck at the same location. The only way to solve the problem is to erase the chip and download program again. After I download program again, the problem seems to be fixed.

I am not sure about what caused this problem since it happens randomly. 2 out of 7 of my boards have this problem and this problem does not appear after every NRST pin reset. It only happens 3 times after about 50 resets.

It looks like to be a software problem since the board works well after I re-download the program. I find out a bug  related to PLL configuration in my program and not sure whether it is related to this problem. I try to use PLL to generate 168MHz system clock from HSI. The PLL setting in my program is PLLM = 8, PLLN = 336, PLLP = 4, PLLQ = 8. According to the datasheet, PLLVCO output should not exceed 432MHz. However, in my cconfiguration, the PLLVCO output is 672MHz. (Although the PLL configuration is problematic, it stills can generate correct clock, that's interesting)

Anyone have similar experience and can give some suggestion? Thanks a lot.

Outcomes