ST意法半导体
直播中

董方帅

7年用户 193经验值
擅长:816319
私信 关注
[问答]

请问有谁在STM32部分上实现SWIM协议吗?

我有一个应用程序要求使用STM32F107在线编程多个STM8S器件,因此我必须在STM32F107上实现SWIM协议。我已经在STM8 Value Line Discovery板上的STM32F103部分中请求了SWIM驱动程序的源代码,但ST已经拒绝了。

有没有人在STM32部分(或任何嵌入式微控制器)上实现SWIM协议?你愿意分享源代码吗?

谢谢
#游泳STM8

以上来自于谷歌翻译


以下为原文




I have an application requiring the use of an STM32F107 to program a number of STM8S parts in-circuit, therefore I must implement the SWIM protocol on the STM32F107.  I have requested the source code for the SWIM driver in the STM32F103 part that is on the STM8 Value Line Discovery board, but ST has declined.

Has anyone implemented the SWIM protocol on and STM32 part (or any embedded microcontroller)?  Would you be willing to share the source code?

Thanks  
#swim-stm8

回帖(3)

董英灏

2019-6-26 08:46:10
你好
 
 
 有点 - 我正在努力。
 
 不,我无法分享。这是我正在开发的商业开发,因此我无法泄露任何源代码,抱歉。
 但是我可以给你提示如何去做。
 
 SWIM位的时间意味着尝试咬一下它是不切实际的。
 STM32内部的定时器具有PWM模式,可用于生成1/0脉冲。
 我还没有发现使用单个计时器进行写入和读取都是可能的。
 我们的设计使用1个定时器进行写入(将定时器设置为PWM输出)
 和另一个读取计时器(设置计时器为输出比较)
 
 我还必须使SWIM驱动程序在多任务系统(FreeRTOS)中工作,因此实现大量构建在ISR和ISR内的状态机上。

以上来自于谷歌翻译


以下为原文





Hi


Sort of - I am working on it.

No, I cannot share it. This is a commercial development I am working on so I cannot give away any of the source code, Sorry.
I can however give you hints on how to go about it.

The timing of the SWIM bits means it is impractical to try and bit bang it.
The timers inside the STM32 have a PWM mode which can be used to generate the 1/0 pulses.
I have not found it possible to use a single timer to do both write and read.
Our design uses 1 timer for write (set timer up as PWM output)
and another timer for read (set timer up for output compare)

I also had to make the SWIM driver work in a multi-tasking system (FreeRTOS) so the implementation is heavily built on the ISR and a state machine within the ISR.
举报

胡红枚

2019-6-26 09:21:59
versaloon网站似乎离线了。目前,围绕SWIM的OpenOCD列表有一些努力。加入讨论。
https://sourceforge.net/p/openocd/mailman/openocd-devel/?viewmonth=201701

以上来自于谷歌翻译


以下为原文




The versaloon website seems offline. At the moment, there is some effort on the OpenOCD list around SWIM. Join the discussion.
https://sourceforge.net/p/openocd/mailman/openocd-devel/?viewmonth=201701
举报

叶亮

2019-6-26 09:37:47
仅供参考:STlink程序员固件加密已被破坏,因此您可以轻松获取固件。如果您熟悉ASM,您可以快速了解它们是如何实现的。

以上来自于谷歌翻译


以下为原文




FYI: the STlink programmers firmware encryption had been broken, so you could easily get the firmwares. If you are familiar with ASM you could quiclky get an overview how they implemented it.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分