]> sigrok.org Git - sigrok-dumps.git/blob - swim/flash_prog/README
flexray: add dump and README
[sigrok-dumps.git] / swim / flash_prog / README
1 -------------------------------------------------------------------------------
2 SWIM
3 -------------------------------------------------------------------------------
4
5 This is a capture of an ST-Link V2 programming an STM8 using the SWIM protocol.
6
7 Details:
8 https://www.st.com/content/ccc/resource/technical/document/user_manual/ca/89/41/4e/72/31/49/f4/CD00173911.pdf/files/CD00173911.pdf/jcr:content/translations/en.CD00173911.pdf
9
10
11 Logic analyzer setup
12 --------------------
13
14 The logic analyser used was a DreamSourceLab DSLogic (at 10MHz).
15
16   Probe       Target
17   ------------------
18   0           RST
19   1           SWIM
20
21
22 sample1.sr
23 ----------
24
25 Using stm8flash with an ST-Link V2 adapter to program an STM8S003F3.
26
27 Command line:
28
29   $ stm8flash -c stlinkv2 -p stm8s003f3 -s flash -w prog.ihx
30
31 stm8flash is modified both for correctness and to generate the test sequences.
32 The updated version can be found at https://github.com/mjagdis/stm8flash.
33
34 A complete flash programming operation. SWIM is enabled and set to high
35 speed mode (notice how the pulse width and period decreases after the
36 initial chatter). A read of the affected memory region is made, compared to
37 the data to be written and those blocks that contain differences are written
38 back. Finally an SRST SWIM command is sent to terminate the conversation
39 and reset the target.