22 Debug
Mark Thompson edited this page 2024-03-21 23:46:01 -05:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Memory Usage

Gives the information on the memory used by M0 core.

SCR_0056

SD Card

Gives information on the SD card and allows it to be tested.

SCR_0085

Peripherals

Gives information on the peripherals:

  • RFFC5072
  • MAX2837
  • SI5351C
  • WM8731 or Ak4951 (depending on the IC audio codec detected in your PP brd)

DD1FEF74-140D-4B9E-B86C-B658B035919D

00403D10-E202-4014-A4C5-B36A216AC548

Note : Recently (Manufacturing year: 2023) GSG introduced the new r9 Hackrf board version (already compatible with Hackrf and Portapack-Mayhem fw's).

image

That new Hackrf board revision r9 has two 2 ICs changes:

  • MAX2837 was replaced by MAX2839.
  • Si5351C was replaced by Si5351A with additional clock distribution. A series diode was added to the antenna port power supply.

Starting with HackRF One r6, hardware revisions are detected by firmware and reported by hackrf_info.

Thanks to GSG developers and our Mayhem git admin , we merged their commit about all those r9 hw support in our Portapack Mayhem Debug menu tool. And now you can also easily detect that r9 version without disassembling the boards :

image

Individual registers of each peripheral IC can be read or written with this application. If the peripheral has more registers than fits on the screen, the encoder dial can be turned when the Update button is highlighted to view the additional registers. Care should be taken when writing, as it may be possible to cause hardware damage by writing to some memory locations.

SCR_0050 SCR_0051

Temperature

Data is provided by the MAX 2837 (or MAX 2839) on chip digital temperature sensor. The accuracy is quoted as 4.33°C per value.

SCR_0052

Buttons Test

This shows when either the buttons are pressed, the encode knob is turned or the screen is touched. It can also show if the encoder when turned is cleanly stepping the states as it is turned. Encoder sensitivity is now adjustable in Settings, and the encoder can be desoldered and replaced with a better-quality version if it has issues. The test screen also has an option for testing the "long press" feature which is applicable to the directional keys and the DFU switch only.

SCR_0013

Touch Test

Allows testing the Touch Screen calibration (and your artistic skill) by drawing on the screen using a stylus.

SCR_0058

The following controls are available:

  • Select key returns to Debug menu.
  • Left key changes the pen to a random color (hold in the button to rotate through them faster); this can also be done while drawing.
  • Down key clears the screen to a random color (like shaking your Etch-a-Sketch).
  • Turning the Encoder dial changes the pen size.

To save your masterpiece, note that the screen-shot icon is still active but hidden (it will become visible if that precise spot of the Touch Screen is pressed). Try the Settings -> Touch app for improving calibration of your touchscreen.

Pers. Memory

Displays the contents of the persistent memory area. (256 bytes)

SCR_0053

It is split into three pages, pages can be changes with the encoder and the current offset from the start of p.mem area is displayed in the left column.

At the bottom it displays also the current size of the data_t struct (this is what we persist into p.mem) and the currently stored checksum (it is calculated from the first 252 bytes of the p.mem area when changes are made to the settings and then written to the last 4 bytes of p.mem)

The version of the stored config isn't displayed separately but it can be seen as the first 4 bytes of the p.mem area.

Debug Dump

Writes a file containing debug information to the DEBUG folder.

Memory Dump

Allows a region of memory to be saved to a file in the DEBUG folder in hexadecimal ASCII format, and allows direct read/write access to specified memory locations for debug purposes. Memory addresses should be a multiple of 4 to avoid causing a fault. Care should be taken when writing, as it may be possible to cause hardware damage by writing to some memory addresses.

SCR_0049

M0 Stack Dump

Writes a file containing M0 stack contents to the DEBUG folder.

Font Viewer

Displays the 5x8 and 8x16 font character sets.

SCR_0055

Audio Test

Generates a sine wave beep of the specified frequency and duration (0 means an infinite duration) to test the audio output and speaker/headphones frequency response.