简体   繁体   English

STM32F4-可能配置外部SRAM

[英]STM32F4 - Configurate extern SRAM probably

I have got an external SRAM on my STM32F43XX and I am able to use it. 我的STM32F43XX上有一个外部SRAM,并且可以使用它。 I can access the memory regions and test them (memtest). 我可以访问内存区域并对其进行测试(memtest)。

However, I do not know if my FMC configurations are correct. 但是,我不知道我的FMC配置是否正确。 It is hard for me to understand the relation between the datasheet of my SRAM and the STM32F4 FMC interface. 我很难理解SRAM的数据表与STM32F4 FMC接口之间的关系。

I use the STM32F4XX reference manual with the SRAM CY7C1051DV33 . 我将STM32F4XX参考手册SRAM CY7C1051DV33一起使用

Lets start with the timing (Reference page 1591, Table 256 | SRAM Datasheet Page 6): 让我们从时序开始(参考1591页,表256 | SRAM数据表第6页):

  • Address Setup <------- Address Setup to Write End? 地址设置<-------要写入结束的地址设置?
  • Address Hold <------- Data Hold from Address Change? 地址保留<-------地址更改后的数据保留?
  • Data Setup <------- Data Setup to Write End? 数据设置<-------数据设置写入结束?
  • Bus Turn <-------- ? 公交转弯<--------?
  • Clock divide ratio <-------- ? 时钟分频比<--------?
  • Data latency <----------- ? 数据延迟<-----------?
  • AccessMode <------------- ? AccessMode <-------------?

The frequency? 频率? of the SRAM is defined by my HCLK divided by the clock divide ratio? SRAM的大小由我的HCLK除以时钟分频比来定义? So if my HCLK is 100 MHz and the clock divide is 2 I get 50 Mhz (20 ns). 因此,如果我的HCLK为100 MHz,时钟分频为2,则得到50 Mhz(20 ns)。 So my STM32F4 latency is always bigger than the latency of the SRAM (max 10 ns). 因此,我的STM32F4延迟总是大于SRAM的延迟(最大10 ns)。 So ever where the lowest allowed value would be okay? 那么,最低允许值会​​在哪里呢?

Thank you in advance for your help! 预先感谢您的帮助!

My NORRAM INIT looks by the way like this: 我的NORRAM INIT看起来像这样:

init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE;
init.MemoryType = FMC_MEMORY_TYPE_SRAM;
init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16;
init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE;
init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW;
init.WrapMode = FMC_WRAP_MODE_DISABLE;
init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS;
init.WriteOperation = FMC_WRITE_OPERATION_ENABLE;
init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE;
init.ExtendedMode = FMC_EXTENDED_MODE_DISABLE;
init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE;
init.WriteBurst = FMC_WRITE_BURST_DISABLE;
init.ContinuousClock = FMC_CONTINUOUS_CLOCK_SYNC_ASYNC;

address setup is on the address bus. 地址设置在地址总线上。 how much time before the clock does the ram show that the address has settled (no longer changes) and/or from the prior clock. 内存在时钟之前多长时间显示地址已经建立(不再更改)和/或从前一个时钟开始。 hold is how long after the clock does it stay stable. hold是时钟保持多长时间后保持稳定。

data setup is how long before the clock is the data stable. 数据设置是时钟稳定数据的时间。

the ram and the microcontroller datasheets should have timing diagrams. ram和微控制器数据手册应具有时序图。 for the clock speed you have chosen, do you meet timing and/or do you have to set some parameters to meet timing. 对于您选择的时钟速度,您是否满足时序要求和/或必须设置一些参数以满足时序要求。

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

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