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.

TMS320F28375S: 通过C2000的库函数去读取GPIO口时间比直接通过寄存器读取时间长了许多

Part Number: TMS320F28375S
Other Parts Discussed in Thread: C2000WARE

通过C2000的库函数去读取GPIO口时间比直接通过寄存器读取时间长了许多。

如通过 GpioDataRegs.GPADAT.bit.GPIO0 这样直接读取寄存器需要的时钟周期比通过库函数 GPIO_readPin(0) 少了许多。

GPIO_readPin(0)这样的方式在200M的主频下需要100个时钟周期左右,而直接从寄存器中读取需要的时钟周期只有这个的十几分之一。

我想问一下,是否有什么方式在使用库函数开发的前提下,去使用寄存器的方式读取GPIO。