2018-04-10 08:58 PM
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 :
But you can see that the signal NRST(shown below) is not pulled up as it should be :
If I remove the condensator, I have this on the NRST pin :
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-writing2018-04-13 09:29 AM
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
2018-04-23 04:30 AM
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
2018-04-28 02:10 AM
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
2018-04-28 02:13 AM
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
2018-05-01 02:48 PM
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?
2018-05-02 05:43 AM
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.
(Don't care about the black wire, it is not connected)
Do you have any suggestion about this connection?
Best regards,
YE David
2018-05-03 04:53 AM
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
and the programming tool .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
tool.2018-05-03 06:47 AM
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
2018-06-07 11:11 PM
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