你好
有点 - 我正在努力。
不,我无法分享。这是我正在开发的商业开发,因此我无法泄露任何源代码,抱歉。
但是我可以给你提示如何去做。
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.
你好
有点 - 我正在努力。
不,我无法分享。这是我正在开发的商业开发,因此我无法泄露任何源代码,抱歉。
但是我可以给你提示如何去做。
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.
举报