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.

[参考译文] TMS570LC4357:我想使用 mibspi1 cs0作为手动控制、您是否可以建议执行此类操作?

Guru**** 2459220 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/1210193/tms570lc4357-i-want-use-mibspi1-cs0-as-a-manual-control-may-you-please-suggest-for-this-quetions

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

gioSetDirection (spiPORT1、0xFFFFFFFF);
gioSetBit (spiPORT1、1、0);
spiTransmitData (spiREG1、&dataconfig1_t、2、TX_Data_Master1);
gioSetBit (spiPORT1、1、1);

这是否正确,当使用此代码时,芯片选择不工作。

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

    尊敬的 Srinivasa:

    如果您要操作 CS0、则应使用如下所示的 SET 指令

    GioSetBit (spiPORT1、0、0);//SPI1_CS0设为0

    但您正在使用"gioSetBit (spiPORT1、1、0);"、此器件将运行 SPI1 CS1而不是 CS0。

    只需执行以下步骤即可正常运行。

    1.首先在 HALCoGen 中将 CS0配置为 GIO。 并将方向配置为输出以及 DOUT 的初始值。

    2.完成上述配置后,只需在主函数中使用以下代码。

    我附加了代码供您参考、请查看。

    --

    谢谢。此致、
    Jagadish。