Skip to content

Example zephyr-battery does not output anything to the serial monitor #15

@msfujino

Description

@msfujino

I uploaded the "zephyr-battery" sample to the XIAO_nRF54L15 using VS Code + PlatformIO, but nothing is output to the serial monitor.

So, as a test, I made modifications to prj.conf and main.c, referencing "zephyr-adc".

CONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_LOG=y
CONFIG_LOG_PRINTK=y
CONFIG_LOG_MODE_IMMEDIATE=y

#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(battery, CONFIG_LOG_DEFAULT_LEVEL);

After the changes, output appears in the serial monitor:

*** Booting Zephyr OS build zephyr-v40100 ***
bat vol = 4030 mV

Please tell me what the problem is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions