Timestamp Data in nRF5340

Hi,

I wanted to time stamp data which is sent via Bluetooth connection. Is there any pre defined functions to do that. Also please suggest any modifictions to be done in proj.config file too.

Expected format:

Hours:minutes:seconds   Data

Regards

Karthik Kumar

Parents
  • Hi Simonr,

    Thank you for the response.

    I followed the function you suggested me. But not able to print the time.

            uint32_t time;
            time = k_cycle_get_32(void);
            printk("%d", time/32768);
     
    I'm working with peripheral_uart and central_uart examples. Where data is sent from perpherial to central, I tried to time stamp data in central. Can you suggest me where exactly the change has to be made.
    Regards
    Karthik Kumar
Reply
  • Hi Simonr,

    Thank you for the response.

    I followed the function you suggested me. But not able to print the time.

            uint32_t time;
            time = k_cycle_get_32(void);
            printk("%d", time/32768);
     
    I'm working with peripheral_uart and central_uart examples. Where data is sent from perpherial to central, I tried to time stamp data in central. Can you suggest me where exactly the change has to be made.
    Regards
    Karthik Kumar
Children
No Data
Related