Close

Successfully decoding packets

A project log for ESP32 AX.25/APRS TNC

A minimal-parts AX.25 / APRS TNC that can pair with a phone.

EvanEvan 07/26/2019 at 21:580 Comments

Via a dirty patch to LibAPRS that removes or emulates all Arduino-specific APIs, I was able to get packets decoding correctly.

The adc1_get_raw is the most straightforward way to sample from the ADC, but is not ideal:

The datasheet mentions that the ADC can run at 200ksps when controlled by the RTC controller (I'm not sure what the DIG controller is). What gives?

Well, it turns out you can instruct the i2s peripheral to sample from the internal ADC, and write samples into a buffer using DMA.

In my patched LibAPRS, I disable the interrupt code that executes every 9600th of a second, and then in my application I call AFSK_adc_isr repeatedly, once we have a buffer full of audio.

This works well, though it does mean I don't process packets until my radio's squelch closes. I think I may be able to refactor this to process smaller buffers as they come in.

Discussions