-
I'm trying to add a log message to the Here is what the logs look like. I sent characters at first and then stopped after the second log line appeared. I waited a few seconds, and then started sending characters again, which made the last two log lines appear.
I have tried On the off-chance that it's relevant, I'm using non-default pins for UART0, set to pins 12 and 13 in a pinctrl dtsi file. What causes a long Project config:
Modified blinky sample: #include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(logs);
#define SLEEP_TIME_MS 3000
#define LED0_NODE DT_ALIAS(led0)
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
int main(void)
{
int ret;
if (!gpio_is_ready_dt(&led)) {
return 0;
}
ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
if (ret < 0) {
return 0;
}
uint32_t i = 0;
while (1) {
ret = gpio_pin_toggle_dt(&led);
if (ret < 0) {
return 0;
}
const int32_t now = k_uptime_get_32();
LOG_INF("Hello! %u %d", i, now);
i++;
k_msleep(SLEEP_TIME_MS);
}
return 0;
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Would you mind sharing it? |
Beta Was this translation helpful? Give feedback.
-
Solved! The whole problem was an issue with the firmware in the Raspberry Pi Debug Probe I am using for UART. Switching to another USB-serial adapter made the issue go away. There was a fix for this issue, so I just need to update my Debug Probe firmware. |
Beta Was this translation helpful? Give feedback.
Solved! The whole problem was an issue with the firmware in the Raspberry Pi Debug Probe I am using for UART. Switching to another USB-serial adapter made the issue go away. There was a fix for this issue, so I just need to update my Debug Probe firmware.