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:将 spi5 CS[1]配置为 GIO (输出)

Guru**** 2482105 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/887420/tms570lc4357-configuring-spi5-cs-1-as-gio-output

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

大家好、我正在尝试将 spi5 CS[1]配置为 GIO (输出)、并按原样使用其他 SPI 功能。

Halcogen 的配置如图所示。

我只是在主代码中使用以下代码部分来设置 GIO 引脚。

gioInit();
spiInit();

gioSetDirection (spiPORT5、0x40);
gioSetBit (spiPORT5、14、1);

gioSetBit (spiPORT5、14、0);

我在引脚上看不到任何变化。

请帮助我解决问题。 示例代码可帮助您访问 lot.e2e.ti.com/.../3678.SPI_5F00_GPIO.zip

Chandra

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

    您好 Chandra、

    CS1是寄存器(PC1、PC2、PC3)的位1。  

    要设置 CS1方向:gioSetDirection (spiPORT5、0x02)

    要设置 CS1位:  gioSetBit (spiPORT5、1、1);

    要清除该位:  gioSetBit (spiPORT5、1、0);

    在 HALCoGen "Driver Enable"面板下、请选中"Enable SPI5 Driver"