4412的SPI接口驱动


4412的SPI控制器用两个8,16,32bit移位寄存器来发送和接受数据,全双工full duplex,

Two independent 32-bits wide transmit and receive FIFOs: depth 64 in port 0 and depth 16 in port 1 and 2 

CPU (or DMA) must write data on the register SPI_TX_DATA, to write data in FIFO. Data on the register are
automatically moved to Tx FIFOs. To read data from Rx FIFOs, CPU (or DMA) must access the register 
SPI_RX_DATA and data are automatically sent to the SPI_RX_DATA register. CMU registers can control SPI operating frequency.


SPI has two modes, namely, master and slave mode. In master mode, SPICLK is generated and transmitted to 
external device. XspiCS#, which is the signal to select slave, indicates that the data is valid when XspiCS# is set 
to low level. XspiCS# must be set low before packets are transmitted or received. 

SPI controls the number of packets to be received in master mode. Set SFR (PACKET_CNT_REG) to receive any 
number of packets. SPI stops generating SPICLK if the number of packets is similar to PACKET_CNT_REG.


The size of one packet depends on channel width. (One packet is one byte when you configure channel width as byte, 
and one packet is four bytes when you configure channel width as word.)

 It is mandatory to follow software or hardware reset before reloading this function. (Software reset can clear all registers except special function 
registers, but hardware reset clears all registers.) 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值