简体   繁体   English

FMC 比 STM32H7 上的 QSPI 慢?

[英]FMC slower than QSPI on STM32H7?

I'm working on STM32H753, for now on the STM32H753I-EVAL2 board.我正在研究 STM32H753,目前在 STM32H753I-EVAL2 板上。 I am evaluating the external memories capabilities, in particular FMC SRAM and QSPI Flash.我正在评估外部存储器功能,特别是 FMC SRAM 和 QSPI Flash。

I used projects from STMicro (from STM32CubeH7) and measured the duration of reading 1KB of data respectively from QSPI Flash and from FMC SRAM.我使用了 STMicro(来自 STM32CubeH7)的项目,并测量了分别从 QSPI Flash 和 FMC SRAM 读取 1KB 数据的持续时间。 In both cases, if I understood correctly, the different clocks are configured at their maximum speed (without boost, ie. CPU clock at 400MHz and so on).在这两种情况下,如果我理解正确的话,不同的时钟都以其最大速度配置(没有提升,即 CPU 时钟为 400MHz 等等)。

I was surprised to notice that, with both D-cache and I-cache enabled, reading 1KB from QSPI Flash is almost twice faster than from FMC SRAM.我惊讶地注意到,在启用 D-cache 和 I-cache 的情况下,从 QSPI Flash 读取 1KB 的速度几乎是从 FMC SRAM 读取的两倍。 I was expecting the contrary since FMC is a parallel bus.我期待相反,因为 FMC 是并行总线。

It's the first time I'm using a FMC memory.这是我第一次使用 FMC 内存。

Do you have any idea of how FMC and QSPI compare on a STM32 ?您知道 FMC 和 QSPI 在 STM32 上的比较吗?

Although being named the same, STM32 peripherials behaves differentely from family to family.尽管名称相同,但 STM32 外设的行为因家庭而异。 So your question is actually family-dependent.所以你的问题实际上取决于家庭。 I'll elaborate about your H7 part, but YMMV.我会详细说明你的 H7 部分,但 YMMV。

QSPI is actually a parallel interface as well, as it transfers data thru 4 wires simultaneously. QSPI 实际上也是一个并行接口,因为它同时通过 4 条线传输数据。 And more than than, QSPI is synchronous, and quite fast (up to 133 MHz for certain voltage ranges) That's about 533 Mbit/s instant speed.不仅如此,QSPI 是同步的,而且速度非常快(对于某些电压范围高达 133 MHz),即大约 533 Mbit/s 的即时速度。

FMC, on the other hand, is no so fast.另一方面,FMC 没有那么快。 Max clock is 100 MHz, and it takes a few clocks to start a transfer, even if it's burst.最大时钟为 100 MHz,即使是突发传输,也需要几个时钟才能开始传输。 More than that, it works in async mode as well, and it takes 5-8 clocks for a single transfer there.更重要的是,它也可以在异步模式下工作,在那里进行一次传输需要 5-8 个时钟。 If your SRAM is connected to the FMC in the async mode, it would be no faster than around 15 megatransfers per second, which is 240 Mbit/s instant speed for a 16-bit part.如果您的 SRAM 以异步模式连接到 FMC,它的速度不会超过每秒 15 兆次传输,对于 16 位部件来说,这是 240 Mbit/s 的即时速度。

Most SRAM parts can do better than that, but it would reqire some FMC setting up/tweaking and maybe some glue logic to start it in the sync/burst mode.大多数 SRAM 部件可以做得比这更好,但它需要一些 FMC 设置/调整,也许需要一些胶合逻辑才能在同步/突发模式下启动它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM