a随遇而安a 发表于 2018-2-1 15:26:41

stm32F765的FMC使用SRAM问题

使用MCU的FMC外扩SRAM时,对外部SRAM进行读写操作时,写操作无异常,通过寄存器均可按照手册控制。在进行读操作时,开启EXTMOD功能,即使总线周转时间设置为0,两次连续的读操作时间还为150ns。MCU主频为216M,开启了CACHE和MPU。求助各位,能否缩小两次连续读的时间,并未在手册中找到相关寄存器说明。

五哥1 发表于 2018-2-1 18:47:55

这个官方例程拿来改下或者对比着看看

衔胆栖冰 发表于 2018-2-1 20:20:38

看下FMC时钟分频是多少,数据时间和地址保持时间什么的调调看

a随遇而安a 发表于 2018-2-2 10:25:29

FMC是挂在AHB上的,AHB是1分频,数据保持时间和地址保持时间这些参数配置都没什么问题,但是两次连续读的间隔时间调不小。

a随遇而安a 发表于 2018-2-2 13:16:57

五哥1 发表于 2018-2-1 18:47
这个官方例程拿来改下或者对比着看看

官方例程也是一样的效果

dsjsjf 发表于 2018-3-21 11:35:11

typedef struct
{
uint32_t AddressSetupTime;             /*!< Defines the number of HCLK cycles to configure
                                              the duration of the address setup time.
                                              This parameter can be a value between Min_Data = 0 and Max_Data = 15.
                                              @note This parameter is not used with synchronous NOR Flash memories.      */

uint32_t AddressHoldTime;            /*!< Defines the number of HCLK cycles to configure
                                              the duration of the address hold time.
                                              This parameter can be a value between Min_Data = 1 and Max_Data = 15.
                                              @note This parameter is not used with synchronous NOR Flash memories.      */

uint32_t DataSetupTime;                /*!< Defines the number of HCLK cycles to configure
                                              the duration of the data setup time.
                                              This parameter can be a value between Min_Data = 1 and Max_Data = 255.
                                              @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed
                                              NOR Flash memories.                                                      */

uint32_t BusTurnAroundDuration;      /*!< Defines the number of HCLK cycles to configure
                                              the duration of the bus turnaround.
                                              This parameter can be a value between Min_Data = 0 and Max_Data = 15.
                                              @note This parameter is only used for multiplexed NOR Flash memories.      */

uint32_t CLKDivision;                  /*!< Defines the period of CLK clock output signal, expressed in number of
                                              HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.
                                              @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM
                                              accesses.                                                                  */

uint32_t DataLatency;                  /*!< Defines the number of memory clock cycles to issue
                                              to the memory before getting the first data.
                                              The parameter value depends on the memory type as shown below:
                                              - It must be set to 0 in case of a CRAM
                                              - It is don't care in asynchronous NOR, SRAM or ROM accesses
                                              - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories
                                                with synchronous burst mode enable                                       */

uint32_t AccessMode;                   /*!< Specifies the asynchronous access mode.
                                              This parameter can be a value of @ref FSMC_Access_Mode                      */

}FSMC_NORSRAM_TimingTypeDef;

Legolas丶 发表于 2018-11-19 12:20:18

dsjsjf 发表于 2018-3-21 11:35
typedef struct
{
uint32_t AddressSetupTime;             /*!< Defines the number of HCLK cycles to...

这里也没有关于两次读操作的间隔时间的配置啊。我在调试时也发现两次有效读操作之间的间隔都是150ns。不知用DMA是否可以解决。
页: [1]
查看完整版本: stm32F765的FMC使用SRAM问题