SDRAM Byte/Bit Swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 3:52 AM - last edited on ‎2024-11-18 3:55 AM by mƎALLEm
Is bit/byte swap possible for Stm32h7xx MCUs? I have looked everywhere but cannot obtain any reliable information. Some design videos are made bit swap like Phil's Lab but no evidence about that board's working, just design.
My microcontroller selection is STM32H743XIH6 and sdram selection is IS42S32800J-6BLI. In CubeMX, SDRAM pins look like they're fixed. But in some forums, they said bit or byte swap is allowed. I need some reliable information. Thank you.
- Labels:
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 3:58 AM
Hello @emrestr0 and welcome to the communty,
Could you please elaborate on this "SDRAM Byte/Bit Swap" feature and what do you want to do with it?
And not sure I understood what do you mean by "they are fixed" in CubeMx?
Are you suing a custom board or ST board? if ST board need to tell which one.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 4:24 AM
I am planning to use SDR SDRAM on my custom board. And i am not sure if can swap bits within bank or swap bytes between banks. To get to the point what i meant by "they are fixed", in CubeMX when you press Ctrl + Left Button of mouse, CubeMX shows you alternative pin assignments of your clicked pin. For example PE5 is SPI4_MISO, when i press Ctrl + Left Click of mouse, CubeMX indicate that PE13 is also can be assigned as SPI4_MISO. But for SDRAM, there is no alternative for FMC_D8 or FMC_D7. So that makes me think that, what if it is not possible to swap bits or bytes?
https://pcbartists.com/design/embedded/sdram-bit-byte-swapping-rules/ said "Yes, you can do this with an SDR SDRAM chip." but for what source or datasheet? How can this guy so sure about that?
Or https://www.youtube.com/watch?v=AA_ls_9YdYk there is byte and bit swapping, but no proof that it is working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 4:45 AM
STMicroelectronics has not explicitly documented support for bit/byte swapping in FMC for SDRAM. So it looks like any such design choice falls under the developer's responsibility to validate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 4:50 AM
@emrestr0 wrote:
For example PE5 is SPI4_MISO, when i press Ctrl + Left Click of mouse, CubeMX indicate that PE13 is also can be assigned as SPI4_MISO. But for SDRAM, there is no alternative for FMC_D8 or FMC_D7. So that makes me think that, what if it is not possible to swap bits or bytes?
This is not a question of CubeMx but that depends on the availability of the alternate function on a given IO. This information is given in the datasheet / table 14:
For example The SPI4_MISO is available on two IOs: PE5 and PE13 while FMC_Dx are available only on one I/Os.
According to the swapping function you are looking for (according to the link you shared) it's something linked to the PCB to decrease the vias, which is something you need to do with the layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 5:03 AM
According to the swapping function you are looking for (according to the link you shared) it's something linked to the PCB to decrease the vias, which is something you need to do with the layout.
Exactly, that is what i am wondering. Can i swap bits for that mcu like in FPGAs? If i swap bits within bank0 in the layout for instance, do i need to make changes in software side to indicate that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 5:12 AM
@emrestr0 wrote:
If i swap bits within bank0 in the layout for instance, do i need to make changes in software side to indicate that?
I don't think so..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-18 5:14 AM
So, i can swap bits with peace of mind?
