This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_LOG_INFO and uint64_t

Why does the first NRF_LOG_INFO print incorrectly?

uint64_t timestamp = 1422028920000;
NRF_LOG_INFO("timestamp 0: %" PRIu64 "", timestamp);

char buffer[32];
snprintf(buffer, sizeof(buffer), "%" PRIu64 "", timestamp);
NRF_LOG_INFO("timestamp 1: %s\n", buffer);

Output: ?ذ: timestamp 0: 394745024 ?ذ: timestamp 1: 1422028920000

Related