Wiki > Main > SansaAMSHardwareMappings (compare)
Difference: SansaAMSHardwareMappings (r83 vs. r82)
The DMA Controller present in the devices (ARM Primecell PL081) supports 16 DMA peripheral request lines.
The common mapping between all models is:
And a line specific to e200v2:
The AS3525 has 4 GPIO ports (A, B, C, D) of 8 bits each. GPIO ports B and C are shared with the DBOP (to control a display).
The table below lists all GPIOs for which the function has been discovered so far.
The mapping for Fuze and e200v2 are the same, with the exception of A1.
The SansaClip uses a row/column keyscan method to read most keys: it scans through the rows by putting a high level on GPIO C4, C5 or C6 and reads back the values on GPIO B0, B1 and B2 to determine which button was pressed.
When switching all Clip GPIO's as input, the values appearing on the GPIOs are (in hex): GPIOA=0x00, GPIOB=0xF8, GPIOC=0x43, GPIOD=0x00.
The Clip v2 uses a row/column keyscan method to read most keys: it scans through the rows by putting a low level on GPIO D3, D4 or D5 and reads back the values on GPIO D0, D1 and D2 to determine which button was pressed. See this forum post.
To read the hold/power button you have to set A7 direction out, set pin A7, wait a little bit (I used for(i=0;i<50;i++) asm volatile("nop"); ) , read A3; unset pin A7 and set the direction to input to read power button (quoted from this forum post).
The clip+ does not use the same row/column keyscan method that the clip & clipv2 use. When a button is pressed it sets the corresponding GPIO pin high. There is no hold button for the clip+. The OF implements the hold function with a long home press.
The Sansa m200v4 uses a row/column keyscan method to read most keys: it scans through the rows by putting a high level on GPIO A4, A5 and A6 and reads back the values on GPIO A0, A1 and A2 to determine which button was pressed.
Buttons are connected to the DBOP data pins (also used for the display). To read the buttons, first a high level is applied to the data pins, next the data pins are read back after some time (0.5 microsecond or so). A low level at this time indicates an active button.
These players have buttons connected to the DBOP data pins (also partially accessible through GPIOB and GPIOC). These DBOP data pins are used for both communication with the display and with the buttons. Most buttons seem to control a relatively weak pull-up or pull-down resistor on these pins. To read a button we put a low or high level on a DBOP data pin, then wait a bit (a microsecond or so) and check if the logic level changed because of a button pulling the data pin the other way.
Most buttons have a low active level (so we put a high level on the pin and see if it gets changed to a low level), except for the hold button on the e200v2 and fuze which are active high.
On the fuze, the dock indication bit seems to be at DBOP bit 9 (active high), see this forum post.
DBOP_DIN based buttons:
This player uses a row/column keyscan method to read most keys: it scans through the rows by putting a high level on either GPIO C1 or C2 and reads back the values on GPIO C3, C4 and C5 to determine which button was pressed.
Some Other other buttons can be read out directly through GPIO A6, A7 and D6.
The Clip+ and Fuzev2 come in two "variants", related to button light (fuzev2 only) and sd card control (clip+ and fuzev2). The variant is indicated by the default level on pin GPIO B5 when configured as an input. Variant 0 has a low level, variant 1 has a high level (probably due to a pull-up).
In rockbox, the detected AMSv2 variant is shown in the "HW info" debug menu. In the original firmware of the clip+, the variant can be seen by going into the diagnostic menu and checking for either HERMON (variant 0) or COMBO4E (variant 1).
Variant 0 has separate command and data and lines for the sd card interface.
On the fuzev2, the button light is controlled by GPIO B5 (the clip+ does not have a button light).
Variant 1 has a single set of command and data lines for the sd card interface. The data lines are shared between the "internal" and external sd slots. The command line can be switched to either the internal or the external slot using GPIO B5 when configured as an output (which is the same pin used for detecting the variant).
On the fuzev2, the button light is controlled by a PWM output. In theory, it should be possible to dim the button light to some intermediate brightness with this variant. On the fuzev2, the HOME button is inverted on variant 1 compared to variant 0.
r88 - 12 Dec 2012 - 14:46:19 - BertrikSikkenRevision r83 - 31 Oct 2011 - 22:46 - BertrikSikken
Revision r82 - 30 Sep 2011 - 05:50 - BertrikSikken
Copyright © by the contributing authors.