Rockbox Development > New Ports
SanDisk Sansa c200v2, m200v4, clipv1, clipv2, clip+, and fuzev2
FlynDice:
--- Quote from: funman on February 05, 2010, 07:23:43 AM ---Did you forget to update dualboot.c / dualboot.h when the delay wasn't changed?
--- End quote ---
Yes that was exactly the problem but mc2739 was clever enough to figure it out for me so I could continue!
I have checked all 32 GPIO pins and USB does not set any of them high so far as I can see. There are some pins that seem to be set high always and I'm going to check them to see if perhaps USB will pull them down low.
As far as writing to GPIOB goes, what do I need to write? I'm assuming you mean change the gpio_dir to 1 for output, write a value(0xff or 0??) and then switch the gpio_dir back to 0 and read the pin?
I see you've been busy working on the clip+ build also. I'm very confident in my left button dualboot so I think I'll take a break from chasing GPIO pins and see what happens if I let rockbox try to boot!
Edit: Bootloader builds just fine but no sign of anything on clip+ when I let rockbox try to boot.
Long pwr press to reset and dualboot into OF lets me plug usb back in and flash the original OF firmware back to it.
funman:
--- Quote from: FlynDice on February 05, 2010, 01:33:07 PM ---As far as writing to GPIOB goes, what do I need to write?
--- End quote ---
saved_gpiob = GPIOB_DIR;
GPIOB_DIR = saved_gpiob | (1<<0);
GPIOB_PIN(0) = 1;
i = 500;
while(i--) ;
GPIOB_DIR = saved_gpiob
and then read the buttons.
The backlight might be different for Clip+, what would help debugging is to find the button light.
Note if you power on the Clip+ fast after power off there might still be data in GRAM, and if you plug the USB cable it might power a bit the LCD and you could see something on the screen, that worked for the Clipv2.
FlynDice:
--- Quote from: funman on February 05, 2010, 03:12:48 PM ---The backlight might be different for Clip+, what would help debugging is to find the button light.
--- End quote ---
Unfortunately there seems to be no buttonlight on the clip+ :(
EDIT
Using the GPIOB write did not change the results at all it seems. Here's the code I used: http://pastie.org/812138
When booting to the rockbox bootloader there was no sign of life at all. I tried holding/pressing buttons, plugged in USB listened on headphones, shined a light on the screen etc.. Nothing, nada ,zilch.
funman:
If it didn't make a difference I think it should be used, because there could be a difference on some models.
Now let's hunt the USB pin !
EDIT: Now it seems it is never explicitely read in Clipv1/Clipv2 but rather written to .. Not sure how else we could detect rather than by brute force like you did..
EDIT2: We could use adc_read(VBUS): it reports ~ 0.16V when usb isn't plugged and around (a bit less) 5V when USB is plugged. Would i2c read in mkamsboot be overkill ?
FlynDice:
I found the clip+ pwr button on D6 by using the GPIOB write with this code: http://pastie.org/812463
It was very tricky as it's difficult to press the pwr button to turn it on and then press it again quickly enough to have it read....
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version