ST意法半导体
直播中

刘峰

7年用户 207经验值
私信 关注
[问答]

当STM8S与STPM10连接时SPI通信失败

我正在设计一种能量计产品,我将STM8S微控制器与STPM10电能表IC连接起来。控制器通过SPI通信与IC通信。但是在从STPM10 IC读取时,数据线(来自控制器的MOSI)始终保持高电平状态,而SCL,SCS,SYN线等其他线路工作正常。我检查了所有硬件连接甚至固件。不知道我哪里出错了?需要认真帮助。我已经附加了IC的读取日期波形和我用来连接STPM10和STM8S的威廉希尔官方网站

以上来自于谷歌翻译


以下为原文




I am designing one energy meter product where I have connected my STM8S microcontroller with STPM10 energy meter IC. The controller is communicating with the IC via SPI communication. But while reading from the STPM10 IC, the data line(MOSI from controller) always remain in high state whereas other lines like SCL, SCS, SYN line are working fine. I have checked all the hardware connection and even the firmware. Don't know where i am getting wrong? Need serious help. I have attached the waveform of reading date from IC and the circuit diagram that i am using to interface STPM10 with STM8S

回帖(3)

林立银

2018-12-14 17:07:53
嗨Gopal,
 
 
 我的问题与你类似。我从仪表获得MSIO线恒定HIGH。
 如果你找到了可能的解决方案,请告诉我..
 
 感谢您...

以上来自于谷歌翻译


以下为原文




Hi Gopal,


My problem is similar to you. I am getting MSIO line constant HIGH from the meter.
If you've found out possible solution then let me know..

Thanking you...
举报

李雷

2018-12-14 17:26:51
你是怎么连接设备的?
 
 
我从未使用STPM10,但似乎SPI接口非常奇怪。因为MISO和MOSI只有一条线,SDA引脚; SYN引脚将SDA配置为读或写模式。
当时钟在SCL上时,数据在SDA上同步。
我在我的应用程序中使用SPI,但更为标准,因为总线的工作方式类似于链接移位寄存器,推送MOSI并且寄存器在MISO上移位。

以上来自于谷歌翻译


以下为原文





How did you have connected the device?


I never used the STPM10, but it seems that the SPI interface is quite weird. As there is only one line for MISO and MOSI, the SDA pin; the SYN pin configure the SDA in read or write mode.
When the clock is on SCL the data are synched on SDA.
I use SPI in my application, but is more standard as the bus works like a linked shift register, push on MOSI and the register is shifted on MISO.
举报

刘萍

2018-12-14 17:37:22
嗨Argail,
 
 
你能分享你的SPI配置吗?

以上来自于谷歌翻译


以下为原文





Hi Argail,


Can you share your SPI configuration?
举报

更多回帖

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