cricard13 / STM8_SWIM_Analyzer

STM8 SWIM debug interface saleae analyzer
0 stars 0 forks source link

only swim activation detected #4

Open stefaandesmet2003 opened 3 years ago

stefaandesmet2003 commented 3 years ago

Hi, thanks for this interesting project. I managed to compile on Ubuntu 20.04 and load the analyzer in Logic Analyzer 2.3.24

I'm using stm8flash to trigger some SWIM activity from a stlinkv2 (there isn't much other hardware that can generate SWIM..) ./stm8flash -c stlinkv2 -p stm8s105?4 -s eeprom -r 105_eeprom.bin Saleae is connected on PD1, without any additional hardware (no pullups or anything). There is a signal on channel0, but apparently only SWIM_ACTIVATION is detected. Is my setup OK ? What am I doing wrong? Thanks for looking into this! Cheers, Stefaan

Screenshot from 2021-08-24 19-20-42 I activated a 500ns glitch filter because there were some glitches (do I need pullup/pulldown?) I notice that the timing for the 1kHz/2kHz pulses for the swim activation is a bit off, but the stm8flash command is successful anyway. Screenshot from 2021-08-24 19-21-20

cricard13 commented 3 years ago

Hi stefaandesmet2003, Unfortunately I haven't tested this on Logic 2.x but only Logic 1.x. I am not sure of the behavior. I have left my company STM and have now very limited access to hardware.

Would you mind sharing a trace (.sal) so I can look at your issue please?

Best regards,

Le mar. 24 août 2021 à 10:35, stefaandesmet2003 @.***> a écrit :

Hi, thanks for this interesting project. I managed to compile on Ubuntu 20.04 and load the analyzer in Logic Analyzer 2.3.24

I'm using stm8flash to trigger some SWIM activity from a stlinkv2 (there isn't much other hardware that can generate SWIM..) ./stm8flash -c stlinkv2 -p stm8s105?4 -s eeprom -r 105_eeprom.bin Saleae is connected on PD1, without any additional hardware (no pullups or anything). There is a signal on channel0, but apparently only SWIM_ACTIVATION is detected. Is my setup OK ? What am I doing wrong? Thanks for looking into this! Cheers, Stefaan

[image: Screenshot from 2021-08-24 19-20-42] https://user-images.githubusercontent.com/11933661/130661587-76f75f96-b71c-4c84-872a-03b78a70eab2.png I activated a 500ns glitch filter because there were some glitches (do I need pullup/pulldown?) I notice that the timing for the 1kHz/2kHz pulses for the swim activation is a bit off, but the stm8flash command is successful anyway. [image: Screenshot from 2021-08-24 19-21-20] https://user-images.githubusercontent.com/11933661/130661575-9ea76df5-aa7c-4f95-9083-d3b0c6b7ae01.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cricard13/STM8_SWIM_Analyzer/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFL3TV7PEHBFRUBIT2MPWTT6PJ4XANCNFSM5CXKFKEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

stefaandesmet2003 commented 3 years ago

Hi Christophe,

thanks for reaching out on this issue. Attached a sal file (renamed to zip). In the meantime I have a better understanding of the swim protocol. The glitches I mentioned in my first comment are normal behavior. When swim mode is already active on the target, it will interpret every entry sequence pulse as a comms reset, and ack it. Maybe these pulses are fooling your analyzer? I dug up a Logic2 trace, it's attached here. Since I got stuck with your analyzer I have been using pulseview, the included SWIM analyzer works ok, but I like Logic2 more (the decoding table, the selection features, the jump to next edge etc.) Happy to help test if you find the time to solve this issue. If you don't have a stlinkv2, I brew this code some time ago to implement the swim part of stlinkv2 on a stm32 devboard (like bluepill) https://github.com/stefaandesmet2003/stlinkswim You would of course also need a STM8 to see the protocol in action, and a logic analyzer to capture. But again, happy to help you with testing changes. swim_example.zip