Chipset Dump Utility CSDump

While developing a device driver in Windows CE, it is sometimes important to verify the register contents of your hardware. You can do that by adding additional debug messages into your driver, but this requires to add additional code. With our tool CSDump, you can watch register contents at runtime. Since CE 6.0, you can no longer access physical memory in an application. Therefore we are using a special driver which performs all memory accesses.

Physical addresses can be specified in a configuration file. In addition to physical memory contents, you can dump single bit groups. This can make your life easier, when you are comparing the results with the specifications in your datasheet.

By using configuration files you can use this tool in a very flexible way. For example, you can define configuration files for specific groups of your chipset like the interrupt settings. Todays embedded processors are very complex, so that you are typically interested only in parts of the chipset at a given point.

You can adapt this tool to various chipsets. All you need is a version of CSDump, that has been compiled for your cpu family.

Syntax:
csdump <configuration file>

Example:
csdump pwm.cfg >pwm.txt

This example writes all output to file pwm.txt.

Syntax of a configuration file:

ADDR <address> <bus width> <register name> <register description>
Displays the contents of an address in hexadecimal. Bus width can be 1, 2 or 4.

BITS <starting bit> <ending bit> <bitgroup description>
Displays the contents of a bit group in decimal.

ECHO <text>
Displays some text.

LINEFEED
Prints an empty line.

echo "Pulse Width Modulator Controller"
echo "--------------------------------"
addr 0x40b00000 4 PWMCR0 "PWM Control Register"
bits 6 6 "Pulse Width Modulator Shutdown Mode"
bits 0 5 "Prescaler"
addr 0x40b00004 4 PWMDCR0 "PWM Duty Cycle Register"
bits 10 10 "Full Duty Cycle"
bits 0 9 "Duty Cycle of PWM_OUT"
addr 0x40b00008 4 PWMPCR0 "PWM Period Control Register"
bits 0 9 "Period Value"
linefeed
addr 0x40c00000 4 PWMCR1 "PWM Control Register"
bits 6 6 "Pulse Width Modulator Shutdown Mode"
bits 0 5 "Prescaler"
addr 0x40c00004 4 PWMDCR1 "PWM Duty Cycle Register"
bits 10 10 "Full Duty Cycle"
bits 0 9 "Duty Cycle of PWM_OUT"
addr 0x40c00008 4 PWMPCR1 "PWM Period Control Register"
bits 0 9 "Period Value"
linefeed
addr 0x40b00010 4 PWMCR2 "PWM Control Register"
bits 6 6 "Pulse Width Modulator Shutdown Mode"
bits 0 5 "Prescaler"
addr 0x40b00014 4 PWMDCR2 "PWM Duty Cycle Register"
bits 10 10 "Full Duty Cycle"
bits 0 9 "Duty Cycle of PWM_OUT"
addr 0x40b00018 4 PWMPCR2 "PWM Period Control Register"
bits 0 9 "Period Value"
linefeed
addr 0x40c00010 4 PWMCR3 "PWM Control Register"
bits 6 6 "Pulse Width Modulator Shutdown Mode"
bits 0 5 "Prescaler"
addr 0x40c00014 4 PWMDCR3 "PWM Duty Cycle Register"
bits 10 10 "Full Duty Cycle"
bits 0 9 "Duty Cycle of PWM_OUT"
addr 0x40c00018 4 PWMPCR3 "PWM Period Control Register"
bits 0 9 "Period Value"

pwm.cfg

csdump.exe v2.00, Oct 16 2008 14:01:19
Copyright (c) 2008 Pfaadt Software

Pulse Width Modulator Controller
--------------------------------
PWMCR0[0x40B00000]=0x00000000 PWM Control Register
[6]=0 Pulse Width Modulator Shutdown Mode
[5:0]=0 Prescaler
PWMDCR0[0x40B00004]=0x00000000 PWM Duty Cycle Register
[10]=0 Full Duty Cycle
[9:0]=0 Duty Cycle of PWM_OUT
PWMPCR0[0x40B00008]=0x00000004 PWM Period Control Register
[9:0]=4 Period Value

PWMCR1[0x40C00000]=0x00000000 PWM Control Register
[6]=0 Pulse Width Modulator Shutdown Mode
[5:0]=0 Prescaler
PWMDCR1[0x40C00004]=0x00000000 PWM Duty Cycle Register
[10]=0 Full Duty Cycle
[9:0]=0 Duty Cycle of PWM_OUT
PWMPCR1[0x40C00008]=0x00000004 PWM Period Control Register
[9:0]=4 Period Value

PWMCR2[0x40B00010]=0x00000000 PWM Control Register
[6]=0 Pulse Width Modulator Shutdown Mode
[5:0]=0 Prescaler
PWMDCR2[0x40B00014]=0x00000000 PWM Duty Cycle Register
[10]=0 Full Duty Cycle
[9:0]=0 Duty Cycle of PWM_OUT
PWMPCR2[0x40B00018]=0x00000004 PWM Period Control Register
[9:0]=4 Period Value

PWMCR3[0x40C00010]=0x00000020 PWM Control Register
[6]=0 Pulse Width Modulator Shutdown Mode
[5:0]=32 Prescaler
PWMDCR3[0x40C00014]=0x000000C8 PWM Duty Cycle Register
[10]=0 Full Duty Cycle
[9:0]=200 Duty Cycle of PWM_OUT
PWMPCR3[0x40C00018]=0x000000C8 PWM Period Control Register
[9:0]=200 Period Value

The resulting output

German Version
Windows Embedded Partner

Microsoft, Windows, and the Windows CE are registered trademarks of Microsoft Corporation in the United States and/or other countries