-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Portenta H7 LITE: SDRAM BUS FAULT / UNALIGNED ACCESS(USAGE FAULT) #74
Comments
@mjs513 I verified your sketch gives the same results on my H7.
No output in the Serial monitor;
If I add printk calls like:
I see...
|
Quick update: I was curious if the IO pins associated with SDRam were updated to the proper Altenate Function mode.
On the Portenta H7: that crashes with this sketh I see:
I know that the SDRam is under the FMC, And for example I know it includes these pins: <style> </style>
Now if I run the same sketch on GIGA I see:
Again same pins used on GIGA for FMC. and if we again look at GPIOF: MODER I am still trying to figure out where in the code, is something called that initializes the SDRAM FMC/SDRam hardware: Wondering if/where there might be an SYS_INIT(...) function that initializes it.
But it looks like it excludes doing anything with the region name starts with SDRAM. Question is, what is different here versus GIGA. Don't know if this is related or not, think probably not, but there are Warning messages for Quadspi, as part of this
But maybe that flash message about not matching? |
resolves: arduino#74 needed to add: CONFIG_MEMC=y to have the SDRAM enabled and as such not fault if you do anything with the SDRAM library. Also enabled CONFIG_DMA=y As not sure if that was needed but is in the GIGA .conf file
Resolved down to needing:
In the Portenta .conf file Pushed it up into the changes in my PR: #71 |
resolves: arduino#74 needed to add: CONFIG_MEMC=y to have the SDRAM enabled and as such not fault if you do anything with the SDRAM library. Also enabled CONFIG_DMA=y As not sure if that was needed but is in the GIGA .conf file Update arduino_portenta_h7_m7.overlay Add dma sections to remove the build warnings
resolves: arduino#74 needed to add: CONFIG_MEMC=y to have the SDRAM enabled and as such not fault if you do anything with the SDRAM library. Also enabled CONFIG_DMA=y As not sure if that was needed but is in the GIGA .conf file Update arduino_portenta_h7_m7.overlay Add dma sections to remove the build warnings
@KurtE - @facchinm
While testing SDRAM on the Portenta H7 Lite found that depending on sketch you will get one of the 2 faults mentioned in the tile depending on the sketch used.
If I run a simple sketch:
you will get the error message:
This also occurs with the portenta H7 example sketch used for Mbed.
If I run the current example that tests memory in current zephy_sdram library you get the usuage fault:
Comparing the config files for the giga and the h7 the only real difference that would apply is:
Note in the prj.conf it is set as:
If I comment it out it in the H7 it fails to rebuild:
In the Portenta H7 SDRAM library it configures the MPU to address unaligned region:
so do not know how to handle this under Zephyr. PS there is more they do to configure the region.
Under zephyr did see the config option to
not sure enabling this will cause other issues
Probably have to address via:
https://docs.zephyrproject.org/apidoc/latest/arm__mpu__v8_8h.html
actually probably
https://docs.zephyrproject.org/apidoc/latest/arm__mpu__v7m_8h.html
or maybe address it through memory regions:
https://docs.zephyrproject.org/latest/services/mem_mgmt/index.html
https://docs.zephyrproject.org/apidoc/latest/group__mm__drv__apis.html
The text was updated successfully, but these errors were encountered: