2021-03-16 02:07 AM
Hello,
I want to program the device using SWIM interface, The host is FPGA, but the device can't response successfully.
When I reset the SWIM, the return value is wrong, and write SWIM_CSR could not successfully.
I attach the wave form picture, please help to check what the problem.
Thanks very much.
I can use ST-Link to program the device.
2021-03-16 04:53 AM
You can tell more easily if a tree is dead by looking at it as a whole rather than analyzing its leaves under microscope.
So, better show us the setup rather than oscilloscope frames.
2021-03-17 02:30 AM
Hello Cristian,
Thanks for your reply.
I just do 4 step,
Then, it has error, sometimes the step 3 has error, others the step4 errors.
It seems the programmer could not receive right ACK waveform after sending command.
Please help give me some suggestion.
Shirley
2021-03-17 08:33 PM
Hello,
I see in the datasheet:
The “connect on-the-fly�? mode can be used while the device is executing code, but if there is a device reset (by software reset) during the SWIM connection, this connection is aborted and it must be performed again from the debug tool. Note that the software reset occurrence can be of every 4 milliseconds, making it difficult to successfully connect to the device's debug tool (there is practically only one successful connection trial for every 10 attempts). Once that a successful connection is reached, the device can be programmed with a valid firmware without problems; therefore it is recommended that device is never erased and that is contains always a valid code loop.
Does the device is difficult to connect?
Thanks!
2021-03-25 12:46 AM
A problem with the 8-pin STM8 devices is that the SWIM connection pins are wired together with multiple bond pads internally and there is no external reset pin. Setting a port as output that shares a pin with a SWIM input pin will make the device inaccessible via SWIM. For details see section 7.2, "Delay before SWIM pin configuration" in the STM8S001J3 getting started document (AN5047).