SD Card Filer
notaz (1575) 2 posts |
Some information about pandora:
|
Ben Avison (25) 445 posts |
Thank you notaz, that is very useful information. In particular, I hadn’t noticed the MMCSDIO2ADPCLKISEL bit. I have made that change so that Raik can test it. Can you think of a reason why the TPS65950 GPIO pins (SD card detect) do not work? I am polling bits 0 and 1 of GPIODATAIN1, but Raik says that they always appear as card inserted (bits = 0). The exact same code works for the beagleboard! |
Raik (463) 2061 posts |
I can not see any changes. May be in the tomorrow ROM. |
Raik (463) 2061 posts |
I have the 1GB card formated with two partition (first adfs, second fat) and *configure filesystem sdfs and save the cmos… It works fine. |
notaz (1575) 2 posts |
About the GPIOs, can’t think of anything, they should just work.. |
Jeffrey Lee (213) 6048 posts |
Could it be the pull-ups? At the moment, the HAL only configures the TPS GPIO pull-ups if it’s running on a BeagleBoard/BB-xM (see GPIO_Init). If the Pandora version of u-boot isn’t configuring them for us, then that could be causing problems. |
Raik (463) 2061 posts |
The good news at first. With the yesterday ROM more cards are readable. |
Ben Avison (25) 445 posts |
Cards of 4GB or more don’t work properly unless you reformat them using !HForm (and if you do that, you won’t be able to read them on Windows or Mac OS or older versions of Linux). That is a known problem, and is also true for all other RISC OS machines at the moment. Does it detect when a card is removed yet? Unless RISC OS sees the “card detect” change from “yes” to “no” and back again, it won’t know that it has to use the start-up procedure when you insert a new card. Perhaps you can use this BASIC program to read some registers from TPS65950? PRINT"(R)ead or (W)rite? "; read=GET-ASC("W") VDUread+ASC("W"),10,13 INPUT"I2C address? "addr$:addr=EVAL(addr$) INPUT"Register? "reg$:reg=EVAL(reg$) IF read ELSE INPUT"Value? "value$:value=EVAL(value$) DIM data 2 DIM trans 24 IF read THEN data?0 = reg trans!0 = addr<<1 trans!4 = data trans!8 = 1 trans!12 = (addr<<1) OR 1 trans!16 = data+1 trans!20 = 1 SYS"OS_IICOp",trans,2 PRINT"Value: ";data?1;" or &";STR$~data?1 ELSE data?0 = reg data?1 = value trans!0 = addr<<1 trans!4 = data trans!8 = 2 SYS"OS_IICOp",trans,1 ENDIF To read GPIODATADIR1, use “I2C address” = “&49”, “Register” = “&9B” (“&” is the way we indicate hexadecimal numbers in RISC OS). If you want to investigate more registers yourself, or try different values, they are documented in the TPS65950 technical reference manual (search Google for “swcu050g.pdf”). |
Raik (463) 2061 posts |
Sorry, I was a little surprised that my 16GB Pandora-Media-Card is working, so I forgot the 4GB limitation. |
Raik (463) 2061 posts |
I’m a little confused. Today the card detect not work. Many thanks. |
Ben Avison (25) 445 posts |
I’ve managed to get the second MMC slot working on the “Zippy” expansion card for my beagleboard. In many ways this is similar to the Pandora’s second MMC slot, so I have made the same changes to the Pandora driver. Let’s hope this works for you! |
Raik (463) 2061 posts |
Sorry, I see no changes in the today ROM. Only one SDFS drive displayed. I boot from sdfs and scsi with the old cmos and a new one for both with changed the scsidevice. |
Raik (463) 2061 posts |
I’m many more surprised and confused. In holiday I have all the stuff tested with the new Pandora rebirth edition. In the last hour I used my old Pandora from Batch1. The same firmware and SD cards. P.S.: After this I see the new final firmware is ready. I will download and upgrade the Pandoras. I think tomorrow it gives the new results. |
Raik (463) 2061 posts |
New firmware on both Pandoras, the same problems. Old Pandora one Icon but the tool and the rest works fine, new Pandora the tool works most not right and the other problems are the same :-( |
Ben Avison (25) 445 posts |
Raik, I’m sorry about the trouble you’re having. I really don’t understand why it is only showing 1 icon – I know it can do 2 icons because it works with my Beagleboard+Zippy. Do *SDIOSlots and *SDIODevices print more than one line? |
Raik (463) 2061 posts |
No, no, no thats wrong. I have to thank you. No reason for you to say sorry. |
Ben Avison (25) 445 posts |
It would be much easier if I had a Pandora to use to investigate this. Perhaps it makes sense to wait until Jeffrey gets his, if Jeffrey doesn’t mind helping. I think there should be 2 icons, even if card detect is wrong or something else at the electrical level is wrong. It could be one of these: 1) the HAL is not detecting that you have a Pandora, perhaps it thinks it is running on a Beagleboard. Try this: SYS"OS_Hardware",&403,,,,,,,,4 TO ,,gpio%:PRINT gpio%!&40 This will print 0 for Beagleboard, 1 for DevKit8000, 2 for IGEPv2, 3 for Pandora. 2) I may have introduced a bug when I tried to fix it so that the SD controllers are discovered in the correct order. I think this is unlikely, because it works correctly with my Zippy. However, to be sure, please try this version of my first test program again (in two places, a 4 is replaced by a 5): DIM P% 100 [OPT 0 .calldevice SWI "XOS_EnterOS" MOV lr,pc MOV pc,r7 SWI "XOS_LeaveOS" MOV pc,lr ] h%=0 SYS"OS_Hardware",&501,h%,,,,,,,5 TO ,h%,d% WHILE h%<>-1 PRINT "Slot ";h%-1 A%=d%:B%=0:H%=d%!&78:cd%=USR(calldevice) PRINT" Card detect = "; IF cd% THEN PRINT"yes" ELSE PRINT"no" A%=d%:B%=0:H%=d%!&7C:wp%=USR(calldevice) PRINT" Write protect = "; IF wp% THEN PRINT"yes" ELSE PRINT"no" SYS"OS_Hardware",&501,h%,,,,,,,5 TO ,h%,d% ENDWHILE |
Raik (463) 2061 posts |
Ok, this are the results: 1. The first line: Output: -67088460 2. Changed tool Slot 37, 38, 39 yes, no The same output on both Pandoras… But I hope this helps… I’am very confused :-( Many thanks. |
Raik (463) 2061 posts |
A short Test with the old Pandora and the 0307_ROM: First line: -67088576 Card detect works with the old tool and the old slot numbers… sdiodevices and sdioslots print only one line P.S.: The first line on BeaglexM give 0. I test this from the Pandora SD. Good night. |
Ben Avison (25) 445 posts |
My mistake with the first test – it shouldn’t print 3. But the fact that it didn’t print 0, 1 or 2 means it probably has correctly identified the Pandora. The fact that it prints “37, 38, 39” means that the HAL is reporting all 3 SD controllers, even using the new call that I added to the kernel. The problem is probably somewhere else. Can you try this: SYS"SDIO_Enumerate" TO ,s%,id% WHILE s%<>0 PRINT~id% SYS"SDIO_Enumerate",0,s% TO ,s%,id% ENDWHILE I expect it to print 0 100 10200 If it doesn’t, then try *RMReInit SDIODriverand try again, to see if it changes. |
Jeffrey Lee (213) 6048 posts |
I’m happy to help. I just have to wait for my Pandora first :( |
Raik (463) 2061 posts |
@Ben 0 before and after rmreinit. @Jeffrey What goes wrong with your order? |
Ben Avison (25) 445 posts |
I think I might have worked out why the Pandora’s SD icon vanished – an unintended side-effect of other changes affected the value of an uninitialised variable (it’s easy for this to happen when you’re writing assembly language!) I still don’t know why the WiFi chip isn’t responding. It may be that the chip pin multiplex options are set wrong, or it might be a power problem. However, since we have no driver for the WiFi chip, I don’t think this is an urgent problem. |
Jeffrey Lee (213) 6048 posts |
@Jeffrey I made the mistake of ordering in 2010, so have been stuck in preorder queue hell since then. From looking at the upgrade queue positions people have posted to the forums I know that there’s no more than twelve people infront of me, so I’m currently assuming that my Pandora will be in the next batch that Craig receives from Ed… |
Raik (463) 2061 posts |
@Ben @Jeffrey |