This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS570LS1224:SPI 菊花链

Guru**** 2538960 points
Other Parts Discussed in Thread: HALCOGEN

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1038905/tms570ls1224-spi-daisy-chain

器件型号:TMS570LS1224
主题中讨论的其他器件:HALCOGEN

我尝试使用 CCS 和  HalCoGEN 为菊花链连接的从器件生成 SPI 信号。 它不工作、

如何传输下图中给出的两组数据。  

这适用于以 SPI 菊花链形式连接的三个从器件。 如何启动两个从器件?  

为了实现它、我需要在代码和 HalCoGEN 中修改什么?

ADS7952: Daisy chain of SPI for ADS7952 - Data converters forum - Data  converters - TI E2E support forums

HalCoGEN 配置:

CCS 代码:

#include "sys_common.h"

/*用户代码开始(1)*/
#include "mibspi.h"
/*用户代码结束*/

/**@fn void main (void)
*@应用程序主函数简介
*@请注意、默认情况下、此函数为空。
*
*此函数在启动后调用。
*用户可以使用此函数来实现应用程序。
*

/*用户代码开始(2)*/
/*用户代码结束*/
//uint16 count = 3;
int main (空)

/*用户代码开始(3)*/
uint16_t txBuffer[]={0XB900、0XB900、0XB900、0XB900};
uint16_t txBuffer1[]={0XA900、0XA900、0XA900、0XA900、0XA900};

mibspiInit();/*初始化 SPI */
mibspiEnableGroupNotification (mibspiREG1、0、0);
mibspiEnableGroupNotification (mibspiREG1,1,1,0);

mibspiSetData (mibspiREG1、0、txBuffer);
mibspiSetData (mibspiREG1、1、txBuffer1);

while (1);
/*用户代码结束*/

void mibspiGroupNotification (mibspi_t * mibspi、uint32组)

switch (group){
情况0:
/*启用 TG1以启动、软件触发器*/
mibspiTransfer (mibspiREG1、0);
中断;
案例1:
/*启用 TG1以启动、软件触发器*/
mibspiTransfer (mibspiREG1、1);
中断;

默认值:
while (1);
中断;