2017-03-24 06:47 AM
Hi everybody,
I'm using a STM32F205VE on one of my electronic board.
I'd like to reset my microcontroller, so I use the function NVIC_SystemReset that I can find in core_cm3.h but it never works.
My board is not resetting so I don't understand what happen and why my board is not resetting.
If you've have some ideas, I'll be very happy.
Regards,
Fabrice Péden
2017-03-27 07:08 AM
I've download the same firmware in another electronic board...and it works. The two boards are exactly the same, but one thing that I notice, it's the revision code of the microcontroller.
On the board, where it works, it's labelled 'X' on the µC and on the board where it doesn't work, it's labelled '2', do you think that it can be the cause of my problems ?
Regards,
Fabrice
2017-03-27 07:36 AM
Write a minimal code - only a pin toggle (blinky) - and then the reset after a couple of blinks.
JW
2017-03-27 07:45 AM
I've also tried with revision '1' of µc, and it works. Only with revision '2', that it doesn't work.
Can I find modifications between revisions on ST website ?
Regards,
Fabrice
2017-03-27 08:04 AM
Rev. 1 and 2 in particular differ only in details of LSE, see PCN MMS-MIC/14/8461 and the STM32F20x errata.
I still believe it's not a problem with reset as such, but with the way how you are detecting it; i.e. that even the 'faulty' board *is* resetting, but there is something minute in the firmware+boards which makes a difference in external symptoms.
Implement the minimal code I suggested (I forgot to say what I believe does not need extra mention, namely that the blinking should have a pattern clearly indicating reset, e.g. first blink longer) and observe with an oscilloscope/LA, or with bare eye if blinking slow enough.
JW
2017-03-27 08:27 AM
Try the same code on a DISCO or NUCLEO board..
I've only seen this fail when the NRST pin doesn't pulse low. Check the low time on the DISCO/NUCLEO test. The chip is supposed to generate a sufficiently long pulse. Make sure there isn't too much capacitance on the pin.
2017-03-27 10:49 AM
Most I have to hand look to be X and Y stepping (STM32F205ZCT6)
Found a 2 stepping in current production, will check that now.
Later..
The 2 stepping chip appears to be resettable via my console, using the routine we currently use (equivalent to NVIC_SystemReset)
SystemReset PROC
EXPORT SystemReset
ldr r1, =0xE000ED0C ; NVIC Application Interrupt and Controller
ldr r0, =0x05FA0004 ; Magic
str r0, [r1, #0] ; Reset
b .
bx lr
ENDP�?�?�?�?�?�?�?�?
2017-03-27 12:11 PM
bx lr
?
2017-03-27 12:14 PM
Never gets there, the 'b . (dot)' loops on the spot. Tend to close out subroutines as a matter of course.
It tips the assembler to place the literals.