<clever>
that would be the 125khz command the rom repeats during a failed boot
<clever>
and with some more probing, ive confirmed that the other controller (sdhost) seems to run from PLLC_CORE0 or VPU, it was clocked at 250mhz in my test case
<clever>
and the source assumed a 41mhz input clock, so it setup the divisors wrong for the initial 125khz mode
<clever>
but even at 125khz, i just get a timeout error, and cant read the card in the sniffer
any1 has quit [Ping timeout: 255 seconds]
any1 has joined ##raspberrypi-internals
jcea has quit [Ping timeout: 268 seconds]
wael has quit [Ping timeout: 264 seconds]
wael has joined ##raspberrypi-internals
ungeskriptet has joined ##raspberrypi-internals
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
user_user has quit [Read error: Connection reset by peer]
<user_user>
So, clever, as I wanted to test for EMMC clock divider in the Control register - putting 2 to divisor, which according to datasheet means divide EMMC base clock by 4 - does not work, because the very next command to SDcard comes with error intterupt (CRC error)
<user_user>
No, actually divisor value 2 is ok, it was just a bug
<clever>
user_user: i did some of my own tests on the sdhost controller, and confirmed that its clocked at 250mhz, and my "safe" divisor gave 700khz, not 125khz!
<clever>
but i cant get my sd card to identify with the sniffer in place, and only with my own driver
<clever>
its weird
<user_user>
Yes, I've read, but I did not understand)
<clever>
i used one of these to connect a full size SD card to my pi1
<clever>
and then i hooked my scope up to CLK and CMD
<user_user>
So, I've found a huge bug in my code. I used control1 = read_reg32(EMMC_CONTROL1); control1 |= div << 8 code. Without clearing previous value
<clever>
ah yeah, that will cause issues
<clever>
many
<user_user>
and then after I've started clearing it I had all kinds of problems when trying to access SD card - it has turned out I had a value 0x40 and then added 2 or 4 to that.
<clever>
the clock divisor is in bits 8-15
<user_user>
so my sd card worked on value 0x42
<clever>
ah but you have the <<8, thats good
<user_user>
yes, I was doing OR to previous 0x40
<clever>
yeah, you need to do the usual &0xffff00ff dance