2024-01-21 10:34 PM - edited 2024-08-29 12:09 AM
当我通过 stm32 的 OSPI 使用 OctalRAM(IS66WVO16M8DBLL) 时,我只能读取 ID rigister 和 CFG rigister,但不能写入 CFG rigister。我希望你能给我一些技术帮助。
我附上了密钥代码。
PSRAM的数据表:
2024-01-22 12:12 AM - edited 2024-01-22 12:13 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-22 12:28 AM
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:
write rigister code and The timing chart in the manual:
2024-01-22 01:03 AM
The above diagram has an error, using this code, but it still cannot be written properly.
write rigister code:
2024-01-23 05:30 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.