Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
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 |
When a character is received on the UART, it will trigger the following behaviour:
WPT Command name | Description | Sign to send through UART | Test-mode required |
Reset | PTU reset | z | no |
Inc VTX | Increases value of VTX by a constant increment | y | yes |
Dec VTX | Decreases value of VTX by a constant increment | h | yes |
Inc ITX | Increases value of ITX by a constant increment | u | yes |
Dec ITX | Decreases value of ITX by a constant increment | j | yes |
Inc temperature | Increases value of temperature by a constant increment | i | yes |
Dec temperature | Decreases value of temperature by a constant increment | k | yes |
Enable test-mode | Enables test-mode | o | no |
Disable test-mode | Disables test-mode | l | no |
TX power set to -40dBm | Sets antenna TX power to -40dBm | n | no |
TX power set to OUTPUT_TX_POWER | Sets antenna TX power to OUTPUT_TX_POWER (defined in PTU config) | m | no |
Toggle beacon debug | Toggles beacon debug printing. s - short beacon start, l - long beacon start, e - beacon end. Will only be active in Power Save state | b | yes |
Set Load Variation Detected | Will only be set for 1.5 seconds | v | yes |
Resonator ON | Enables PTU resonator | 2 | yes |
Resonator OFF | Disables PTU resonator | 3 | yes |
Inc poweramp level | Increases power amplifier level by a constant increment | 4 | yes |
Dec poweramp level | Decreases power amplifier level by a constant increment | 5 | yes |
UART check | Print "ptu" | 6 | no |
Get number of registry items | Prints the result of ptu_reg_n_enties_get | 7 | no |
Enter DFU Mode | Reboots device into DFU mode. Will only work is bootloader is flashed to device and application is build using DFU target. | 8 | no |
When a character is received on the UART, it will trigger the following behaviour:
WPT Command name | Description | Sign to send through UART | Test-mode required |
Reset | PRU reset | z | no |
Set power adjusted | Set power adjusted bit | q | yes |
Clear power adjusted | Clear power adjusted bit | a | yes |
Inc VRECT | Increases value of VRECT by a constant increment | y | yes |
Dec VRECT | Decreases value of VRECT by a constant increment | h | yes |
Inc IRECT | Increases value of IRECT by a constant increment | u | yes |
Dec IRECT | Decreases value of IRECT by a constant increment | j | yes |
Inc VOUT | Increases value of VOUT by a constant increment | r | yes |
Dec VOUT | Decreases value of VOUT by a constant increment | f | yes |
Inc IOUT | Increases value of IOUT by a constant increment | w | yes |
Dec IOUT | Decreases value of IOUT by a constant increment | s | yes |
Inc TEMP | Increases value of temperature by a constant increment | i | yes |
Dec TEMP | Decreases value of temperature by a constant increment | k | yes |
Vrect to PRU_VRECT_UVLO | Sets VRECT to PRU_VRECT_UVLO (defined in PRU config) | 1 | yes |
Vrect to PRU_VRECT_BOOT | Sets VRECT to PRU_VRECT_BOOT (defined in PRU config) | 2 | yes |
Vrect to PRU_VRECT_MIN | Sets VRECT to PRU_VRECT_MIN (defined in PRU config) | 3 | yes |
Vrect to PRU_VRECT_HIGH | Sets VRECT to PRU_VRECT_HIGH (defined in PRU config) | 4 | yes |
Vrect to PRU_VRECT_MAX | Sets VRECT to PRU_VRECT_MAX (defined in PRU config) | 5 | yes |
UART check | Print "pru" | 6 | no |
Enter DFU Mode | Reboots device into DFU mode. Will only work is bootloader is flashed to device and application is build using DFU target. | 8 | no |
Charge complete | Sets charge complete indicator to true | n | yes |
Charge incomplete | Sets charge complete indicator to false | m | yes |
Wired charger on | Sets wired charger connected indicator to true | t | yes |
Wired charger off | Sets wired charger connected indicator to false | g | yes |
Enable test-mode | Enables test-mode | o | no |
Disable test-mode | Disables test-mode | l | no |
Reboot bit set to 1 | Sets reboot bit to true | e | yes |
Reboot bit set to 0 | Sets reboot bit to false | d | yes |
Send Slave Security Request | PRU sends security request | x | yes |
3s Mode Transition Addr | Issue 3s Mode Transition Alert with non-null Address | e | no |
6s Mode Transition Addr | Issue 6s Mode Transition Alert with non-null Address | E | no |
3s Mode Transition null | Issue 3s Mode Transition Alert with null Address | d | no |
6s Mode Transition null | Issue 6s Mode Transition Alert with null Address | D | no |
Toggle packet transmission | Disable/Enable all packet transmission from PRU. To re-enable packet transmission, 'Enable test mode' needs to be called | v | yes |