2025-09-15 9:34 AM
Hi ST,
I'm working with the STM32MP257FAI3 Processor and have some concerns regarding DQ bit swapping between the SoC's DQ lines and the DDR4 RAM DQ lines.
I'm already aware of the guidelines document mentioned in this solution.
From my understanding of the document,
Can anyone validate my understanding?
Thank you in advance.
2025-09-15 9:59 AM
Hi,
your understanding is right, on DDR4 you could freely swap bits within a byte (i.e. belonging to same DQS and DQM signals). You could also swap bytes (warning than a 16-bit platform should always use byte0 and byte1).
There is no 'contro/status register' inside DDR4 accessible thru Data lanes, so there is no configuration needed at all (even during training) as the memory is providing the read bit value on a same line when written (this sound obvious). Bit numbering on memory side is just matter of putting some names on them. Some control settings inside DDR4 are using address lines as data (please refer to JEDEC).
This is not same for LPDDR4 where some memory control/status register could be read/written thru data bytes, so you should inform the controller of the swapping you have done.
You could also refer to AN5489.
Regards.