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.

TMS320C6678: SPI接口程序运行出现跑飞或上电失败的问题

Part Number: TMS320C6678

使用定时器控制C6678的SPI接口以9.6k的速率发送数据,约每104us发送一个16bit的数据,同时接收一个16bit数据。接收数据后,会对数据做一些处理,并生成下一个要发送的数据,DSP主频配置为1G,处理时间肯定没有超过104us 。但是只有在SPI速率配置为60M以上时,程序才能正常运行,小于60M运行时就会出现如下图所示的问题:

或者程序加载运行后,又显示如下错误:

这是什么原因呢,怎样才能使spi的时钟速率降低呢,SPI的相关配置如下

SPI_Data_Format SPIDataFormat =
{
    .delayBetweenTrans_ns = 0,//两次传输之间的延迟
    /*.ShifDirection        = */SPI_MSB_SHIFT_FIRST,
    /*.disable_CS_timing    = */1,
    /*.clockPolarity        = */SPI_CLOCK_LOW_INACTIVE,
    /*.clockPhase           = */0,
  // /*.clockSpeedKHz        = */66000,
     /*.clockSpeedKHz        = */33000,
    /*.wordLength           = */16
};
SPI_Transfer_Param SPITransferParam =
{
	SPI_CS_0,     /*Chip select number*/
    1,  /*select one of the 4 SPI formats*/
    SPI_CS_NO_HOLD, /*hold CS between multiple words*/
    FALSE,  /*Enable the delay counter at the end of the current transaction*/
//    TRUE,
    2   /*number of bytes per SPI word*/
};