AnsweredAssumed Answered

U-boot memory values as function param

Question asked by Xavi García on Mar 16, 2020
Latest reply on Mar 18, 2020 by gusarambula

Hi,

 

I'm developing a SPI functionality in the u-boot, I'm able to manage my SPI HW with the "sspi" command:

 

=> sspi 1.0:3 1920 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0808080e0e0e0c0f0f0f0e0f8f8f0f0f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f0f0f0f8e0f0f0f0c0c0e0e0008080c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

 

I'm sending 240 bytes (I patched and removed the 32bytes limit) and it works as expected!

 

My problem is when i'm trying to read these 240 bytes from memory. I'm able to load a file (from the rootfs) with that info in the RAM memory:

 

=> ext4load mmc 0:2 0x90000000 /etc/spi/240bytes
240 bytes read in 391 ms (0 Bytes/s)


With this command I can set those bytes in my RAM memory, address 0x90000000. I can check those bytes with "md" command:

=> md 0x90000000
90000000: 00000000 00000000 00000000 00000000 ................
90000010: 00000000 00000000 00000000 00000000 ................
90000020: 00000000 00000000 00000000 00000000 ................
90000030: 00000000 00000000 00000000 00000000 ................
90000040: 00000000 00000000 00000000 00000000 ................
90000050: 00000000 00000000 00000000 00000000 ................
90000060: c0808080 e0e0e0c0 f0f0f0e0 f8f8f0f0 ................
90000070: f8f8f8f8 f8f8f8f8 f8f8f8f8 f8f8f8f8 ................
90000080: f0f0f0f8 e0f0f0f0 c0c0e0e0 008080c0 ................
90000090: 00000000 00000000 00000000 00000000 ................
900000a0: 00000000 00000000 00000000 00000000 ................
900000b0: 00000000 00000000 00000000 00000000 ................
900000c0: 00000000 00000000 00000000 00000000 ................
900000d0: 00000000 00000000 00000000 00000000 ................
900000e0: 00000000 00000000 00000000 00000000 ................

 

 

How can I use those 240 bytes stored in memory as the last parameter of my sspi command?

 

=> sspi 1.0:3 1920 memoryparam

 

Thanks in advance!

Outcomes