genBible.txt - Early general notes This is mostly early research so alot of stuff is inaccurate/missing in here. random discoveries: turning off clock for pwm0 turns off backlight but doesn't kill anything else winCE turns off pwm1 clock when backlight goes off, turning it off manually does nothing you can access the SRAM at 0x5c000000 if you turn it's clock on the first 4 bytes of sram branch to 0x007fff94 <-- must find out where this is The "powerI2C" of the PXA27x doesn't exist. The normal I2C register area is weird. Disabling the I2C clock doesn't kill anything obvious. SSP1 is normally enabled and SSP2/3 arn't. Disabling SSP1 doesnt kill anything obvious. Disabling the matrix keypad kills the keys at the bottom. At 0x0000000 there is 512 bytes repeating. It's mostly 00 with some initial stuff. It's not ARM code. Just noticed how PWM is spelt - its not a power manager, its "pulse width podulator". doh Keypad works Backlight works Windows switches off PWM1 clock when it turns the backlight off - it's the wrong one!!! Since we can switch the SRAM on, can we do power management, and can we use it for faster FB?? - no, not enough memory Monahans types: P PXA320 PL ? L PXA300 LV PXA310 Keypad: matrix rows: 4 matrix cols: 3 rotary encoders not enabled. keys: key regs row col A 00004 0 0 0 2 0 B 00008 0 0 0 3 0 C 00002 0 0 0 1 0 D 20000 0 0 0 1 1 up 40000 0 0 0 2 1 down 80000 0 0 0 3 1 left 00000 2 0 0 3 2 right 00000 4 0 0 2 2 centre 00000 8 0 0 1 2 record 00000 1 0 0 0 2 "The GPIO46 and GPIO49-52 don’t have GPIO as alternate function 0. The alternate function GPIO is as mentioned below: GPIO46 (AltFn 1) GPIO49 (AltFn 3) GPIO50 (AltFn 2) GPIO51 (AltFn 3) GPIO52 (AltFn 3)" gpio directions: (the x bit changes) 0=Input 1=Output [31:0] 0000 0000 0001 1011 0x00 0101 1111 1110 00c [63:32] 0000 0000 0011 1111 1111 1111 1000 0000 010 [95:64] 0100 0000 0001 1110 0101 0000 1000 0000 014 [127:96] 1011 0001 1000 0101 1000 0001 1001 1111 10c directions in linux: linux 001305FE 0000 0000 0001 0011 0000 0101 1111 1110 wince [31:0] 0000 0000 0001 1011 0x00 0101 1111 1110 linux FC3FFF80 1111 1100 0011 1111 1111 1111 1000 0000 wince [63:32] 0000 0000 0011 1111 1111 1111 1000 0000 linux 401E7FFF 0100 0000 0001 1110 0111 1111 1111 1111 wince [95:64] 0100 0000 0001 1110 0101 0000 1000 0000 linux 3185819F 0011 0001 1000 0101 1000 0001 1001 1111 wince [127:96] 1011 0001 1000 0101 1000 0001 1001 1111 gpio triggers: Rising: 00048200 0000 0000 0000 0100 1000 0010 0000 0000 9,15,18 00000000 0000 0000 0000 0000 0000 0000 0000 0000 82000040 1000 0010 0000 0000 0000 0000 0100 0000 6,25,31 (70,89,95) 00000000 0000 0000 0000 0000 0000 0000 0000 0000 9 Falling: 00048200 0000 0000 0000 0100 1000 0010 0000 0000 9,15,18 00000000 0000 0000 0000 0000 0000 0000 0000 0000 80000040 1000 0000 0000 0000 0000 0000 0100 0000 6,31 (70,95) 00020000 0000 0000 0000 0010 0000 0000 0000 0000 17 (113) So GPIO IRQs are: gpio trig on 9 BOTH 15 BOTH card detect 18 BOTH 70 BOTH 89 UP pen down 95 BOTH 113 DOWN dmesg mmc stuff...interesting /* mmc1: req done (cmd1: -110: 0001000 0000000 00000000 00000034) clock 0hz busmode 1 powermode 0 cs 0 vdd 0 width 0 timing 0 clkrt = ffffffff cmd80=800 mmc2: clock 304688Hz busmode 1 pwrmode 2 cs 0 vdd 21 width 0 timing 0 clkrt = 6 cmd80=840 mmc2: clock 304688Hz busmode 1 pwrmode 2 cs 1 vdd 21 width 0 timing 0 clkrt = 6 cmd80=840 cmd 8 arg 1aa flags 2f5 reqdone cmd 8 -84 start cmd 5 args0 flags 2e1 reqdone 0 19500000 */ actual: mmc0: error -110 whilest init mmc card log: cpu0: d vivt undefined 5 cache ecc disabled data cache writeback CPU: Testing write buffer coherency: failed, enabling work-around delay loop calib: 622.59 BogoMIPS (lpj=3112960) gpio autoreqeusted: 71 70 75 73 72 127 76 20 mmc0: clock 0hz bus 1 power 0 cs 0 cdd 0 width 0 timeing 0 mmc0: 0 1 1 21 0 0 mmc0: 304688 1 2 0 21 0 0 mmc0: 304688 1 2 1 21 0 0 ipaq with mmc: mmc0: cmd0: arg 00000000 fl 000000c0 mmc0: clock 0hz bus 1 power 0 cs 0 cdd 0 width 0 timeing 0 mmc0: cmd1: -110 00ff8000 0ff981ea ecb101e1 8a40003f <-- sensible mmc0: cmd55: -110 00000900 0ff981ea ecb101e1 8a400011 mmc0: cmd8: arg 000001aa fl 00002f5 mmc0: cmd8 resp -110 : 00000b00 0ff981e9 ecb181e1 8a40000c mmc0: cmd5: arg 0 fl 2e1 fail retry fail retry fail retry fail retry fail retry mmc0: cmd5 resp: -110 00000900 0ff981ea ecb101e1 8a400011 (mmc0: cmd5 resp: -110 00000b00 0ff981ea ecb101e1 8a400011) or all non-0: returns: mmc0 cmd0: 00ff8000 0ff981ea mmc1: cmd8 -110 00001000 00000000 00000000 34 mmc2: cmd0 0 0 0 0 nervousenergy with mmc: cmd0 gets 00ff8000 <-- correct :) ipaq with sdio card: CRASH Things changed by wifi/BT switching (see wifi-bt-gpio-watch-2.txt) 3 1 Out The LED AF0 DS04X PULL_BUT_PULL_NONE?? LP_NOINFO GPIO3_2 4 1 Out Wifi AF0 DS01X PULL_BUT_PULL_NONE?? LP_NOINFO GPIO4_2 6 1 Out ~ AF0 DS03X PULL_BUT_PULL_NONE?? LP_NOINFO GPIO6_2 24 0 In ~Wifi AF0 DS03X PULL_HIGH LP_NOINFO 24 26 0 In Wifi AF0 DS01X PULL_BUT_PULL_NONE?? LP_NOINFO 26 53 1 Out BT AF0 DS03X PULL_BUT_PULL_NONE?? LP_NOINFO 53 71 1 Out BT AF0 DS03X PULL_BUT_PULL_NONE?? LP_NOINFO 71 ?? now disabled [GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)] 80 0 In BT AF0 DS03X PULL_BUT_PULL_NONE?? LP_NOINFO 80 84 1 Out BT AF1 DS03X PULL_NONE LP_Input LP_Drive_0 84 X 85 0 In BT AF1 DS13X PULL_NONE LP_Input LP_Drive_0 85 X 89 0 In Clicking related AF0 DS03X PULL_BUT_PULL_NONE?? LP_NOINFO 89 96 1 Out Wifi AF0 DS13X PULL_BUT_PULL_NONE?? LP_NOINFO 96 97 1 Out Wifi AF0 DS04X PULL_BUT_PULL_NONE?? LP_NOINFO 97 99 1 Out Wifi AF0 DS01X PULL_BUT_PULL_NONE?? LP_NOINFO 99 xGPIO99_UART1_RXD | MFP_LPM_EDGE_FALL 100 1 Out Wifi AF0 DS04X PULL_BUT_PULL_NONE?? LP_NOINFO 100 xGPIO100_UART1_TXD 103 1 Out Wifi AF0 DS04X PULL_BUT_PULL_NONE?? LP_NOINFO 103 104 1 Out Clicking related AF0 DS13X PULL_BUT_PULL_NONE?? LP_NOINFO 104 114 1 Out BT AF0 DS01X PULL_BUT_PULL_NONE?? LP_NOINFO 114 124 1 Out BT AF0 DS03X PULL_BUT_PULL_NONE?? LP_NOINFO 124 How to hard reset the ipaq (factory settings): The Hard Way HP iPAQ 200 Series Enterprise Handheld - Performing a Factory Reset Introduction A factory reset clears all user-installed settings, programs, and data, and restores your HP iPAQ 200 Series Enterprise Handheld to factory settings. Save all the important programs and files in the iPAQ File Store folder before you factory reset the device. Before saving files to the iPAQ File Store folder, it is a good idea to determine how much memory is available in the folder. Step one: Checking memory availability in File Store folder Follow these steps to view the memory available in iPAQ File Store folder. Tap Start on your device. Then tap Settings > System > Memory > Storage Card . Select iPAQ File Store from the list. Step two: Saving files and programs in iPAQ File Store folder Follow these steps to save files to iPAQ File Store folder: Copy all the files to be saved to the iPAQ File Store folder. Tap Start > Programs > File Explorer > My HP iPAQ > iPAQ File Store . Tap Edit > Paste . CAUTION: iPAQ File Store might contain a special folder called hp to store system files. Do not save new files or modify existing files in this hp folder. Step three: Performing factory reset Follow these steps to perform a factory reset of the device. Press and hold the Record , Windows , OK , and Reset buttons at the same time. Figure 1: Buttons used to perform factory reset 1 - Record 2 - Windows 3 - OK 4 - Reset Hold all the buttons for 2 seconds. Release the Reset button while continuing to hold the Record , Windows , and OK buttons. A Clean Boot message is displayed, indicating successful restoration of factory settings on your device. The Easier Way Install HP iPAQ Setup Assistant on your desktop, A factory reset is one of the options. One click does it! arch/arm/mach-pxa/h2200/h2200_pm.c:"h2200 power management support for the WinCE bootloader". Pretty complex stuff. Has good comments on the whole resume issue. stuff for reboot: #define OSSR __REG(0x40A00014) /* OS Timer Status Register */ #define OSSR_M3 (1 << 3) /* Match status channel 3 */ #define OWER __REG(0x40A00018) /* OS Timer Watchdog Enable Register */ #define OSCR __REG(0x40A00010) /* OS Timer Counter Register */ #define OSMR3 __REG(0x40A0000C) /* */ mov r2,#0x40000000 add r2,r2,#0x00a00000 add r0,r2,0x14 mov r1,#0x00000008 str @ OWER = OWER_WME; @ OSSR = OSSR_M3; @ OSMR3 = OSCR + 368640; /* ... in 100 ms */ regs equiv: r10 sl r11 fp r12 ip r13 sp r14 lr r15 pc The 24-pin connector: 24-Pin Docking Connector: Pin Signal Names Function 1 ADP_IN 5 Vdc 2A – Adapter input - part number 395250 Output connector need to modified to mate with new I/O sync connector. 2 ADP_IN 3 ADP_IN 4 ADP_IN 5 VBUS_FS 2.0 USB Full Speed Host 6 D+HHS 7 D-HHS 8 GND System Ground 9 D+OTG 2.0 USB High Speed On-The-Go 10 D-OTG 11 VBUS_OTG 12 ID_OTG 13 GND System Ground 14 ID_READ Accessory Identification – Connect GPI to ID_READ and GPO to ID_POWER. 15 ID_POWER 16 AGND Audio Head Set Connection 17 HeadSetAudioLeftOut 18 HeadSetAudioRightOut 19 HeadSetMicIn 20 GND System Ground 21 Reserved1 Reserved for future use – No Connect 22 Reserved2 23 Reserved3 24 GND System Ground Shell GND System Ground