完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们希望使用L9663 PSI5收发器连接传感器。 STM32 Discovery板用作SPI主站,模式1(CPOL = 0,CPHA = 1)。 SPI时钟速度设置为10MHz。
模块配置是: / * SPI1参数配置* / hspi1.Instance = SPI1; hspi1.Init.Mode = SPI_MODE_MASTER; hspi1.Init.Direction = SPI_DIRECTION_2LINES; hspi1.Init.DataSize = SPI_DATASIZE_8BIT; hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; hspi1.Init.CLKPhase = SPI_PHASE_2EDGE; hspi1.Init.NSS = SPI_NSS_SOFT; hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi1.Init.TIMode = SPI_TIMODE_DISABLE; hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi1.Init.CRCPolynomial = 11; 我们将32位帧发送到数据表中指定格式的设备(帧定义部分,第84-85页)。 但是,IC没有响应任何SPI命令,并且MISO线始终保持高电平。我们通过成功连接MCP2515 SPI CAN控制器,验证了STM32板的SPI模块是否正常工作。即在MISO线上获得SPI响应和活动。 我们还验证了每个SPI事务的时钟周期数是正确的(数据表中指定的32个时钟周期,第87页)。 收发器提供了文档(第15页)中描述的配置之一,具有以下值(均在操作范围内): VB = 12V - 在引脚和GND之间包含一个75nF电容 VDD = 5V - 在引脚和GND之间包含一个75nF电容 VASSUP = 0V(电荷泵关闭) VAS = 7.6V(使用外部稳压) 在VINTD和DGND引脚上包含一个75nF电容。 由于我们使用裸露焊盘TQFP32封装,焊盘焊接到GND平面。根据数据表(第11页)的规定,所有接地都保持电气短路。 TM引脚也连接到GND。 我们还通过测量VINTD引脚上的输出电压确认设备已打开,该设备启用时为3.3V,上电时消耗约19mA。 有人可以说明为什么设备没有在MISO线上回传? 以上来自于谷歌翻译 以下为原文 We want to use the L9663 PSI5 Transceiver to interface a sensor. A STM32 Discovery board is being used as the SPI master, in mode 1 (CPOL = 0, CPHA = 1). The SPI clock speed is set to 10MHz. The module configuration is: /* SPI1 parameter configuration*/ hspi1.Instance = SPI1; hspi1.Init.Mode = SPI_MODE_MASTER; hspi1.Init.Direction = SPI_DIRECTION_2LINES; hspi1.Init.DataSize = SPI_DATASIZE_8BIT; hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; hspi1.Init.CLKPhase = SPI_PHASE_2EDGE; hspi1.Init.NSS = SPI_NSS_SOFT; hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi1.Init.TIMode = SPI_TIMODE_DISABLE; hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi1.Init.CRCPolynomial = 11; We are sending 32 bit frames to the device formatted as specified on the datasheet (Frame definition section, pages 84-85) . However, the IC is not responding to any SPI commands, and the MISO line stays always high. We have verified that the SPI module of the STM32 board functions properly, by interfacing a MCP2515 SPI CAN controller successfully. i.e. getting an SPI response and activity on the MISO line. We have also verified that the number of clock cycles for each SPI transaction is correct (32 clock cycles as specified on the datasheet, page 87). The transceiver has been supplied with one of the configurations described in the documentation (page 15), with the following values (all within the operational range): VB = 12V - Including a 75nF capacitor between the pin and GND VDD = 5V - Including a 75nF capacitor between the pin and GND VASSUP = 0V (Charge pump off) VAS = 7.6V (Using an external regulated voltage) Included a 75nF capacitor across the pins VINTD and DGND. Since we are using the exposed pad TQFP32 package, the pad is soldered to a GND plane. All the grounds have been kept electrically shorted, as specified on the datasheet (page 11). The TM pin is also connected to GND. We have also confirmed that the device is switched on, by measuring the output voltage on the VINTD pin, which is 3.3V when the device is enabled, consuming around 19mA when powered up. Could someone please describe why the device is not communicating back on the MISO line? |
|
相关推荐
3个回答
|
|
@ST社区(ST员工)请移至适当的论坛并标记员工敬业度。
以上来自于谷歌翻译 以下为原文 @ST Community (ST Employee) Please move to an appropriate forum and flag for staff engagement. |
|
|
|
你好,
报告的MISO行为可能是由于L9663的上电序列不完整;请确保遵循DS(Doc ID028693 Rev 3,Mar 17)的图6(由于不同的VAS配置,必要的更改的一部分)。您还可以查看第2.1和2.6段。 问候, 帕斯夸莱 以上来自于谷歌翻译 以下为原文 Hello, the reported behavior on MISO could be due to incomplete power up sequence of L9663; please ensure Figure 6 of DS (Doc ID028693 Rev 3, Mar 17) is followed (a part from the necessary change because of different VAS configuration). You may have a look also to paragraph 2.1 and 2.6 . Regards, Pasquale |
|
|
|
感谢@Clive Two.Zero(社区会员)引导关注这篇文章。
谢谢@Pasquale D'Argenio(ST员工)的回答。我们按照图6中的说明跟踪了上电序列,现在我们在MISO线上有一些活动。 但是,我们按照数据表(第85页)的下图所示发送帧,但MISO响应始终是错误的SPI操作。 见附图27。 例如,如果我们想将0x0443写入地址为0x02的寄存器CHCNT,我们将发送帧: 0x02 0x80 0x88 0x68(根据格式规则)。 您能否澄清一下这种帧格式是否正确,或者我们应遵循哪种格式才能成功写入设备的寄存器? 我们非常感谢您的帮助。 以上来自于谷歌翻译 以下为原文 Thank you @Clive Two.Zero (Community Member) for directing attention to this post. Thank you @Pasquale D'Argenio (ST Employee) for your answer. We have followed the power up sequence, as specified on figure 6, and now we have some activity on the MISO line. However, we are sending frames as specified on the following figure of the datasheet (page 85), but the MISO response is always of incorrect SPI operation. See figure 27 attached. As an example, if we wanted to write 0x0443 to the register CHCNT with address 0x02, we are sending the frame: 0x02 0x80 0x88 0x68 (as per formatting rules). Could you please clarify if this frame formatting is correct, or which format should we follow in order to write the device's registers successfully? We very much appreciate your help. |
|
1 条评论
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2635 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3610 浏览 6 评论
5988 浏览 21 评论
939浏览 4评论
1316浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
584浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1303浏览 3评论
1359浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 05:17 , Processed in 1.031298 second(s), Total 56, Slave 50 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号