Data Logging

Hi,I am using NRF5340 ,I want to log data of 2 channels of mic with sampling rate of 16000 but while logging I am receiving "120 messages dropped" and with some random numbers if I change configurations.

CONFIG_I2S=y
CONFIG_I2C=y

CONFIG_LOG_PRINTK=y

CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG=y
CONFIG_LOG_MEM_UTILIZATION=y

CONFIG_LOG_MODE_OVERFLOW=n
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=65536
CONFIG_LOG_BUFFER_SIZE=65536

CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048

Parents Reply Children
  • Yes,I set to 128 MHZ ,I cant see any messages dropped error .But when I am logging data and converting to audio file ,i can see some data is missing.I have played numbers which says at each second in mic ,I can see 11 numbers played in 9 seconds itself.Will this can be solved any issue in logging speed clocks?can we increase that clocks?

  • Hi,

     

    It does sound like you are missing data, especially on '14' and possibly on '7'.

    Have you considered using usb as the loopback instance instead?

     

    Also, if you use an external debugger (JLink Base compact for instance), you can increase the SWD speed, for more throughput on the actual reads from the JLink debugger itself.

     

    Kind regards,

    Håkon

  • Have you considered using usb as the loopback instance instead?

    what does it refer?

    Also, if you use an external debugger (JLink Base compact for instance), you can increase the SWD speed, for more throughput on the actual reads from the JLink debugger itself

    I am using same jlink  base compact at max speed even though i am getting same audio mismatch.Audio is not missing at end it's missing between the data.If it's sampling at 16000 ,how data logging is missing in between,it should go one by one?I am not sure how data log works.I am using SEGGER_RTT_PRINTF.I thought to use SEGGER_RTT_WRITE ,I am getting data like(

    ù
    ûù
    Æù
    ºù
    ¾ù
    4ù) but converting it to wave getting only noise.
    static void copyBuffer(int32_t *Buff_In,int16_t *Buff_Out,uint16_t number_of_samples)
    {
    	int i=0;
    	
    	for( i = 0; i < number_of_samples; i++) 
    	{
    		Buff_Out[i]= (Buff_In[i]>>16);
    		
    		// printk("%hx %hx\n",bellMicData,ancMicData);
    		 SEGGER_RTT_printf(0,"%d\n",Buff_Out[i]);
     		// SEGGER_RTT_Write(0,(const void*) &Buff_Out[i], 2);
    	}
    	// SEGGER_RTT_Write(0,&newline,1); 
     }
    while rearding one mic i didnt got issue,on logging two only i am getting issue
  • Hi,

    Kashyap23 said:
    what does it refer?

    To use USB with an audio class to send/receive audio.

     

    I think you're sending it as raw data now:

    Kashyap23 said:

    am using same jlink  base compact at max speed even though i am getting same audio mismatch.Audio is not missing at end it's missing between the data.If it's sampling at 16000 ,how data logging is missing in between,it should go one by one?I am not sure how data log works.I am using SEGGER_RTT_PRINTF.I thought to use SEGGER_RTT_WRITE ,I am getting data like(

    ù
    ûù
    Æù
    ºù
    ¾ù

    echo -n "ùûùÆùwùmù^ù?ùeùºù¾ùcù7ùTùPù" | xxd
    00000000: c3b9 c3bb c3b9 c386 c3b9 77c3 b96d c3b9  ..........w..m..
    00000010: 5ec3 b93f c3b9 65c3 b9c2 bac3 b9c2 bec3  ^..?..e.........
    00000020: b963 c3b9 37c3 b954 c3b9 50c3 b9         .c..7..T..P..
    

     

    You need to remove the delimiter \n to listen back to the data.

     

    Kind regards,

    Håkon

  • yes,I am trying with raw as I am missing data.By using raw data converting to wav file giving noise.I followed your step and logged data.

    rwData.txt

Related