2022-05-09 02:06 AM
Hi community,
I'm facing problems to upload the flash layout on a custom board with the STM32CubeProgrammer. I tried with the last version (v2.10.0) but also older ones. The USB communication seems to be working fine as there are not checksum errors or alike. However, for some reason UBoot can still not parse the uploaded layout.
Any idea how this problem can happen even if the USB communication is correct? Could this be a RAM misconfiguration problem even if UBoot can run from RAM and the basic UBoot RAM tests are successful?
For more information, I attach the STM32CubeProgrammer log and the UART4 log.
Thank you in advance for any insight!
Bests,
Moises
2022-05-10 05:15 AM
Hi @Moises Araya ,
probably unwanted characters or missing 'tab' in your TSV file.
Please check https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#FlashLayout_file_format
Regards
2022-05-11 06:48 AM
Hi @PatrickF ,
thanks for helping! I read the article you mentioned and did some more tests to figure out what is going on with the TSV file. There are some insights pointing out that the TSV file is actually fine:
Is there a way I can debug this from UBoot or TF-A? Could it be that TF-A and UBoot don't agree on the RAM address of the transferred TSV because a wrong device tree configuration?
Thanks in advance!
Bests,
Moises
2022-05-11 07:51 AM
Hi,
seems there is some inconsistencies in your setup:
Please try to solve all those issues
If possible switch to Ecosystem v3.1 and use FIP.
Regards.
2022-05-11 10:23 AM
Hi @PatrickF ,
Thanks for your answer. Here some more info from my side on your comments:
The weird part is that I have another prototype running with the same processor but the TFBGA361 package. Both Yocto machine configurations use the same UBoot/TF-A/Kernel defconfigs and boot scheme. What changes is basically the pining and RAM (16-bit LPDDR2 on the TFBGA257 and 32-bit LPDDR2 on the TFBGA361) which is done in the DTs.
I attach the new boot logs as they change intermittently. Some times the Layout error doesn't get propagated to the CubeProgrammer which instead shows "Error: an error occured while uploading data from the virtual partition 0xF1".
Bests,
Moises
2022-05-12 12:44 AM
Hi,
As this has changed from your other project, maybe double check your DDR settings and PCB connections, there might be some issue in size definition (which might create physical memory overlaps or else, very hard to debug due to cache).
Check also your timing settings are correct (Using u-Boot SPL and CubeMx DDR Tools).
Regards.
2022-05-12 06:48 AM
Hi @PatrickF ,
I do have some unexpected behaviour with the DDR Tuning tool as follows:
I'm using the Winbond W97AH6NB / W97AH2NB RAM. The CubeMx RAM configuration looks like this:
My current questions:
Regarding the relation with the DUF problem: it can be that the RAM is still not fully functional when the TF-A starts writing the layout on it with the programmer, and for this reason it gets corrupted.
Bests,
Moises
2022-05-12 08:46 AM
Hi,
I suspect also an issue with the LPDDR2. Not expert enough to comment your values.
Please confirm you have a 100 ohms resistor between DDR_CLKP and CLKN (close to LPDDR pins). We recently discover that this info is missing in AN5031, but present in AN5122 and routing examples.
Btw, please double check the tf-a-serialboot.stm32 you are using is really using the same parameters you have in tf-a-trusted.stm32 (as you mention that you boot up Linux, so likely using this latest one).
As it seems you are using 800MHz without STPMIC1, please confirm your VDDCORE is set at 1.35V before going above 650MHz.
I see you are using Ecosystem V3.0, I encourage you to move to latest Ecosystem v3.1 which has (beside other updates) one specific update for LPDDR (not sure it is linked to your issues)
Regards.
2022-05-20 08:45 AM
Hi @PatrickF ,
We have tried a couple of things you suggested and I would like to update about the partial results:
Everything points out to RAM layout problems. So If you don't see anything suspicious line in the attached log, I think we need to correct the layout to discard any hardware problem before continuing debugging the software.
Thanks a lot for your support and hints.
Bests,
Moises
2022-05-22 11:39 PM
Hi,
before going to a new PCB, I think it would be worth to check DDR setup and timing with DDR Tools.
Please have a look to https://community.st.com/s/article/FAQ-STM32MP1-Bring-up-procedure and https://community.st.com/s/article/FAQ-STM32MP1-how-to-validate-the-STM32MP1-DRAM-connection-on-PCB-DDR-test-suite
Don't know about your application, but notice that running full time VDDCORE=1.37V have impact on estimated lifetime. See AN5438 for details.
Regards.