I seem to have failing results on all my cards. I'm probably just doing something wrong.
I finally got it working with on my 4gb SanDisk uSDHC -4
-edit-
This is tested working on all my cards-
*ADATA 16g uSDHC -10*
*SANDISK 4gb uSDHC -4*
*RiDATA uSD 2gb*
I'm not sure if my failing results are significant or not. I thought I'd post them here, just in case they're helpful. I'll check the rest of my cards and edit this post with results.
The 2GB card is probably failing due to FAT16 format.
There is a problem with error handling once a problem is found. I am working on this. I have a more detailed debug that I’ll post when i get home.
I am also trying to find how exFAT locates the DIR table and how that defines the start sector and length of the file.
I would think that if you were trying to make it work in any way with exFAT then this would not be practical for a P2 system since WE would still need to be able to write to files as well as reading. This is why I have FAT32 FORMAT utilities for this purpose. I also happened to fix a few of my cards that had bad boot blocks, I simply issued the !MBR part that is used in FORMAT and rescued all my data! I see if I can test this all out tomorrow when I pick up some 64gb Kingston microSD cards from MSY for $14 and I'm tempted to try the Sandisk Ultra 200GB ones they sell for $58.
They are way toooo small. Why not try the 2TB ones on eBay. I'm sure you can find them for ~$10
exFAT: I was interested to see if I could just find a file and load it (only if I have space/time). But I agree FAT32 is the important one. Probably be ~10 years until we can get cheapish 2TB uSD.
I'm having trouble running this. If I run the booter spin file via spin2ide, having the boot file already on the SD card, I can only see blank spaces filling the upper half of the terminal window. PNut doesn't load any terminal after compiling. How can I see those results? Is there any switch configuration to be used?
Use pnut to compile and download the file to the P2-EVAL board. The quickly open PST (parallax serial terminal) to see the results. Dont forget the switch setting as described a few posts back.
I dont use spin2 as i use proptool to edit and it doesnt color etc if its a spin2 extension.
I'm having trouble running this. If I run the booter spin file via spin2ide, having the boot file already on the SD card, I can only see blank spaces filling the upper half of the terminal window. PNut doesn't load any terminal after compiling. How can I see those results? Is there any switch configuration to be used?
Kind regards, Samuel Lourenço
fastspin (the compiler for spin2gui) and PNut produce the same binary for ROM_Booter_v32i_SD-002f.spin, so I'm not sure why there'd be a problem running. Maybe the baud rate or clock rate isn't matching up? It looks like the test program outputs at 115200 baud, so in spin2gui you'll have to change the loadp2 command line (under the Commands > Configure Commands menu setting) to use 115200 baud instead of 230400 baud.
If in doubt about what the P2 is seeing and if there are any problems on the SD card then just escape into TAQOZ the high-level debugger either from reset with [>] [SPACE] [ESC] or ESC <ENTER> from the LMM low-level debugger.
Then at the TAQOZ prompt type MOUNT<cr> then DIR<cr>.
After this you can optionally check the FAT32 boot sector with a one-liner
(this actually fetches the partition starting sector in the MBR and then opens the Volume Boot Record as a file which is partly dumped from 0 offset for $80 bytes)
0 FOPEN $1C6 SD@ FOPEN 0 $80 SD DUMP
You can also issue SD commands and examine the results interactively. TAQOZ is the hardware debugging tool built into the ROM. If you want to avoid unnecessary pain just use it. Otherwise do it the slow painful way instead.
Here's results 3 cards I've just tested.
Sandisk Ultra 16GB - Windows 7 reports as SDHC FAT32
Team 128GB - Windows 7 reports as SDXC exFAT
Samsung 64GB - Windows 7 reports as SDXC exFAT
--
Sandisk Ultra 16GB - Windows 7 reports as SDHC FAT32
@Tubular - maybe you can load the latest version of TAQOZ for ROM and try formatting those cards for me to see how they go? Just load this P2.ROM attached, rename to _P2_BOOT.BIX, let it boot up the P2, swap cards and it will automount, then you can .DISK and DIR to check if you like and then type "0 FORMAT" to select auto cluster size which in the case of the larger cards will be 64KB clusters.
Alternatively I tried using loadp2 to directly load P2.ROM and that works too.
Wait there - I need to post the P2-EVAL version, there's only a clock config change - I will post again.
My P2-ES seems to be allergic to some uSD cards.
The two cards I have (Team 8GB and Sandisk 32GB) don't even get out the starting blocks.
Both cards prevent Pnut from identifying (Ctrl-G) the Prop2, so forget about loading test code.
Scope shows all voltage rails to be Ok, no spikes.
Two other cards that work in Tubular's P2-ES work fine though, so uSD card circuit is fine.
Ok, had some success at last with the new 32 Gb Sandisk Ultra bringing up new Taqoz.
This is one of the maligned red and grey Sandisk Ultra SDHC cards.
I'm going to stop at this point tonight and see what else I can make work in the morning. I think there was a combo of things I was doing wrong but I want to re-trace carefully.
My P2-ES seems to be allergic to some uSD cards.
The two cards I have (Team 8GB and Sandisk 32GB) don't even get out the starting blocks.
Both cards prevent Pnut from identifying (Ctrl-G) the Prop2, so forget about loading test code.
Scope shows all voltage rails to be Ok, no spikes.
Two other cards that work in Tubular's P2-ES work fine though, so uSD card circuit is fine.
Sorry if I'm checking the obvious, but could it be the DipSwitch settings ?
I had the same when I tried booting from SDs, some worked some I could not get working no matter what. Of those later ones there was one that could no longer be used after all the reformatting I tried (they were older Kingston SD cards ranging from 1 - 32GB and at least 5 years old, so no harm done)
Buying a 32GB sandisk (non-ultra ones) solved all issues for me.
unfortunately I'm not @home (3 more weeks to go ) so I can not try out
Ok so the thing I have found that makes a big difference is removing and replacing the uSD card in its socket, before hitting reset. When I do this it seems to always (almost always?) boot the new Taqoz image correctly from my now FAT32 formatted 64GB Samsung SDXC. This happens when switches are in (On)-Off-Off-Off or (On)-Off-Off-On [P59 pulldown enabled] switch modes
When I don't to the uSD card removal thing, perhaps it boots successfully 2 out of 100 times. I've only seen it happen twice, but it happening verifies the rest of the chain - formatting FAT32 in taqoz, loading the _BOOT_P2.BIX image on etc, worked. Once that was extablished further experimentation showed up the card removal effectiveness
Hopefully others can replicate the above. Tomorrow I'll see if I can scope some waveforms and better see whats going on
Thanks again for all your work on all this Peter and Ray. When it does work, its a truly beautiful thing.
Comments
And thanks for those test results. I seem to have a bug when it fails.
I finally got it working with on my 4gb SanDisk uSDHC -4
-edit-
This is tested working on all my cards-
*ADATA 16g uSDHC -10*
*SANDISK 4gb uSDHC -4*
*RiDATA uSD 2gb*
At first all of my cards failed, giving the error -
And the last failure I had, before I got it working: -edit; this seems to happen when the card has already been mounted.
I'm not sure how to reproduced this error right now..
I'm not sure if my failing results are significant or not. I thought I'd post them here, just in case they're helpful. I'll check the rest of my cards and edit this post with results.
The 2GB card is probably failing due to FAT16 format.
There is a problem with error handling once a problem is found. I am working on this. I have a more detailed debug that I’ll post when i get home.
I am also trying to find how exFAT locates the DIR table and how that defines the start sector and length of the file.
I would think that if you were trying to make it work in any way with exFAT then this would not be practical for a P2 system since WE would still need to be able to write to files as well as reading. This is why I have FAT32 FORMAT utilities for this purpose. I also happened to fix a few of my cards that had bad boot blocks, I simply issued the !MBR part that is used in FORMAT and rescued all my data! I see if I can test this all out tomorrow when I pick up some 64gb Kingston microSD cards from MSY for $14 and I'm tempted to try the Sandisk Ultra 200GB ones they sell for $58.
They are way toooo small. Why not try the 2TB ones on eBay. I'm sure you can find them for ~$10
exFAT: I was interested to see if I could just find a file and load it (only if I have space/time). But I agree FAT32 is the important one. Probably be ~10 years until we can get cheapish 2TB uSD.
Yes, but only if you have an FPGA board to run it on.
I'm having trouble running this. If I run the booter spin file via spin2ide, having the boot file already on the SD card, I can only see blank spaces filling the upper half of the terminal window. PNut doesn't load any terminal after compiling. How can I see those results? Is there any switch configuration to be used?
Kind regards, Samuel Lourenço
I dont use spin2 as i use proptool to edit and it doesnt color etc if its a spin2 extension.
fastspin (the compiler for spin2gui) and PNut produce the same binary for ROM_Booter_v32i_SD-002f.spin, so I'm not sure why there'd be a problem running. Maybe the baud rate or clock rate isn't matching up? It looks like the test program outputs at 115200 baud, so in spin2gui you'll have to change the loadp2 command line (under the Commands > Configure Commands menu setting) to use 115200 baud instead of 230400 baud.
I'm using a SanDisk Ultra 16GB Class 10 SD card. By compiling and running "ROM_Booter_v32i_SD-002d.spin" using spin2gui, I get the following output:
So, it seems to run fine. I hope this helps!
Kind regards, Samuel Lourenço
If in doubt about what the P2 is seeing and if there are any problems on the SD card then just escape into TAQOZ the high-level debugger either from reset with [>] [SPACE] [ESC] or ESC <ENTER> from the LMM low-level debugger.
Then at the TAQOZ prompt type MOUNT<cr> then DIR<cr>.
After this you can optionally check the FAT32 boot sector with a one-liner
(this actually fetches the partition starting sector in the MBR and then opens the Volume Boot Record as a file which is partly dumped from 0 offset for $80 bytes)
You can also issue SD commands and examine the results interactively. TAQOZ is the hardware debugging tool built into the ROM. If you want to avoid unnecessary pain just use it. Otherwise do it the slow painful way instead.
Here's what it looks like:
Sandisk Ultra 16GB - Windows 7 reports as SDHC FAT32
Team 128GB - Windows 7 reports as SDXC exFAT
Samsung 64GB - Windows 7 reports as SDXC exFAT
--
Sandisk Ultra 16GB - Windows 7 reports as SDHC FAT32
At the dentist so later tonight ill add a bit more debugging as i want to know why it failed.
I might pick up a larger version in the same series and see what it does
Alternatively I tried using loadp2 to directly load P2.ROM and that works too.
Wait there - I need to post the P2-EVAL version, there's only a clock config change - I will post again.
Then try Peter's code and see what it reports
So because this is fresh and doesn't have other files on it, I'll load Taqoz later and try what Peter says
@Chip - busy getting my decompress working and squeezing - will get back shortly
Can you try the older ROM_Booter_v32i_SD-002d.spin here please? In case I introduced a timeout bug
forums.parallax.com/discussion/comment/1464749/#Comment_1464749
yes
The two cards I have (Team 8GB and Sandisk 32GB) don't even get out the starting blocks.
Both cards prevent Pnut from identifying (Ctrl-G) the Prop2, so forget about loading test code.
Scope shows all voltage rails to be Ok, no spikes.
Two other cards that work in Tubular's P2-ES work fine though, so uSD card circuit is fine.
I can't get a boot file to work on these. Tomorrow I'll buy some more cards and dig deeper
This is one of the maligned red and grey Sandisk Ultra SDHC cards.
I'm going to stop at this point tonight and see what else I can make work in the morning. I think there was a combo of things I was doing wrong but I want to re-trace carefully.
Sorry if I'm checking the obvious, but could it be the DipSwitch settings ?
Buying a 32GB sandisk (non-ultra ones) solved all issues for me.
unfortunately I'm not @home (3 more weeks to go ) so I can not try out
When I don't to the uSD card removal thing, perhaps it boots successfully 2 out of 100 times. I've only seen it happen twice, but it happening verifies the rest of the chain - formatting FAT32 in taqoz, loading the _BOOT_P2.BIX image on etc, worked. Once that was extablished further experimentation showed up the card removal effectiveness
Hopefully others can replicate the above. Tomorrow I'll see if I can scope some waveforms and better see whats going on
Thanks again for all your work on all this Peter and Ray. When it does work, its a truly beautiful thing.