cancel
Showing results for 
Search instead for 
Did you mean: 

problem with NVIC_SystemReset

fabricepeden
Associate II
Posted on March 24, 2017 at 14:47

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

17 REPLIES 17
fabricepeden
Associate II
Posted on March 27, 2017 at 16:08

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

Posted on March 27, 2017 at 14:36

Write a minimal code - only a pin toggle (blinky) - and then the reset after a couple of blinks.

JW

fabricepeden
Associate II
Posted on March 27, 2017 at 16:45

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

Posted on March 27, 2017 at 17:04

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

Posted on March 27, 2017 at 15:27

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 27, 2017 at 17:49

Most I have to hand look to be X and Y stepping (STM32F205ZCT6)

http://www.st.com/content/ccc/resource/technical/document/errata_sheet/79/08/a3/cc/fa/5c/49/c5/DM00027pdf/files/DM00027pdf/jcr:content/translations/en.DM00027pdf

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�?�?�?�?�?�?�?�?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 27, 2017 at 19:11

bx lr

?

Posted on March 27, 2017 at 19:14

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..