Update 'dpctl'
							parent
							
								
									051971b711
								
							
						
					
					
						commit
						19550a765c
					
				
							
								
								
									
										58
									
								
								dpctl.md
								
								
								
								
							
							
								
								
								
								
									
									
								
								
								
							
						
						
									
										58
									
								
								dpctl.md
								
								
								
								
							| 
						 | 
					@ -27,6 +27,10 @@ subcommands:
 | 
				
			||||||
    get-mode-info  Shows mode info. A mode can optionally be specified, default
 | 
					    get-mode-info  Shows mode info. A mode can optionally be specified, default
 | 
				
			||||||
                   is the current mode.
 | 
					                   is the current mode.
 | 
				
			||||||
    set-mode       Set the device mode
 | 
					    set-mode       Set the device mode
 | 
				
			||||||
 | 
					    bootloader     Set the device in bootloader mode
 | 
				
			||||||
 | 
					    storage-info   Get persistent storage info
 | 
				
			||||||
 | 
					    storage-flush  Flush persistent storage data to storage medium
 | 
				
			||||||
 | 
					    storage-get    Get data of a particular mode
 | 
				
			||||||
    uart-cts-rts   Get, enable/disable UART hardware flow control
 | 
					    uart-cts-rts   Get, enable/disable UART hardware flow control
 | 
				
			||||||
    tempsensor     Get or set the IRC emulation enable/address of the
 | 
					    tempsensor     Get or set the IRC emulation enable/address of the
 | 
				
			||||||
                   temperature sensor.
 | 
					                   temperature sensor.
 | 
				
			||||||
| 
						 | 
					@ -48,7 +52,7 @@ Shows general device information. No other arguments required. Example:
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
$ ./dpctl.sh get-device-info
 | 
					$ ./dpctl.sh get-device-info
 | 
				
			||||||
CMSIS-DAP (RP2040 Pico): protocol version: 00.10, currently in mode 1 (Default mode with misc features)
 | 
					CMSIS-DAP (RP2040 Pico): protocol version: 00.10, currently in mode 1 (Default mode with misc features)
 | 
				
			||||||
available modes: 1, 4
 | 
					available modes: 1, 3, 4
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### get-mode-info
 | 
					#### get-mode-info
 | 
				
			||||||
| 
						 | 
					@ -57,14 +61,15 @@ Gets info of a specific mode. An extra mode number can be specified, but it defa
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
$ ./dpctl.sh get-mode-info 
 | 
					$ ./dpctl.sh get-mode-info 
 | 
				
			||||||
mode 1: Default mode with misc features: version 00.10 with features 1, 2, 3, 4
 | 
					mode 1: Default mode with misc features: version 00.10 with features UART, CMSIS-DAP, SPI, I2C, temperature sensor
 | 
				
			||||||
$ ./dpctl.sh get-mode-info 4
 | 
					$ ./dpctl.sh get-mode-info 3
 | 
				
			||||||
mode 4: SUMP logic analyzer mode: version 00.10 with no features 
 | 
					mode 3: JTAG (etc) pinout scanner: version 00.10 with features JTAG, SWD
 | 
				
			||||||
$ ./dpctl.sh get-mode-info 42
 | 
					$ ./dpctl.sh get-mode-info 42
 | 
				
			||||||
No mode 42 available
 | 
					No mode 42 available
 | 
				
			||||||
$ ./dpctl.sh get-mode-info all
 | 
					$ ./dpctl.sh get-mode-info all
 | 
				
			||||||
mode  1: Default mode with misc features: version 00.10 with features 1, 2, 3, 4
 | 
					mode  1: Default mode with misc features: version 00.10 with features UART, CMSIS-DAP, SPI, I2C, temperature sensor
 | 
				
			||||||
mode  4: SUMP logic analyzer mode: version 00.10 with no features 
 | 
					mode  3: JTAG (etc) pinout scanner: version 00.10 with features JTAG, SWD
 | 
				
			||||||
 | 
					mode  4: SUMP logic analyzer mode: version 00.10 with features SUMP
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### set-mode
 | 
					#### set-mode
 | 
				
			||||||
| 
						 | 
					@ -75,6 +80,47 @@ This subcommand changes the device mode. Do note that this causes the device to
 | 
				
			||||||
$ ./dpctl.sh set-mode 4
 | 
					$ ./dpctl.sh set-mode 4
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Mode 0 is a special meaning to switch the device into (chip/board-specific) bootloader mode.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### bootloader
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This is a shorthand for `dpctl set-mode 0`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Persistent storage subcommands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### storage-info
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Shows the header information of the persistent storage. Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					$ ./dpctl.sh storage-info
 | 
				
			||||||
 | 
					magic: OK, version=0010, current mode=1, #modes=2, DJB2(table)=780903137
 | 
				
			||||||
 | 
						mode 1 version 0010: 0x1ff000..+0x2, DJB2=6220460
 | 
				
			||||||
 | 
						mode 4 version 0010: 0x1ff020..+0x1, DJB2=182954
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### storage-get
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Gets the data blob of a specified mode. Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					$ ./dpctl.sh storage-get 1
 | 
				
			||||||
 | 
					b'\x00\x18'
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### storage-flush
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Saves data to the persistent storage when changed. Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					$ ./dpctl.sh storage-flush
 | 
				
			||||||
 | 
					storage saved
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# immediately afterwards:
 | 
				
			||||||
 | 
					$ ./dpctl.sh storage-flush
 | 
				
			||||||
 | 
					no write needed
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Mode 1-specific subcommands
 | 
					### Mode 1-specific subcommands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### uart-cts-rts
 | 
					#### uart-cts-rts
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue