(EN) The present invention discloses an SPI controller and a method for operating the SPI controller. The SPI controller comprises: an SPI clock signal generator configured to generate an SPI clock signal;a register set configured to store the SPI working configuration of the SPI controller; a plurality of SPI pins configured to be connected to one or more SPI peripherals; an input and output controller configured to execute data input or output between the SPI controller and the SPI peripheral according to the SPI clock signal and the SPI working configuration; and an SPI state machine configuredto control the working state of the SPI controller, wherein the SPI controller is electrically coupled to a CPU, a DMA controller and a system memory which are located outside the SPI controller through a bus, and the input and output controller is further configured to receive the updated SPI work configuration from the DMA controller and update the updated SPI work configuration into the register set between two consecutive SPI transmissions.
(ZH) 本发明公开了一种SPI控制器和操作SPI控制器的方法,该SPI控制器包括:SPI时钟信号产生器,其配置为产生SPI时钟信号;寄存器组,其配置为保存所述SPI控制器的SPI工作配置;多个SPI引脚,其配置为连接到一个或多个SPI外设;及输入输出控制器,其配置为根据所述SPI时钟信号及所述SPI工作配置,执行所述SPI控制器与所述SPI外设之间的数据输入或输出;SPI状态机,其配置为控制所述SPI控制器的工作状态;其中所述SPI控制器通过总线电耦合到位于所述SPI控制器外部的CPU、DMA控制器及系统内存;及所述输入输出控制器还配置为在连续的两次SPI传输之间,从所述DMA控制器接收更新的SPI工作配置并将所述更新的SPI工作配置更新到所述寄存器组中。