8 years, 2 months ago.

How can I RESET this from my program?

Hello I am programming a TFT LCD using this Nucleo and the program works well >>except<< that for some reason it only works when I press the nucleo reset button. (I dont know why, if someone has some idea please tell me)

So to "solve" this issue I would like to call this reset from my code (I read that the reset button is connected to the NRST pin in the STM32. ) Can someone tell me how can I do this???

Thanks a lot!

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F091RCT6 microcontroller.

I strongry recommend to solve real root cause "for some reason it only works when I press the nucleo reset button"!
If you would like to try "software reset", please try to excecute following command in your program.

software_reset_for_ARM_Coretex_M0

SCB->AIRCR = 0x05fa0004;    // System RESET!!
posted by Kenji Arai 15 Feb 2016

Or:

NVIC_SystemReset()
posted by Erik - 15 Feb 2016

I guess you are right. I should search for the root cause, but I can't figure it out. :( The board works perfectly >>except<< the first time, when just connected. Only in that case I should manually reset it. After that, everytime I rewrite the program it works without problem

I tried both of your reset commands and it was worse. This time it never works, it stays the same as when previously freshly connected....

I am at a lost what to do now...(except manually pressing the reset button that is)

posted by Cristian Fuentes 24 Feb 2016

One year later and this issue has resurfaced...worst....

posted by Cristian Fuentes 27 Apr 2017

1 Answer

8 years, 2 months ago.

We are using TFT LCD display on assorted Nucleo targets with success. What is the issue you are facing that requires the pressing of the reset button ? Which TFT LCD display is being used ?

To perform the reset via software, please review this post :

https://developer.mbed.org/users/peterand/code/Sw_reset/

In the Init() function that initializes the TFT LCD I used to put the LCD Reset to 0 and then 1 (with another microprocessor) (100ms between those) It worked Now with the STM32 nucleo I am putting the LCD pin 1 then 0 then 1 but the screen keeps blank. I have to press the STM reset button and then the program works without problems.

I have no idea why this happens

posted by Cristian Fuentes 17 Feb 2016