FSRW + SD only working on one set of Prop pins => CABLE LENGTH!!
phubner
Posts: 7
Hi Everyone, its been a while!
I'm modding an existing hardware board by adding an SD card. FSRW works great... but ONLY on pin ports 23-24-25-26
The existing board is constrained to available p0-3 and p24-27. I've been prototyping on my Prop Pro Dev board.
Running the fsrw26 sd card test code test.spin, I get expected results using p23-p26 (as set in sysdep.spin) :
but if I change to p0-3 or p24-27 (or any other pin ports ... I've check most others!) in sysdep.spin, I get a fail on the boot block in test.spin PUB mounttests. Same hardware, same SDcard, etc, only the p#s used change.
In this case I am simply changing the pin definition by +1 and moving the wires over by one. All my definitions are correctly maintained (DO, CLK, DI, CS) just relocated. I have gone back and forth, rechecked cabling, code settings many, many times to no avail. I hope there is a solution that I've just blinded myself to... (like is there another place to change the p# definition??)
Thanks in advance for input!
Paul
ps:"I feel like I'm taking crazy pills!" - 'Jacobim Mugatu
I'm modding an existing hardware board by adding an SD card. FSRW works great... but ONLY on pin ports 23-24-25-26
The existing board is constrained to available p0-3 and p24-27. I've been prototyping on my Prop Pro Dev board.
Running the fsrw26 sd card test code test.spin, I get expected results using p23-p26 (as set in sysdep.spin) :
... Clock: 80000000 ClusterSize: 4096 ClusterCount: 62387 Raw write 3968 kB in 2309 ms at 1718 kB/s Raw read 1920 kB in 2188 ms at 877 kB/s fsrw pwrite 992 kB in 2317 ms at 428 kB/s fsrw pread 992 kB in 1137 ms at 872 kB/s FSRW pputc 63 kB in 2112 ms at 29 kB/s FSRW pgetc 63 kB in 1840 ms at 34 kB/s All done!
but if I change to p0-3 or p24-27 (or any other pin ports ... I've check most others!) in sysdep.spin, I get a fail on the boot block in test.spin PUB mounttests. Same hardware, same SDcard, etc, only the p#s used change.
Mount tests first First mount. Succeeded; stopping cog. Second mount. Succeeded. Reading block 0 (should be a boot block) Read finished; checking for boot block signature boot block signature not found Erroneously returned from start! -1234
In this case I am simply changing the pin definition by +1 and moving the wires over by one. All my definitions are correctly maintained (DO, CLK, DI, CS) just relocated. I have gone back and forth, rechecked cabling, code settings many, many times to no avail. I hope there is a solution that I've just blinded myself to... (like is there another place to change the p# definition??)
Thanks in advance for input!
Paul
ps:"I feel like I'm taking crazy pills!" - 'Jacobim Mugatu
Comments
Good suggestion. At this point I'm trying to get the fsrw26 sample/demo code working by only changing the p#s and selecting the safe_spi.spin (as its slow and reliable). It's all stock code from there. I even d/l'd a fresh copy to make sure I didn't make inadvertent changes somewhere. No go.
The key is that the SD cards actually mount on all p#. It just cant read data from the card.
FSRW's test.spin sample code does an explicit call with the safe_spi.spin's PUB start_explicit. I've tried the faster but less robust SPI files with the same result :-(
I had hoped to get the sample code working to then assure myself I had the setup correct, but this gremlin is not letting me advance. I wired this to my project;s board (p24-27) and got the same (bad) results as on my PPDevBoard.
Any other suggestions?
Paul
For example the Keyboard drivers normally use pin 26 and pin 27.
Andy
@Dave - Thanks!! I completely ignored cable length. In fact, I just received and started using a pack of premade 6" jumpers. Replaced with 1" and it is working properly. It's still odd why it worked on one set of pins and not another, but I guess it was a fringe use case.
@Ariba - I was running only the fsrw sample code. thx!
@Kuroneko - I appreciate you running the fsrw test code to confirm my setup.
You guys are the best.
Paul