Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
Debug and Test Interface

Both the PRU and PTU output debug information via UART and include a UART test interface which can be used to reset the device as well as overriding the values being written/read to/from the HAL. The debug output can be turned off by removing the compiler define DEBUG_OUT_ENABLE.

The UART has the following configuration. Note that the pins and baud rate are configurable through hal_uart_init() in nrf_uart.c. Also note that, by default, the selected UART pins are directly routed through to the USB COM port on the pca10028 development kit.

Parameter Value
RXD pin 11
TXD pin 9
Baud rate 460800
Data bits 8
Parity None
Stop Bits 1
Handshaking RTS/CTS

PTU commands

When a character is received on the UART, it will trigger the following behaviour:

ptu_debug.png
PTU Debug Overview
WPT Command nameDescriptionSign to send through UARTTest-mode required
ResetPTU resetzno
Inc VTXIncreases value of VTX by a constant incrementyyes
Dec VTXDecreases value of VTX by a constant increment hyes
Inc ITXIncreases value of ITX by a constant incrementuyes
Dec ITXDecreases value of ITX by a constant incrementjyes
Inc temperatureIncreases value of temperature by a constant incrementiyes
Dec temperatureDecreases value of temperature by a constant incrementkyes
Enable test-modeEnables test-modeono
Disable test-modeDisables test-modelno
TX power set to -40dBmSets antenna TX power to -40dBmnno
TX power set to OUTPUT_TX_POWERSets antenna TX power to OUTPUT_TX_POWER (defined in PTU config)mno
Toggle beacon debugToggles beacon debug printing. s - short beacon start, l - long beacon start, e - beacon end. Will only be active in Power Save statebyes
Set Load Variation DetectedWill only be set for 1.5 secondsvyes
Resonator ONEnables PTU resonator2yes
Resonator OFFDisables PTU resonator3yes
Inc poweramp levelIncreases power amplifier level by a constant increment4yes
Dec poweramp levelDecreases power amplifier level by a constant increment5yes
UART checkPrint "ptu"6no
Get number of registry itemsPrints the result of ptu_reg_n_enties_get7no
Enter DFU ModeReboots device into DFU mode. Will only work is bootloader is flashed to device and application is build using DFU target.8

no

PRU commands

When a character is received on the UART, it will trigger the following behaviour:

pru_debug.png
PRU Debug Overview
WPT Command nameDescriptionSign to send through UARTTest-mode required
ResetPRU resetzno
Set power adjustedSet power adjusted bit qyes
Clear power adjustedClear power adjusted bit ayes
Inc VRECTIncreases value of VRECT by a constant incrementyyes
Dec VRECTDecreases value of VRECT by a constant increment hyes
Inc IRECTIncreases value of IRECT by a constant incrementuyes
Dec IRECTDecreases value of IRECT by a constant increment jyes
Inc VOUTIncreases value of VOUT by a constant incrementryes
Dec VOUTDecreases value of VOUT by a constant increment fyes
Inc IOUTIncreases value of IOUT by a constant incrementwyes
Dec IOUTDecreases value of IOUT by a constant increment syes
Inc TEMPIncreases value of temperature by a constant incrementiyes
Dec TEMPDecreases value of temperature by a constant incrementkyes
Vrect to PRU_VRECT_UVLOSets VRECT to PRU_VRECT_UVLO (defined in PRU config)1yes
Vrect to PRU_VRECT_BOOTSets VRECT to PRU_VRECT_BOOT (defined in PRU config)2yes
Vrect to PRU_VRECT_MINSets VRECT to PRU_VRECT_MIN (defined in PRU config)3yes
Vrect to PRU_VRECT_HIGHSets VRECT to PRU_VRECT_HIGH (defined in PRU config)4yes
Vrect to PRU_VRECT_MAXSets VRECT to PRU_VRECT_MAX (defined in PRU config)5yes
UART checkPrint "pru"6no
Enter DFU ModeReboots device into DFU mode. Will only work is bootloader is flashed to device and application is build using DFU target.8no
Charge completeSets charge complete indicator to truenyes
Charge incompleteSets charge complete indicator to falsemyes
Wired charger onSets wired charger connected indicator to truetyes
Wired charger offSets wired charger connected indicator to falsegyes
Enable test-modeEnables test-modeono
Disable test-modeDisables test-modelno
Reboot bit set to 1Sets reboot bit to trueeyes
Reboot bit set to 0Sets reboot bit to falsedyes
Send Slave Security RequestPRU sends security requestxyes
3s Mode Transition AddrIssue 3s Mode Transition Alert with non-null Address eno
6s Mode Transition AddrIssue 6s Mode Transition Alert with non-null Address Eno
3s Mode Transition nullIssue 3s Mode Transition Alert with null Address dno
6s Mode Transition nullIssue 6s Mode Transition Alert with null Address Dno
Toggle packet transmissionDisable/Enable all packet transmission from PRU. To re-enable packet transmission, 'Enable test mode' needs to be calledvyes