Skip to main content
Visitor II
January 22, 2024
Question

I'm having problems with PSRAM

  • January 22, 2024
  • 2 replies
  • 1932 views

当我通过 stm32 的 OSPI 使用 OctalRAM(IS66WVO16M8DBLL) 时,我只能读取 ID rigister 和 CFG rigister,但不能写入 CFG rigister。我希望你能给我一些技术帮助。

我附上了密钥代码。

PSRAM的数据表:

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 22, 2024

    Hello @xiashu and welcome to the Community :),

    Thanks to develop your posts in English so it helps us, and the users of our community understand your question and try to help you.

    When I use OctalRAM (IS66WVO16M8DBLL) via OSPI for stm32, I can only read the ID rigister and CFG rigister, but cannot write to the CFG rigister. The pressure from my supervisor left me breathless. I hope you can give me some technical help.

    I've attached the key code.

    PSRAM datasheet

    Which STM32U5 are you using? 

    If you using STM32U575, please make sure that the DQS is enabled in memory mapped write because if the DQSE control bit of the OCTOSPI_WCCR register is cleared for memories without DQS pin, it results in an error response for every memory-mapped write request. The workaround is when doing memory-mapped writes, set the DQSE bit of the OCTOSPI_WCCR register, even for memories that have no DQS pin. For more information about this errata please take a look to the errata sheet and precisely section 2.6 OCTOSPI 

    For that please enable the DQS mode when configuring the command for the write instruction: 

    sCommand.DQSMode = HAL_OSPI_DQS_ENABLE;

     I hope this help you!

    Kaouthar

    xiashuAuthor
    Visitor II
    January 22, 2024

      Thanks for your help, I have opened the DQS mode, but I have encountered a problem, as shown in the figure, the first two bytes (or some two bytes) cannot be written normally, I think it is because my psram chip is not set to DQS mode, but now my register can only be read but not written. But my register writing code was strictly in accordance with the psram manual, and it was the inability to write to the register that now caused me to accidentally get a two-byte error in memory mapped mode.So basically my question now is, why is my register write code not writing successfully.

    DQS mode is opened:

    xiashu_0-1705911812151.png

    write rigister code and  The timing chart in the manual:

    xiashu_1-1705911905694.png

    xiashu_2-1705911969830.png

     

     

     

    xiashuAuthor
    Visitor II
    January 22, 2024

    The above diagram has an error, using this code, but it still cannot be written properly.

    write rigister code:

    xiashu_0-1705914130278.png

     

    Technical Moderator
    January 23, 2024

    Hi @xiashu ,

    -->the first two bytes (or some two bytes) cannot be written normally

    --> it still cannot be written properly

    What do you mean? Which value is written? 00 or FF?

    Please take a look to OSPI_PSRAM_MemoryMapped example may help you.

    Kaouthar