cancel
Showing results for 
Search instead for 
Did you mean: 

STM8AF Output NRST Pin signal

david.ye
Associate II
Posted on April 11, 2018 at 05:58

Dear all,

First I would like to thank you for any help that you might give me.

My purpose is to flash an empty code in the uC (STM8AF5288TAY) but its always says ''lost SWIM communication''.

After analyse of our self designed board, I remarked that the problem might come from the NRST pin of the uC.

There is only a condensator connected to this pin during my test :

0690X0000060AX9QAM.png

But you can see that the signal NRST(shown below) is not pulled up as it should be :

0690X0000060AX4QAM.png0690X0000060AXJQA2.png

If I remove the condensator, I have this on the NRST pin :

0690X0000060AXEQA2.png

Please can someone tell me why I have this signal in the NRST pin while there is nothing going on? In my undersanding I should have 5V straight while nothing is happening; So where this signal comes from?

I am really looking forward for an answer or advice as I can not find the solution since weeks and cannot flash any program.

Thank you in advance,

Ye David 

#stm8 #nrst-pin #flash-writing
18 REPLIES 18
Max
ST Employee
Posted on April 13, 2018 at 18:29

When you reach the state STVP from your screenshot:

- unplug you board to make sure the MCU is not supplied anymore

- force the RESET low and keep it low

- apply the supply without releasing the RESET

- now click the button on the message window 

- then and only then release the RESET 

If you succeed to connect that way, make sure to perform a global erase first

Posted on April 23, 2018 at 11:30

Hello,

I think the reset constantly toggling is a sign of option bytes not complemented, some options needs to be complemented otherwise a reset is generated.

After reset going high, the mcu checks the options bytes and if not complemented it resets itself for security, then after reset high, it checks again and so on...

So, the only way is to connect and reprogram option bytes to avoid this.

Do you connect the reset pin to the STLink ?

If impossible to check the options because you can't connect to the device, maybe you can try with the bootloader ?

Rgds,

Laurent

Posted on April 28, 2018 at 09:10

Hi Laurent,

The reset pin is connected to the STLink. Same for the VCC,GND and DATA pins.

Can you help me understand how does a bootloader works?

I am not familiarised with this method of flashing program as I use IDE every time to do it.

Is it a software that I have to download and use instead of the IDE?

Thanks for the help!

YE David

Posted on April 28, 2018 at 09:13

Hello Max,

I did this process very carefully and many times but the STVP still have problem to connect the SWIM.

The global reset should be done if this is the result of this manupilation. 

Maybe that the reset parameter of the uC are not correct and as Laurent says below, option bytes are not implemented which lead to constant reset of the MCU?

Many thanks, 

YE David

Tim Schuerewegen
Associate
Posted on May 01, 2018 at 23:48

Did you connect VDD to the VDDIO pin(s)?

Did you connect VSS to the VSSIO pin(s)?

Did you connect an external capacitor (470nF-3300nF) between the VCAP pin and VSS?

Posted on May 02, 2018 at 12:43

Hi Tim,

Thank for the reply.

Yes VDD and VDDIOs are connected, VSS and VSSIOs as well. There is also a external capacitors VCAP-VSS which is 1uF.

Below, you can see how I connect to flash the code; The PCB contains only the condos for the VDDs et VSSs, NRST pin and for VCAP.

0690X0000060ArOQAU.png

(Don't care about the black wire, it is not connected)

Do you have any suggestion about this connection?

Best regards,

YE David

Max
ST Employee
Posted on May 03, 2018 at 13:53

The bootloader uses the device UART to reprogram the device.

It is based on a small program embedded in the device system memory.

See explanation in

http://www.st.com/content/ccc/resource/technical/document/user_manual/e4/83/c1/d6/ee/d8/49/b8/CD00201192.pdf/files/CD00201192.pdf/jcr:content/translations/en.CD00201192.pdf

 and the programming tool

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/flasher-stm8.html

.

Depending on the STM8 device, the bootloader code in the device system memory may supports other communication interfaces (CAN, LIN, SPI...) but the UART is the only one supported by the

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm8-software-development-tools/stm8-programmers/flasher-stm8.html

 tool.
Posted on May 03, 2018 at 13:47

Hello,

I answer first on previous question about bootloader, look for UM0560 about STM8 bootloader.

The soft to connect is 'Flash loader demonstrator'.

I see that you're using Rlink probe, can you tell us which jumper you set or on which side they are ?

Can you try to connect in SWIM mode with an STLink ?

Rgds,

Laurent

Posted on June 08, 2018 at 06:11

Hello Laurent,

We finally resolved the problem thanks to your comment. 

All came from one misunderstanding. The Vcap was present on the electrical schematic design but not in our SMT machine programming files.

The flashing is working properly either with Raisonnance Rlink or with STVP RT-link.

Many thanks and best regards,

David