The text is in cBuffer, which you can view or print out. If you want binary data then use RTOS - uxTaskGetSystemState() instead.
Also, your “get counter value” function is just incrementing a variable, whereas it should be returning the current count of a hardware timer, or at least a fast periodically incrementing variable.
The printf does not work. The question remain same how can I get buffer of unsigned Char in to a format which shown in RTOS example with Abs and %Time?
Can you elaborate on “printf doesn’t work. If you call printf(“hello”) does hello print out? If not then it sounds like printf is not directing the output to wherever you want it to go, so you would need to fix that first.