ST意法半导体
直播中

单雅丽

8年用户 198经验值
私信 关注
[问答]

如何为STM8L SWIM设置PA0?

如何为SWIM界面设置PA0?输入?输出?摇一摇这一切?

非常基本的Q我想过,但我找不到任何信息'。
有关SWIM的大量愚蠢的“概述”,但很少有用的信息。
德尔(对不起,我已经违背了脾气暴躁的模式,前进了两步,今天又退了一步;))

以上来自于谷歌翻译


以下为原文




How should PA0 be set up for the SWIM interface? Input? Output? Shake it all aboutput?

Pretty fundamental Q I'd have thought, but I can't find any info'.
plenty of fatuous 'Overviews' about SWIM but little useful info.
Del (sorry I've defaulted back to grumpy mode having taken 2 steps forward and one back today ;) )

回帖(1)

王明

2019-1-15 11:01:31
德里克你好。
 
 SWIM引脚在复位阶段配置。
 因此,无需配置它。
 保持其配置不变,您的应用程序将起作用。
 
 如果使用其备用功能,则只需配置PA0。
 例如,STM8L15x将BEEP信号输出到PA0,但您首先要禁用SWIM(清除CFG_GCR中的第0位),启用并配置BEEP模块,最后将PA0配置为输出推/拉。
 
 BR
 
 EtaPhi

以上来自于谷歌翻译


以下为原文





Hello Derek.

The SWIM pin is configured during the reset phase.
Therefore, there is no need to configure it.
Leave its configuration untouched and your application will work.

You only need to configure PA0 if you use one of its alternate function.
For instance, a STM8L15x outputs the BEEP signal to PA0, but you have first to disable SWIM (clear bit 0 in CFG_GCR), enable and configure the BEEP module, and finally configure PA0 as output push/pull.

BR

EtaPhi
举报

更多回帖

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