Hi Mihai,
I’m currently facing several issues while setting up UART communication and debug logging for the JN5189 in my OpenThread Border Router (OTBR) environment. I’ve detailed the points below:
1) When I use the LPC-LINK2 port (even without the debugger, solely for UART communication), I encounter HDLC parse errors or framing errors shortly after launching the otbr-agent. In contrast, using the FTDI-USB UART interface works reliably, and the agent maintains communication unless exposed to heavy command loads.
I have attached the jumper setting when using the LPC-LINK2 port. (Refer to the attached image : Jn5189_Debug_port_jumper_config_.png)
2) I attempted to enable debug logs via USART1 (TX/RX on pins 10/11), considering the compatibility between K32W0 and JN5189. However, when I connect a USB-UART adapter and monitor the output via Minicom, no logs are displayed. Also, the otbr-agent fails to receive messages and eventually times out.
Here’s what I’ve modified so far:
In jn5189-sdk-config.h:
#define UART_USE_DRIVER 1
#define UART_USE_SERIAL_MGR 0
#define UART_USE_DRIVER_LOG 1
#define UART_USE_SERIAL_MGR_LOG 0
#define UART_USE_SWO_LOG 0
Added the following to the CMake config:
option(OT_DEBUG_CONSOLE_ENABLE "Enable debug console on gOtLogUartInstance" ON)
if (OT_DEBUG_CONSOLE_ENABLE)
target_compile_definitions(${NXP_DRIVER_LIB}
PUBLIC
-DgUartDebugConsole_d=1
)
endif()
In the build_jn5189 script, under OT_OPTIONS, I added:
-DOT_DEBUG_CONSOLE_ENABLE=ON
Despite these changes, no output is observed on USART1, and OTBR communication fails.
3) Is it possible to capture SWO debug logs using Minicom or similar terminal applications? If not, what tool or method is recommended for viewing SWO output on JN5189?
4) While creating the project and setting the RAM regions via:
-> Project → Properties → C/C++ Build → MCU Settings → JN5189 → Apply & Close
-> I noticed a mismatch between the RAM boundary values shown in the IDE and those defined in the linker script.
In the IDE: (Refer to the attached image :JN5189_Mem_Layou_Ide.png)
RAM0: 0x4000000, Size: 0x15FE0
RAM1: 0x4020000, Size: 0x10000
In the jn5189 linker script (src/k32w0/jn5189/jn5189.ld) :
RAM0: 0x4000400, Size: 0x0015C00
RAM1: 0x4020000, Size: 0x10000
Which of these memory configurations should be considered correct? Should we align the IDE settings with the linker script, or vice versa?
BR,
Vikash

