JL Jieli AC696N Series Chip Debugging Tool: UART Serial Print Configuration and Online Tuning
Introduction
The serial port is truly the "eyes" of a developer – that statement is no exaggeration. In embedded debugging, if you can't get logs out, it's like working blindfolded.
The UART configuration on the JL Jieli AC696N is quite flexible. The debug print pin can be mapped arbitrarily, and the baud rate can be pushed up to 1M, making debugging very smooth. However, many beginners overlook one point: the serial port can not only output logs, but also connect to a PC tool for online tuning of audio effects. Parameters like EQ and DRC can be adjusted in real time without recompiling and flashing – you can hear the effect immediately.
After tinkering with the AC696N development board, I've sorted out the configuration for both functions so I don't have to dig through the code every time.
I. Configuring Serial Print
In the board-level configuration header file (e.g., board_ac696x_demo_cfg.h), locate the UART0 configuration.
Modify the following macros:
#define TCFG_UART0_ENABLE ENABLE_THIS_MOUDLE // Enable
#define TCFG_UART0_TX_PORT IO_PORTA_05 // TX pin (changeable)
#define TCFG_UART0_BAUDRATE 1000000 // Baud rate (1Mbps)
In app_config.h, control the master print switch and verbosity level.
II. Implementing Online Tuning (No Recompilation Needed)
In lib_system_config.c, enable the effect tool and UART communication:
#define TCFG_EFFECT_TOOL_ENABLE ENABLE_THIS_MOUDLE
#define TCFG_COMM_TYPE COMM_UART
Specify the UART TX/RX pins for debugging.
Use the PC tool provided by Jieli to connect, and you can adjust EQ, DRC and other audio parameters in real time – the effect is immediate.
III. UART Communication Demo
The SDK provides a uart_test.c example that shows how to initialize an independent communication UART for data sending/receiving, which is very suitable for communicating with external MCUs or modules.
Summary
For serial print, I recommend setting the baud rate directly to 1M. The logs will stream quickly and debugging won't stutter.
The online tuning feature is a highlight of the Jieli solution. It's extremely efficient when developing audio products – tuning parameters while listening to the effect is far more efficient than modifying code, flashing, and listening repeatedly. It's best to use two separate UARTs for debug prints and tuning to avoid log messages interfering with tuning commands.
The default pin configuration on the AC696N development board can be used as a reference. But if you design your own PCB, remember to bring out the debug port – otherwise you'll be helpless when issues arise.
评论
发表评论