m-labs / misoc

The original high performance and small footprint system-on-chip based on Migen™
https://m-labs.hk
Other
305 stars 85 forks source link

spiflash.c wait_for_device_ready never returns on KC705 #11

Closed sbourdeauducq closed 9 years ago

sbourdeauducq commented 9 years ago

This makes most flash functions unusable.

fallen commented 9 years ago

If you print the status register value (sr) from within the while loop in wait_for_device_ready, what value is it?

sbourdeauducq commented 9 years ago

0xff

fallen commented 9 years ago

Could you try changing this line https://github.com/m-labs/misoc/blob/master/misoclib/mem/flash/spiflash.py#L88 to read self.miso.status.eq(dq.i[1]) instead of self.miso.status.eq(dq.i[-1]) ?

I think the issue is my code didn't handle well the case where the dq pad is of width > 2, and on kc705 the dq length is 4.

sbourdeauducq commented 9 years ago

Works.