smartsheep 你好,
你要用EMI_BCRx寄存器配置数据的长度 :
EMI_BCRx:Bits 5:4 MW[1:0]: Memory width These bits are written by software to define the memory width of the bank. The bits must be set to match the EMI data bus width configuration. 00: 8-bit 01: 16-bit 10: Reserved 11: Reserved
你可以用CAPS看一看怎么配置STR9的外部总线。 在ST网站可以找得到CAPS软件,还有一个application note :
AN2361 Interfacing with the STR91x software library using Configuration and Programming Software (CAPS)
还有: 你用8位复用或者你用16位复用外部总线的地址信号不一样: 8位的话,你在0x0042写一个字节,EMI总线上的地址是0x0042 16位的话,你在0x0042写一个"half word", EMI总线上的地址是0x0021
When configured as a 16-bit data bus, the address output on the EMI bus is shifted by 1 so as to address 16-bit memory devices. For example, writing a half word to location 0x0042 will generate an EMI address of 0x0021
Best Regards, Stephane
|