大家好,欢迎来到IT知识分享网。
寄存器配置
IfxQspi_reg.h文件定义了WSPI各寄存器的起始地址。IfxQspi_regdef.h文件定义寄存器的结构体。各寄存器分配的地址和数据手册中一致。
typedef volatile struct _Ifx_QSPI
{
Ifx_QSPI_CLC CLC; /**< \brief 0, Clock Control Register */
Ifx_QSPI_PISEL PISEL; /**< \brief 4, Port Input Select Register */
Ifx_QSPI_ID ID; /**< \brief 8, Module Identification Register */
unsigned char reserved_C[4]; /**< \brief C, \internal Reserved */
Ifx_QSPI_GLOBALCON GLOBALCON; /**< \brief 10, Global Configuration Register */
Ifx_QSPI_GLOBALCON1 GLOBALCON1; /**< \brief 14, Global Configuration Register 1 */
Ifx_QSPI_BACON BACON; /**< \brief 18, Basic Configuration Register */
unsigned char reserved_1C[4]; /**< \brief 1C, \internal Reserved */
Ifx_QSPI_ECON ECON[8]; /**< \brief 20, Configuration Extension */
Ifx_QSPI_STATUS STATUS; /**< \brief 40, Status Register */
Ifx_QSPI_STATUS1 STATUS1; /**< \brief 44, Status Register 1 */
Ifx_QSPI_SSOC SSOC; /**< \brief 48, Slave Select Output Control Register */
unsigned char reserved_4C[8]; /**< \brief 4C, \internal Reserved */
Ifx_QSPI_FLAGSCLEAR FLAGSCLEAR; /**< \brief 54, Flags Clear Register */
Ifx_QSPI_XXLCON XXLCON; /**< \brief 58, Extra Large Data Configuration Register */
Ifx_QSPI_MIXENTRY MIXENTRY; /**< \brief 5C, MIX_ENTRY Register */
Ifx_QSPI_BACONENTRY BACONENTRY; /**< \brief 60, BACON_ENTRY Register */
Ifx_QSPI_DATAENTRY DATAENTRY[8]; /**< \brief 64, DATA_ENTRY Register */
unsigned char reserved_84[12]; /**< \brief 84, \internal Reserved */
Ifx_QSPI_RXEXIT RXEXIT; /**< \brief 90, RX_EXIT Register */
Ifx_QSPI_RXEXITD RXEXITD; /**< \brief 94, RX_EXIT Debug Register */
unsigned char reserved_98[80]; /**< \brief 98, \internal Reserved */
Ifx_QSPI_OCS OCS; /**< \brief E8, OCDS Control and Status */
Ifx_QSPI_KRSTCLR KRSTCLR; /**< \brief EC, Kernel Reset Status Clear Register */
Ifx_QSPI_KRST1 KRST1; /**< \brief F0, Kernel Reset Register 1 */
Ifx_QSPI_KRST0 KRST0; /**< \brief F4, Kernel Reset Register 0 */
Ifx_QSPI_ACCEN1 ACCEN1; /**< \brief F8, Access Enable Register 1 */
Ifx_QSPI_ACCEN0 ACCEN0; /**< \brief FC, Access Enable Register 0 */
} Ifx_QSPI;
使用typedef可将结构体typedef volatile struct _Ifx_QSPI的名称简化为Ifx_QSPI。
数据手册zhongTable 20-1和Table 20-2给出了QSPI0~QSPI3的起始地址和内部寄存器的偏移地址。.h文件中的地址和此手册中一致。
QSPI0的地址变为0xF0001C00u,寄存器中CLC为4个字节,因此寄存器 PISEL的首地址便宜4.
#define MODULE_QSPI0 /*lint --e(923)*/ ((*(Ifx_QSPI *)0xF0001C00u))
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/10964.html