On 10.09.2020 13:02, Adrian N wrote:
>   Hi Gediz,
> 
> I followed the wiki, checked out from git repo, installed required deps 
> and built sunxi tools successfully. Then I was able to put the device in 
> FEL mode by keeping the button pressed when plugging the usb.
> This is the output I get from running sudo ./sunxi-fel version
> AWUSBFEX soc=00001623(A10) 00000001 ver=0001 44 08 scratchpad=00007e00 
> 00000000 00000000

That's good news.

> But attempts to read anything from it are failing with time out.
>    sudo ./sunxi-fel read 0x42400000 0x82d0 boot1.header
>    sudo ./sunxi-fel read 0x43000000 0x20000 script.bin
> 
> The exact error message is: usb_bulk_send() ERROR -7: Operation timed out
> 
> What could be the cause of this ?

Memory space for A10 (sun4i) starts from 0x40000000 according to the 
memory map (http://linux-sunxi.org/Memory_map). 0x42400000 and 
0x43000000 are in the range of the general memory space so this is an 
attempt to reach the DRAM. If DRAM memory controller is not initialized 
yet, trying to access to the mentioned addresses may fail. You may 
consider using "sunxi-fel spl" or "sunxi-fel uboot" commands and 
initialize the DRAM first. But you would need an SPL (sunxi-spl.bin) or 
U-Boot (u-boot-sunxi-with) file, produced by U-Boot. Further information 
can be found on the help output of the sunxi-fel tool.


On 10.09.2020 15:09, Adrian N wrote:
> I only noticed now Gediz that you mentioned 'spiflash-read', not 'read'. 
> So I tried again. No luck.
> 
> sudo ./sunxi-fel spiflash-info
> 
> says:
> 
> SPI support not implemented yet for 1623 (A10)!
> 
> So what are the options now?

It's really interesting because as far as I know, SPI flash controller 
of A10, A13 and A20 are too much similar if not completely same and 
apparently A13 and A20 are supported by sunxi-fel. I did not work with 
any board that is powered by A10 before but the first thing I'd do is a 
dirty hack: adding 0x1623 to the list of the supported devices (in here 
https://github.com/linux-sunxi/sunxi-tools/blob/7fe6024211ffed3024b0491ee9f2a19c17848c12/fel-spiflash.c#L154)
 
and see the result. I really have no other idea.

On 10.09.2020 15:36, Adrian N wrote:
> But, maybe the timeout is caused by the device not really having that 
> much memory.
> So I tried with a lower address, sudo ./sunxi-fel read 0x0 0x90000 
> xxxx.bin and it did work

According to the memory map, again, SRAM (on-chip RAM which does not 
require an external init routine) starts from address 0x0 and goes until 
0x0002ffff. But 0x90000 exceeds even after the Bank B of the SRAM so 
0x90000 is probably not a valid address. So "xxxx.bin" is partly the 
contents of the SRAM, and remaining part is most likely zero filled.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/4f74bd30b0744b83b7292d5a9f64d550%40genemek.com.

Reply via email to