Hello -
I am trying to print a 64-bit unsigned integer (uint64_t) to a CLI output. I've based this on the CLI examples in SDK 17.0.2. Specifically this is the function I am trying to execute:
nrf_cli_fprintf(p_cli, NRF_CLI_NORMAL, "Serial Number\t%llu\r\n", ser_num);
I've verified that the variable "ser_num" of type uint64_t has the correct value when stepping through the code. However the CLI is always printing the wrong value to the screen. By further stepping through the code I am able to determine that the root cause appears to be in the lower level function "nrf_fprintf_fmt" in nrf_fprint_format.c. If you inspect this function it appears to "filter out the length modifier" in lines 694-708, then will only integers of max size uint32_t in the subsequent lines.
My question is... what is the preferred method to print a 64-bit integer to the CLI? Is there an alternative to nrf_cli_fprintf() for this case?
Thank you for your support.
Regards,
Kevin Murphy