- 1、本文档共26页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
修改记录
Update Records
版次
Rev.No. 修改摘要
Update Summary 生效日期
Effective Date 编制
Prepared By 签名
Signature
FPGA功能介绍
S-DAQ-CM32系统中FPGA的主要功能是控制ADS1278,并将采集的数据封装成512字节的数据包,存储于SRAM中。另外还需要相应Cortex-M3发送的控制命令,以及采样数据读取命令。
详见下图:
如上图所示,FPGA内部如要完成下属功能:
SPI Slave Management:Spi_slave_Mgnt
Clock Management : Clock_Mgnt
Buffer Management : Buf_Mgnt
ADC Management : ADC_Mgnt
1 Sram_dout 与 Sram_din两个箭头方向换了一下,方便程序阅读;
2 SPI_slave_Mgnt与Clock_Mgnt之间增加datarate_choose[2:1],方向从SPI_Slave_Mgnt到Clock_Mgnt。
FPGA功能实现
SPI Slave Management
Cortex-M3设置为SPI Master模式,FPGA实现SPI Slave的功能
可以完成寄存器、SRAM的访问
SPI Slave
可以完成寄存器、SRAM的访问
Registers:64*16Bits
SRAM:1024K-Byte——2K Page*512 Byte Per Page
四线模式:/SEL,SCLK,SI,SO
时序:
The SPI Slave Device is accessed via the SI pin, with data being clocked in the rising edge of the SCLK. The /SEL pin must be low for the entire operation.
Table 1-1 contains a list of possible instruction bytes and format for device operation. All instructions, addresses and data are transferred MSB first, LSB last.
Table 1-1
7 6 5 4 3 2 1 0 Access Mode Access Type 1 0 Register Address[5..0] Access Register Read Access 1 1 Write Access 0 1 0 0 A19 A18 A17 A16 SRAM Byte Operation Read Access 0 1 0 1 A19 A18 A17 A16 Write Access 0 0 1 0 A19 A18 A17 A16 SRAM PAGE Operation Read Access 0 0 1 1 A19 A18 A17 A16 Write Access 0 0 0 0 A19 A18 A17 A16 SRAM Sequential Operation Read Access 0 0 0 1 A19 A18 A17 A16 Write Access Note: A19=0,Ping Sram Access ;A19 =1 , Pong Sram Access
Modes of Register Operation
There are 64 16-Bits General purpose registers which can be read/written via the spi interface and one read-only Byte registerSPIS_ST (SPI Slave Status)
Table 2-1
Name ADDR Width Description SPIS_ST N 8 SPI Slave Status REG0 0x00 16 命令类型 datarate_choose[4:2]mode[1] sStart[0] REG1 0x01 16 设备序列号 REG2 0x02 16 同步 REG3 0x03 16 REG4 0x04 16 第五通道的采样速率 REG5 0x05 16 第六通道的采样速率
文档评论(0)