release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > SanDisk > SansaAMS > SansaAMSHardwareMappings

Hardware Mappings for the different Sansa AMS Devices

DMA lines

The DMA Controller present in the devices (ARM Primecell PL081) supports 16 DMA peripheral request lines.

The common mapping between all models is:

  • 2 = SD slot
  • 3 = i2sout (PCM Playing)
  • 4 = i2sin (PCM Recording)
  • 5 = embedded SD
And a line specific to e200v2:
  • 8 = DBOP (LCD)

GPIO ports

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.

  e200v2 Clip Fuze m200v4 C200v2 Clip+ Fuzev2 ClipZip
A0   display   keyscan input     FM i2c SDA  
A1   display Scrollwheel Control keyscan input USB present (variant1) Home button    
A2 µSD NOT present   µSD NOT present keyscan input µSD NOT present µSD NOT present µSD present µSD detect
A3 USB present Hold button USB present menu/power Power Button   USB present display output
A4 lcd display lcd keyscan output   FM interrupt FM i2c SDA variant ? FM interrupt
A5 lcd display D/C# lcd keyscan output lcd backlight (variant1)
buttonlight2 (variant2)
display reset#   display reset#
A6 FM i2c SCL USB present FM i2c SCL keyscan output ?read in OF Vol- button Scrollwheel vol- button
A7 FM i2c SDA Power button FM i2c SDA ? lcd backlight (variant2) Vol+ button Scrollwheel vol+ button
B0   keyscan input   lcd        
B1   keyscan input   lcd     Home Button / FM i2c SCL ? display backlight
B2   keyscan input   lcd LCD data/command display D/C#   display D/C#
B3   display strobe   lcd LCD write strobe display type detect   display type detect
B4 Power button FM i2c SCL Power Button   FM i2c SCL unbrick pad Scrollwheel control  
B5 Dock detect FM i2c SDA     FM i2c SDA µSD selection Button light / µSD selection µSD selection
B6   display     LCD reset FM i2c SCL   FM i2c SCL
B7           FM i2c SDA   FM i2c SDA
C0   display data   lcd LCD data[0]      
C1   display data   lcd LCD data[1] Menu button Down button keyscan output
C2 Up button display data Up Button lcd LCD data[2] / Left Button Play button Up Button keyscan output
C3 Left button display data Left Button lcd LCD data[3] / Down Button Left button Left Button keyscan input
C4 Select button keyscan output Select Button lcd LCD data[4] / Select Button Select button Select Button keyscan input
C5 Right button keyscan output Right Button lcd LCD data[5] / Up Button Right button Right Button keyscan input
C6 Down button keyscan output Down Button lcd LCD data[6] / Right Button      
C7       lcd LCD data[7]      
D0           D0-D3 output    
D1       Backlight   D0-D3 output    
D2           D0-D3 output Power?  
D3           D0-D3 output    
D4                
D5                
D6       FM i2c SDA   Power   Power button
D7 Buttonlight Buttonlight Buttonlight FM i2c SCL Buttonlight output Power & Hold Button shared unknown detect

Button readout

Clip buttons

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.

clip B0 B1 B2
C4 - vol+ up/play
C5 left select right
C6 down vol- home

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.

Clip v2 buttons

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.

clipv2 D0 D1 D2
D3 - vol+ up/play
D4 left select right
D5 down vol- home

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).

Clip+ buttons

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.

GPIO Button
A1 Home
A6 Vol-
A7 Vol+
C1 Menu
C2 Play
C3 Left
C4 Select
C5 Right
D6 Power
Unknown USB

m200v4 buttons

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.

m200v4 A0 A1 A2
A4 never set ? vol- up/play
A5 left select right
A6 down/repeat vol+ hold

c200v2 buttons

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.

c200v2, e200v2 & Fuze buttons

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:
Bit GPIO e200v2 Fuze c200v2
0 C0 - - -
1 C1 - - -
2 C2 Up Up Left
3 C3 Left Left Down
4 C4 Select Select Select
5 C5 Right Right Up
6 C6 Down Down Right
7 C7 - - -
8 B4 Power Power -
9 B5 Dock Dock -
10 B6 - - -
11 B7 - - -
12 - Hold Hold Hold
13 - Scrollwheel Scrollwheel Vol+
14 - Scrollwheel Scrollwheel Vol-
15 - Rec Home Rec

clipzip 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.

clipzip C3 C4 C5
C1 Right Select Up
C2 Home Down Left

Other buttons can be read out directly through GPIO A6 (volume down), A7 (volume up) and D6 (power), with a high level indicating a pressed button.

Clip+ and Fuzev2 variants

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

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

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.

r89 - 02 Apr 2021 - 20:46:07 - UnknownUser


Parents: SanDisk > SansaAMS
Copyright © by the contributing authors.