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

nRFX based PDM to PCM implementation (I2S example)

Hello,

I am currently interfacing my nRF52840 DK with i2S based MP34DT05 sensor. I am using nrfx i2s driver's for interfacing with sensor. I am using master clk of 2MHz, LCLK 16KHZ. 

My sensor output PDM data. In my project I am recording audio samples on left channel, so I am currently getting 2*16bit of left data per 32bits as shown in nrf docs. I have got 16bit recorded samples in buffer, but to how to convert this pdm data in pcm format. 

Normally we need to divide the PDM data with a decimation factor, but in I2S we already are dividing the bit sampling rate with ratio value. So is the output from the I2S itself is decimated PCM ?  

Or can anyone give a example of how to convert the PDM to PCM data. Any sort of help is dually appreciated. 

Parents
No Data
Reply
  • The UART baud rate might be an issue here. The default is 115200 baud, while your audio is 16-bit * 16 kHz = 256000. To test if this is the problem, you can try setting the board baud rate to 1000000 instead of 115200.

    Okay, I have changed the values in nRF DK to and on terminal side, but the output audio isn't that proper.

    Here is the PCM and .wav file generated at the recommended baud rate. If you hear audio file it seems that the audio is overlapping I guess. So can I reduce the DMA buffet size, which value can be ideal ? Currently it was 30K buffer size which I think can be the issue. If I reduce the buffer size the overlapping can be reduced I guess. Also my current sampling rate is 16k , should I alter with that ?

    8053.nights.txt

    And can you help me in a work around over PDM handler. While using EASY DMA works in background, so can't we start writing to terminal  after a buffer is requested itself (with baud rate between 115200 - 200000), like the example shown in below link. Although he is using FATFS, can't i implement the same logic of data handling ? 

    https://devzone.nordicsemi.com/f/nordic-q-a/63545/pdm-simple-example

    void nrfx_pdm_event_handler(nrfx_pdm_evt_t const * p_evt)
    {
        if(p_evt->buffer_requested)
        {
          if(!flag){
            printk("pass buff1\r\n");
             nrfx_pdm_buffer_set(buff1, 1024);
             flag = true;
             write_data = true;
           }
           else{
            printk("pass buff2\r\n");
             nrfx_pdm_buffer_set(buff2, 1024);
             flag = false;
             write_data = true;     
           }
        }
        if(p_evt->buffer_released != 0)
        {
          //write_data = true;
        }
    }
    
    
    //WHile loop in main
        while(1)
      {
      
        while(!write_data){
          k_sleep(K_MSEC(100));
        }
        
        write_data = false;
    
    /*
        ret = nrfx_pdm_stop();
        if(ret != NRFX_SUCCESS){
          printk("Error Init\r\n");
        }
    */
    
        if(flag)
        {
            printk("Displaying buffer1\r\n"); 
    
            for(int i=0; i<1024;i++)
            {
              printk("%4x, ", buff1[i]);
            }
            printk("\r\n\r\n");
            //write_data = 0;
        }
        else
        {
           printk("Displaying buffer2\r\n"); 
            for(int i=0; i<1024;i++)
            {
              printk("%4x, ", buff2[i]);
            }
            printk("\r\n\r\n");
            //write_data = 0;    
        }

    When i try to implement above logic as given in fatfs+pdm example, my buffers are not getting printed in sequence. Some times a series of buffer sequence gets printed (like 2-3 times buffer 1 get printed with new values) than buffer 2 (with new values). In ideal scenario, it should be printed alternatively.

    Terminal Output

    a5, fecb, fd90, fd7f, fbec,  300, fb0c,   f7, fdc8, fbd4, feda, f80b,  620, ffd0,  45d, ff5b,  1cc,    6,  927, fd6f, fc15, ff63, fb87, ff32, fb48,  422,  566,  4c6,  10c, f8c8,  5ec, fe4a,  253,  159, fbb4, fe0a,   e6, fd47,  1cc,  147,  382,   bb, fdf1,  338,   8f, fa08,  3ca, fdce, f864,  3cf,    e,  6fa, fdae,  2ca,  8d0, fd0f, fdac, ff47,  203,  1f1,   59,  518,  4ae, fbdf,  1ea,  15b,   19,  365,  102,  4ce,  140,  3ff, fd1e,   92,  352, fccb,  273, fcfa,  317, ff58, fd40, fab5,  224,  54f, fb8a,  40d,  267,  685, ff0d,  4cc, fd2f,  4ad,  18a, fc38, ff4e,  661,  39b, fecb,    3, f636,  303,   77,  18d,  57d,  4cc, fcd1,  6f0, f98c, fa80,  6e4,   36,   d8,   28, ff1d,  13e,  1fd, fb3e, fdcd, feda, fc88, fe19,  1fb,  444,  54b,  163, ff31,   57,  3a6,  1cb, f908, ffa9, fe6f,  229,  841, f993, fffb, fca4, fc63, fc43, ff04,  2c1, fc18, fbf0, f8c1, fea3,  214,  153, fc82,  3d5,  3cb, fc55, fd55,  2b0,  27e,    5, fc8c, ␍␍␊
    [16:13:38:775] ␍␍␊
    [16:13:38:775] Displaying buffer2␍␍␊
    [16:13:38:775] f905, fa4d,  553, fea9, f8f1, ffbc,  5f1,  27c, ffcc, fc7e,  3248,   3f,   69,   fd,  32b,  325,  282,   45, ff53,   d2,  1d0,  240,  305,  24c,  155,  1cb,  363,  568,  7e9,  718,  5d9,  415,  2d7,  3a4,  538,  739,  6f4,  6af,  623,  678,  889,  83b,  6cb,  54d,  3fa,  42e,  32f,   b0, fe6b, ff95,  16c,  187,  142,  243,  36c,  456,  1e2, fe87, fd95, ff0e, ff2b, feef, fedc, fe0c, fef9,   16,  157,   ff,  1ee,  2e5,  12d,  18d,  2dd,  48b,  453,  276,  2ee,  215,  152,   63,   dd,  27b,  529,  636,  6e0,  6bc,  537,  363,  1ed,   80, ff3d, ff44, ff01, fe05, fe86, fecb, ff91,   98,  12d,   bd,   61,  190,  178,   83, ffec,   50,  197,  1f9,  21f,  117,  106,  133,  133,   9d, ffdc, ffe0, ffa2, ff17, ff3e,   36,  129,  238,  18b,  2ca,  2e2,  3d4,  449,  44e,  37c,  186,   ff,  245,  34b,  3cb,  384,  200,  145,   d3,  13c,  12c,   c4,  153,  181,   bf,   61,   2b,   7f,    f, ff2c, fe1c, fdab, fe84, fe5e, ff16,   35, ff53, ff8c,  10e,  17b,   bd,   e6,   d6, fff6, fe68, fda7, fefb, ffa9, fe63, fd10, fd50, fc82, fb89, faea, fa43, fa5f, fa33, fae7, fbd9, fce1, fe37, fe3e, fe33, fd71, fd33, fd76, fe63, ff24,   d3,   a8, ff9d, ff6d, ff06, ff58, ff0a, ffaa, fed7, fcfe, fc62, fb4d, fa11, fa0f, f95d, f97d, fa13, fbcb, fc87, fc3a, fbb5, fcbb, ff2e, ff91, ffd9, fff6, fe09, fe2c, fee9, ffb5,   ac,  15a,  1a2, fe8d, fe60, fd61, fbcd, fae9, fc0f, fd5a, fdc0, fd65, fcd8, fd5a, fd41, fe6d, ff8a,    0,   47,   52,    0, ffa0, ff91,  1a7,  2b0,  374,  386,  38c,  22e,  1af,  12d,  1b7,  22f,  18b,  12a,   21, ffaf,   e8,   63, ff22, ffb0, ffc1, fea0, fdb7, fd29, fd5f, fda6, fe8e, feeb, fe8e, feca, ff60, ffe2, ff63, fedd, fef4, ff70,   bb,   fa,   b1,   97,  18e,  259,  285,  1b9,  196,  234,  2c6,  298,  337,  389,  284,   e9,   2e,   e3,   40, fffc, fef3, ff9c,  137,  2be,  360,  3a4,  3cd,  2d6,  246,  258,  40d,  490,  572,  5c7,  59c,  520,  6b0,  93d,  9a7,  8fc,  91b,  a33,  b38,  a90,  904,  825,  6f0,  6a5,  690,  57f,  577,  58f,  673,  766,  70f,  68d,  4b2,  3c6,  487,  63e,  771,  745,  73b,  7c8,  7bf,  677,  4e3,  4cc,  628,  65a,  4a5,  439,  516,  5a1,  4d2,  5af,  63e,  5db,  432,  220,  1e4,  1fb,  1b8,  123,  398,  224,  105,  158,  29d,  354,  123,   28, ffb8,   91,   b5,  12b,  1d9,  238,  341,  2d0,  224,  242,  26f,  345,  344,  385,  301,  251,  2c4,  3ef,  408,  270,   d5,   56,   3d, ff6f,   54,   45,   d3,  1b5,  284,  337,  2bc,  142,   92, ff98, febe, fe28, fd7c, fd92, fd91, fed8, ffe6,   63, ffe8, feef, fed0, fe90, fe3b, ff2f, fff5,  208,  30f,  289,  1c1, ffc0, fff7,   ea,  30b,  313,  156,  139,  287,  1b8,   bd,   a9, ffa0, fff4,   60,   35, ff87, fdf7, fda7, fe1f, fe87, fdd5, fdea, fe38, fd12, fbf4, fafa, fa44, fad2, fcc6, fd60, fdb3, fe0b, fe11, fd92, fcf6, fcd0, fd56, fd17, fccc, fc15, fbd0, fb8c, fa78, fb54, fb71, fb92, fb85, fa54, f8ae, f729, f6dc, f5d3, f5be, f541, f568, f73b, f84d, f9ef, f96e, f8e5, f84e, f8a3, f8eb, fac3, fba2, fb6b, fa4b, f9e8, fb81, fb01, fab8, f9d4, fa77, faa4, f9d4, f97a, f8da, fe5f, fdc4, fd97, fe2c, fd7d, fd36, fcf7, fc5a, fd2e, fdab, fd03, fc92, fc54, fd84, fd27, fbc4, fcc9, fe7d, fedc, fdcc, fc63, fc2f, fc52, fd2c, fc8a, fb4d, fb55, fb18, fbb9, fcf1, fe50, ff0a, ff8c, ff27, fea3, fe84, fe0c, fda8, fe59, fe3b, fde3, fd58, fd47, fddc, fdad, fd5b, fc1e, fbb9, fbe8, fba6, fbb5, fbba, fcc8, fd86, febf, ff52, ffb8, ff3e, ff82,  193,   96, ffc8, ff6f,   52,  1cb,  2e9,  30b,  1f4,  18c,  17f,  220,  2c3,  3d5,  462,  338,  2b4,  48f,  525,  4cb,  421,  455,  4dc,  519,  672,  5bf,  487,  3d4,  3ee,  456,  43e,  4df,  574,  562,  5c6,  617,  5cf,  571,  45b,  3a3,  316,  3c6,  553,  6e2,  624,  38a,  293,  26e,  317,  306,  1d5,  190,   49, ffcb, fff0,  140,  1f5,  104,   6f,   38,   80,  1da,  1aa,  1c9,  2e5,  3a4,  43a,  4dc,  3f6,  2a9,  116,   da,  222,  23a,  2af,  30f,  278,  1b9,  144,   53,  387,  342,  493,  4bf,  418,  2a0,  2c4,  41b,  452,  435,  309,  1b0,  1e5,  1b9,  1f6,  1c8,  2b9,  325,  1b8,  1d2,  208,  1d8,  324,  3b7,  3d6,  4ed,  4cc,  47b,  41d,  340,  364,  3bd,  3b3,  27c,   ff,  187,  1b0,   5c, ffb5, feb7, fd9c, fbcf, fb19, fcbc, fe76, ffe6, ff92, fda9, fdc1, fe9c, ff53, ffa1, ff98,   26,   4b, ff22, ff96,   47,   54, fe92, fc5e, fbb2, fb70, fb23, fb81, fbf5, fa87, f9d6, fa70, f9f0, f9ff, f988, fa9f, faca, f92f, f8ce, f897, f976, fa8b, fb25, fc7a, fd32, fd72, fe1d, fecd, fefc, fe9c, fe10, fe99, ff24, ff8d, ffe0,   a7,   b1, ff20, fe9a, fe2e, fd2a, fc52, fb8e, fae8, fadf, fa2c, f9e5, fa7f, f9c5, f866, f840, f938, fa40, fb1b, fba6, fc30, fd07, fc91, fc2d, fd1f, fda0, fc8a, fbae, fb55, fb1b, fc09, fcb9, fd2f, fd8e, fc97, fcaa, fd1c, fd75, fcf3, fbe2, fa75, f983, fabb, fb32, fafb, fa05, f9df, fa92, fb0b, fa30, f9f5, f941, f8f8, fa0d, fb7c, fad1, f990, f92e, f88f, f8b3, f9ab, fae5, fbeb, fc16, fb48, fadf, fb19, fc49, fd89, fdce, fe62, ff9f,   3a, ff38, fe90, ff4a, ff46, fe77, fe5f, fe3a, ffcf,   56,   85, fff5, fdae, fc5a, fb29, fbdc, fbda, fc4c, fcfa, fd23, fd56, fee8, ff6a, ffda,   4e, ffdc,   88, ffde,    4,   48,   a9,   88,   98,  15a,  136,  12c,  1a2,  213,  179,   1a, ffae, ffea,   d0,  1d7,  260,  248,  175,   d9,  169,   c9, fe7a, fec4,   4e,  219,  285,  34a,  46b,  546,  55d,  560,  533,  4a2,  475,  553,  475,  2d2,  138, ff60, fef2, fec8, ff7e, feb8, feba, ff61, ff50, ffb8, ffcb, ff52, ff44,  160,  280,  2d0,  243,  1da,  1b1,   59, ff57, ff86, ff74,   af,  191,  2b2,  2dc,  26e, ␍␍␊
    [16:13:39:627] ␍␍␊
    [16:13:39:627] Displaying buffer1␍␍␊
    [16:13:39:627]  2aa,  25e,  1df,  198,  10b,   43, ffa0,   9f,  294,  294,  3bf,  479,  41a,  749,  7a6,  7e2,  8d0,  87e,  70e,  638,  55e,  73d,  715,  6c3,  7d2,  7bb,  75a,  675,  607,  674,  66c,  60d,  4e7,  472,  565,  6de,  70b,  637,  5a1,  5e3,  4e2,  55d,  4b5,  58c,  69c,  71d,  667,  495,  333,  3f1,  4f3,  489,  3a4,  391,  325,  35b,  381,  3eb,  477,  4e7,  4dd,  4c1,  3dc,  323,  342,  2d5,  3b1,  3a3,  333,  343,  39d,  3a7,  2a1,  1b0,  2b9,  552,  634,  598,  3d6,  414,  600,  5dc,  479,  2fa,  2f6,  2b0,  2fb,  312,  34b,  313,  289,  1a3,  202,  390,  46b,  3bc,  39c,  46b,  57c,  651,  597,  31b,  25b,  2c6,  2d4,  25c,  1dc,  103, ffed, feca, fd9f, fdfb, ff92, ffc5,   2b, ffd3, ffd1,   ff,  178,  23f,  160,   8b,  171,   89,   24, ffcb,   22, ffcf, ff88, fea5, fe51, fe3e, fdb9, fe0a, fdaf, fcff, fd17, fd8a, fd88, fe76, fe73, ff00, ff82,   34,  10a,  1fc,  14e,   c3,  2ca,  578,  59a, fa9c, fa94, fb8f, fc0b, fb34, fb22, fbab, fbbe, fc68, fd2f, fe51, ff01, ffff,   76,  138,  13a, ffd5, ff70,   15,  1a3,  258,  2d4,  27a,  270,  1ae,  2bc,  327,  343,  1cd,   41,   29,   22, ffeb, ff15, ffaa,   8a,  102,  149,  149,   f6,   b4, ff79, fe44, ff0f,   e3,  212,  3d3,  434,  4b9,  565,  5b8,  6a2,  4a8,  36b,  446,  42d,  4d3,  528,  507,  46a,  43a,  333,  173,   b4,  15d,  152,  248,  16a,  17e,  247,  39d,  4ba,  51b,  3de,  317,  288,  1eb,  1b6,  20c,  1a7,  1c1,  21e,  250,  1e4,   e3,    f,  15b,  250,  37d,  321,  22c,  15e,   cc,   d5,  121,  14a,  20d,   b9,   55,   6e,  16f,   f5,   ab,  109,  101,  11d,  217,  35b,  48d,  59d,  507,  425,  2de,  30d,  327,  2ca,  267,  15c,  1dc,  287,  1a3,   ba,   f0,  2bd,  264,  119, ffcd, ffc9,   48,   95,  187,  261,  291,  34d,  3a1,  360,  3e8,  30d,  504,  5f8,  61b,  539,  42b,  468,  4f4,  519,  531,  4a7,  4c4,  4a2,  393,  3bc,  42e,  3b0,  3aa,  44f,  469,  4c0,  4ff,  3c8,  2d7,  2fc,  315,  1e9,   78,  1db,  407,  541,  44a,  26a,   df, ff3a,   4c,   cd,   c8,  113,   fd,   df, fffe, fe35, fdc2, fee1, ff06, fdfd, fcf6, fd5f, fdc8, fd19, fc32, fc77, fd5d, fdb5, ff45,    b, ff46, febb, fe65, fe25, fe92, ff19, fede, ff72,  140,  198,   7b, ff9c, ff2d, fee1, fe51, fe94, ffe1,   9a,  188,  274,  232,  115,   9a,    f,   f3,  167,  14f,  14a,   76,   4d,   e2,  195,  235,  1ec,   f7,   f2,  172,  15f,   f6,   89,   c8,  1cb,  3c8,  575,  54a,  574,  45b,  3cf,  356,  3d0,  47b,  312,  220,  339,  381,  3dc,  5db,  69e,  58e,  4a3,  524,  5c0,  562,  3b7,  2e2,  493,  4e3,  4a3,  3d1,  161,   3b,   24,  15f,  1c4,  13a, ff4f, fe7b,   53,  10a,  13c,  14e,   62,    c,  12f,  115,  21c,  2cf,  11c, ff86, fe89,   39,  104,   5a, ff96, ff41,   1f,  130,  20e,  2aa,  209,  223,  1d2,  18f,  273,  20b,  206,  234,  347,  386,  389,  41b,  3d4,  2ae,  283,  2ab,  22f,  12b,   df,  1fb,  285,  271,  17d,   9c,  123,  2a7,  401,  336,  2df,  1e2, ffb1, ff99,   9f, ff9f, ff02, ff04,    0,   1a, fef9, fe93, fe72, ff39, ff31, fe49, fdb8, feb5, fec5, fe1d, fd3a, fe53,   15,   21, ffd4, feee, fdf5, fe92, ff01, feaa, fdab, fd29, fcf5, fe82,    7,   29, ff98,   1a, ff9e, feac, fd0d, fb4d, fc23, fc0a, fad4, fa0e, fa34, fa94, f9d0, f9a3, f980, fa62, fbca, fbfa, fbad, fbcc, fc66, fe93, ff3a, fefd, fe16, fbde, fba1, fbba, fbf0, fb36, f9cc, f977, f8f0, f9f4, fa54, fa0b, f859, f7f6, f815, f7b2, f677, f56f, f489, f3c5, f32e, f3b6, f5f0, f7f2, f891, f851, f864, f851, f735, f759, f833, f85a, f7e9, f67f,  24b,  1bb,  110,  1dc,  39c,  4cf,  4ec,  4bb,  4e2,  5de,  5c7,  4a4,  472,  448,  3db,  3f7,  3b5,  2b8,  1a5,  2bd,  2bf,  186, ffb8, ff58,  144,  221,  1f4,   d5, ffc6, ff5d, ff3e, fdf5, fcff, fe6c,   7e,   db,   c7,   8d,   36, ffc0, fea4, feef, ff41,   1d, ffd2, fe9e, fd29, fda9, fddf, fd3c, fdfd, fe05, fc76, fab7, f9fd, fb03, fce4, ff1e, ff54, fe25, fdcf, fdd9, fec8, ff69, fe9c, fe96, fedb, ff0a, ffd3, ffa9,   23, ffec, ff34, fee2, ff4f,   c4, ff54, fe34, fe3f, fe6b, ff38, fffc,   ff,   e4,   77,  1d2,  23b,  22b,  321,  3e9,  3ef,  347,  314,  442,  563,  4f2,  52f,  5ee,  636,  60a,  61d,  59a,  3d6,  319,  24e,  391,  44a,  3a5,  23c,  1c1,  2ec,  3a4,  3bd,  2b6,  225,  2de,  3d9,  337,  45e,  63b,  8f0,  8c3,  768,  73f,  78c,  80c,  78b,  76c,  851,  7d5,  778,  768,  5bb,  554,  62d,  694,  56b,  484,  233,  24a,   55,   d2,   7a,  162,  1bf,  25f,  32e,  220,  161,   de, ffcf,   bf,  22f,  31c,  313,  270,  231,  2c0,  31a,  34a,  274,  185,   54,   2c,   b4,   68,   9c,   b1,   44, ffbe, ff7e, ff44, ff4f,   12, ff8e, fe90, fd7f, fdcb, fe1e, fe7d, fe34, fd38, fc22, fbda, fc7d, fd08, fcc4, fbbb, fb2d, fbac, fcf7, fe38, ff7a, ffcc,    e,   8d,   87,   ff,  13d,   d6,   86,   65,  11b,  149,  186,  196,  12a,   58, ffcb, fed0, fe0d, fd19, fc0e, fbbe, fbea, fc30, fc1a, fd23, fc59, fc8e, fcc7, fd2c, fd47, fd2e, fd34, fd68, fdd8, fe70, fdae, fbdc, fb3f, fc17, fe33, fe6b, fda0, fe13, fc97, fabf, fa8f, fba5, fc6a, fc9d, fcd7, fd5e, fc06, fb68, fb1d, fb8f, fb67, fa41, fac6, fae5, fbf8, fd02, fb5c, fa19, f94d, f9c2, fa3f, f977, f8c5, f868, f7c1, f7b8, f90c, f8ae, f94b, fa60, faf4, fb5d, fb0d, fc69, fc28, fb4c, faa3, fa41, ff9d, feba, fdfe, fdcb, fd99, fd37, fc97, fc79, fd22, fe52, fefb, ff00, fe7e, fdf1, fd16, fd50, fdce, fd27, fd0e, fbd8, fc69, fc94, fcb6, fc66, fd78, fe41, fe25, fe78, fd71, fcbd, fc44, fc41, fd04, fc82, fc22, fd02, fde6, fe6d, fe08, feb0, feee, fe76, fe79, fe76, fe18, fd95, fe50, fee1, ffb5,   84,  18e,   cd,    3, ff99, fff0, fe98, fe1d, fed2, ff0b,   29, ff72, fff8,   f3,  1e7,   82,    f, ff31, ffd7,  181,  2d1,  3bc,  2d0,  30d,  4ec,  5e9,  554,  42b,  3e3,  36b,  364,  3c1,  2ec,  1f3,  239,  39f,  36e,  260,  108,   73,  122,  138,  178,  1cb,   f2, ff16, fe9e, fe55, fff6,   94,   83,   9d,  131, ffda, fdce, fdcc, feac, ff0d, ff30, ff62, ff18, ff3d,   10,   63,   4f,   6a,  114,   f5,  170,    f, ff8a,   2b,   b4,   70,   7d,   4f,   78,   c7, ff07, fe97, fe6f, ff6e, feb3, fd0c, fcbb, fd4c, fd4a, fd53, fe77,   d6,  761,  6e6,  71b,  89a,  9f5,  916,  953,  88a,  87f,  841,  762,  73b,  72e,  674,  5ac,  6f3,  6ac,  51e,  39c,  247,  1f7,  215,  22a,  232,  274,  1c8,   94,   d0,  153,  3e1,  5a4,  4d6,  30a,  124, ff77, ff97,  169,  279,  314,  17a,   3c,  1e3,  26f, ␍␍␊
    [16:13:40:641] ␍␍␊
    [16:13:40:641] Displaying buffer1␍␍␊
    [16:13:40:648]  23d,  24f,  195,   b9,  130,  194,   db, fef4, fd98, fdf0, fe3d, fe5c, fef0, ff5f, fffc, fee2, fe94, fd7f, fd1e, fd1a, fd08,   54,  11e, ffe8, fff9,   27,   dc,    4, fffc,   96, fe9f, ff24,    b,  159,  249,  220,  1ca,   39,   75,   d9,   41,    9, ffba,   8b,  16c,  1d5,  17a,  1a5,  2ac,  20a,  172,  1ff,  25f,   55, ff40, ff6b,   be,  264,  2e8,  2fc,  41c,  470,  313,  218,  173,  1db,  17f,  112,  149,   a9,   11,   c4,  158,  12a,   b3, ff42, fe79, ff5c, ff2d, fefd, fd90, fb5d, fa09, fa00, facd, fbfe, fb40, f9b8, f99b, f96c, f84a, f6ff, f6b7, f7c1, f921, f953, f9ed, fa57, fa0e, fac8, fbd9, fc31, fc57, faf1, fc72, fcac, fd21, fd2f, fd23, fe98, ff4f, ff54,   20,   66,   d7,  2b7,  35b,  38d,  1d1,  24d,  3d8,  346,  399,  2a1,  190,   9c, fe80, fcc7, fb4f, fbc2, fd19, fc98, fbf3, fbfa, fbc6, fbee, fd2b, fd83, fe16, fe50, fe53, fe56, feee, ffb2, fefb, fe06, ff21,   82,   f7,  1ee,  28d,  22c,  1ae,  1f2,  21e,  251,  17e,  22f,  383,  422,  5a9,  524,  3c2,  465,  48c,  459,  47d,  4bf,  4ee,  3a8,  188,  194,  1d6,  324,  29e,  15c,  2cb,  423,  377,  1d2,   43,   a2,  177,  33a,  310,  21b,  1af,  2aa,  37a,  405,  3be,  3db,  3f6,  41a,  5ee,  539,  4cc,  568,  4bf,  426,  38c,  44a,  575,  4be,  3f7,  3bd,  396,  281,  128, ffef,   70,   38, ff83, ff04,   13,  1bf,  228,  335,  409,  321,  334,  27d,   95, feca, ff97,   c0,  21c,  359,  3d2,  2de,  1f7,  283,  2e8,  351,  287,  15d,   6b,   1b, fefe, fd34, fd35, ff71,  157,  113, ff88, fd3d, fcca, fd83, fe09, ff89, ff7a, ff27,   52,  270,  435,  4d5,  493,  4ec,  619,  619,  62a,  3d7,  3ab,  326,  1ab,  1d2,   b1,   fb,   aa, fff6,   5f,    d,  111,  241,  118,   90,   32,   d7, fff6, feee, fef8, fe7c, ff5d,   7e,  233,  292,  169,  140,  24b,  2bc,  33f,  2b8,  300,  309,  252,   e4, ff2b, fdcb, fb03, fa94, fa30, fa63, fa9c, fae2, faa4, fa57, fb0a, fb3c, fac0, faa6, f9e9, fa5d, fbcf, fcf6, fd4a, fc2d, fbb6, fab0, fb4c, fa99, fb3f, fa9a, fb9c, fc19, fbdd, fbaa, fc49, fc99, fb74, fb9d, fbc5, faf5, faab, fabd, fadd, fa3e, f9b4, f90d, f8e2, f9af, f9da, f811, f6ca, f65b, f790, f993, fb63, fb1e, f91b, f934, fa4d, fad0, f9f2, f9b5, fa98, fa32, f993, fa47, f9f8, fb15, fc23, fc5d, fbfd, fab5, fa84, fb3e, fb40, fabf, fa3d, fa79, fada, fbdf, fd53, ff22,   a8, feb6, fe63,   25,   13,   41, ffbb, ff78,    2,   b4,  17e,  18a,   55, ff19, fe4b, fdad, fdd1, fe0c,   5c,   f2,  11c,  16c,  2e2,  44e,  490,  2f5,  1f6,  193,  135,   64, ff68,   ae,  111,  130, ffc1, fe67, fd42, fd79, fd36, fb9f, fa47, f850, f7df, f79c, f7a6, f8d7, f9f1, fa8e, fa49, fa5e, fa99, f9bb, fac5, fbb1, fd26, fcad, fc5e, fcb2, fddd, fda6, fcee, fcc8,  6ff,  66c,  582,  563,  686,  6d4,  6c3,  76c,  7f0,  91e,  8d2,  873,  87e,  8d8,  94b,  942,  823,  6fd,  7b3,  873,  7b2,  770,  7d6,  6c4,  5a6,  62a,  791,  7f8,  751,  819,  8c7,  77c,  734,  707,  5fa,  5e3,  5ce,  5d4,  515,  366,  286,  262,  2a9,  421,  60d,  60e,  606,  574,  496,  35e,  294,  217,  31d,  40d,  3b1,  45b,  482,  4f2,  66d,  879,  9a6,  9e2,  953,  9da,  a8a,  ac6,  af5,  942,  82a,  71d,  6f5,  6c5,  609,  4e3,  338,  33b,  34b,  1f0,  217,  297,  446,  4ec,  477,  51f,  46e,  487,  407,  440,  507,  416,  3e2,  35e,  418,  55d,  642,  60e,  4f2,  39e,  2c6,  1eb,  29a,  31c,  2ba,  2ef,  257,  1e9,  148,  145,  289,  23a,  121, fff8,   5e,  198,  23c,  2e3,  35c,  433,  5bc,  644,  602,  55f,  551,  622,  66c,  5eb,  4eb,  4ee,  459,  31e,  381,  4ac,  543,  4fc,  4b7,  4be,  51b,  4f8,  434,   b9,   cd, ff23, fe3a, fe9f, ff84,   44, ff3e, fe26, fd42, fc16, fd60, fe30,   6a,   5e, fee8, fdf8, fde1, febe, ffeb,   b4, ffc9,   13,   b7,   8d,   32, fff3, ffee, ff0d, ff18,    5,   10, fe47, fdb2, fdfa, fe11, fda6, fdf7, fdfb, fdf7, fd36, fcde, fd45, fe45, fd9a, fdba, fe59, fe55, ff94,   85,    e, ffd6, ffad, ff5a, fff1,   c4,   5d,    3,   a3,  135,   be,  20f,  2d6,  376,  390,  331,  28b,   b9, ffb6, ffea, ff8f, feee,    8,   8f,  16c,  2bd,  28c,  1e2,  143,   44, ffde,   eb,  14e,  1be,   ff, ff59,   bf,  289,  30e,  39c,  319,  217, fec9, fd25, fcdc, fdc9, feb2, ff21,   73,   e3,   be,  116,   83, ff4b, fedd, fea1,   4c,  205,  20c,  145,   bd,   f7,  1ca,  258,  235,  20a,  262,  2cf,  32e,  264,   cc, fef2, ff76, ff25, ffb0,    b, ffaa, ff35, ff3c, ff7f,   95,  156,   20, ff79,   36,    e,   83,  1aa,   d2, ff38, ffc5,  113,  1d3,  2bc,  362,  1ac,   7b,   d5,  356,  537,  525,  44f,  3ff,  416,  3ee,  3ce,  3f9,  492,  4d9,  396,  35b,  422,  5fa,  766,  6d1,  588,  62f,  757,  803,  85f,  992,  a09,  929,  82e,  610,  6b9,  677,  5c3,  6a4,  58a,  4c2,  4be,  54e,  56c,  554,  473,  3ce,  2ce,  1dd,  1c8,  1f5,  163,  1c7,  255,  2a6,  393,  4ba,  435,  3d8,  456,  501,  5b2,  544,  3ec,  365,  39c,  3ea,  404,  323,  103,   56,  153,  300,  28c,  308,  3c2,  28e,  31f,  35f,  2d5,  28a,  3a7,  2eb,  126,   b6,  265,  383,  3c3,  4b9,  531,  5c4,  5cb,  6cc,  843,  72e,  4ad,  2fd,  303,  27f,  31c,  271,  2b5,  288,  35a,  44e,  2f6,   d3,   3d,   6a,  169,  1f9,  1b9,  28c,  2fd,  347,  302,  3a5,  404,  32e,  2b3,  2fb,  57a,  6c9,  7c8,  7f6,  770,  74e,  59b,  417,  3d8,  3e5,  56d,  6f1,  60c,  40f,  38e, fdda, fe17, fd50, fbc7, fb49, fb48, fccc, fc0c, fa96, fa47, f9dc, fa38, fca1, fd03, fc99, fb2e, f991, f92b, fb37, fcec, fdc3, fd55, fd24, fe20, fef4,   8b,  19a,  11d, ffaf,   30,  104,  151,   d3, ff3d, fdca, fd7a, fd4a, fe33, ff0d, ff2d, fd74, fb0b, fa43, fb94, fc39, fcb0, fd07, fbe5, fb22, fb7b, fb65, fad5, fb80, fb8a, fc04, fce8, fc1d, fb86, fc5d, fcd6, fbe5, fc0a, fca4, fe06, fef8, ff2d, ff89, ffb6, fff0, fdd8, fcd2, fd50, fe0d, ff7c, ffef, ffb8, ff2b, fe8e, fcf3, fd4a, fd71, fda0, fdba, fcec, fe09, ff18, ff92, fe16, fc0b, fb5a, fc7e, fc9d, fd6c, fd1c, fc79, fd03, fcca, fd78, fdf2, fd66, fbdb, fb28, fcc5, fd7c, fbbe, fb29, fa95, fac5, fc8c, fe67, feb2, fe08, fdd6, fd65, fdd9, ff84,   11, fe5f, fb77, f9e6, fa41, fa91, fa5b, fcad, fea6, fdbf, fd0c, fcfc, fd11, fdb4, ff11, ff19, fda0, fc11, fca3, fd36, fcd9, fda5, fe3c, fe28, fe82, fe46, fd14, fd27, fd50, fd8a, fddc, fd84, fd30, fe05, ff27, ffcd, fef7, feaf, fe76, fe35, fded, fd34, fd80, fce5, fd50, ff78,  2a4,  3a9,  2fe,  2c6,  1a5, ffbf, fe7f, ffc0, fff4, ff17, fcf0, ␍␍␊
    [16:13:41:659] ␍␍␊
    [16:13:41:659] Displaying buffer1␍␍␊
    [16:13:41:659]   a2,   ed, ff97,   40,  157,   45, ff69, feab, ffbd,    d,   54,   67, ff70, ff62, ff89, ff6c, ff9c, ff84,   56,  10a,  1fb,  186, ff71, ff87,  14d,  394,  46c,  3f9,  3a3,  4a3,   83,  1a1,   1b, fe66, fed6, fee4, fe25, fdec, ff85,  12e,   70, fe8f, fcf9, fcdf, fee0, ff84, ff79, feea, fd83, fcc6, fc80, fd1d, fdaf, fdd7, fe5c, ff53, feac, fd8b, fd02, fdd5, fe53, fe23, ff40,  17a,  2bd,  24a,  190,  13e,  237,  357,  2be,  2a7,  30e,  221,   a3,  1a7,  2ea,  308,  3ab,  42a,  3ec,  428,  448,  3fb,  3f9,  3e7,  3d3,  30d,  25d,  18d,  2e4,  3ff,  3f9,  383,  376,  3d6,  40c,  39c,  2c7,  24c,  333,  3b1,  2d6,  119,  111,   b4,  175,  200,  147,   85,   14, ffb5, ff55, fecf, fe41, feda,   53,   29, ff21, ffa1,  164,  26f,  104,   95, ff96,   3a, ffbf, ff60, ff57, ff5b, ffc4, fe3e, fd36, fd33, fd88, fee3, ff2a, fd72, fb87, fb3c, fd49, fe12, fcca, fbe9, fab7, fab5, fab6, fc1d, fe76, fd53, fb52, fb5d, fc62, fe03, ff6e, ffcb,   80, fed4, fcf5, fc13, fddb, ffe0, ffc1,    3, ff23, fdaf, fdbd, fec9, fb69, fcc8, fde5, fe9c,   72,   96, fe25, faec, fa52, fb9e, fbcb, fbb6, fb7a, fcf7, fe3d, fd2a, fc66, fd27, fe91, ff36, ffcc, ff48, fe7f, fe75, ff42,   18, fff4, feb9, fe64, ff58, feed, ff36, ff5d, ffad,   db,  16a,   8e,  101,   ac, fed3, fe40, fef0, ff31, ffaf,   82, ffaa, fec7, fd8a, fcac, fd18, ff57,  138,  13b,  130,   a1,  1ec,  457,  4dc,  450,  2fe,  1a4,  15e,  128,  1af,   cd, ffc0, ff42, ffa2,  17c,  1d8,  178,  1a6,  26c,  235,  13f,   75,   d9,  255,  2b4,  28d,  3fe,  545,  622,  566,  582,  731,  714,  538,  2df,  28f,  3bf,  3b8,  30f,  1d9,  154,  164,  129,  169,  1fc,  2fa,  2c3,  22c,  22f,  1e4,  1af,  145,  31d,  464,  42b,  3fd,  336,  394,  4c2,  507,  441,  4fd,  6b3,  6b0,  524,  427,  38d,  4ca,  652,  77d,  814,  820,  687,  5eb,  5ff,  5a2,  5a6,  63d,  626,  649,  5ef,  5f1,  624,  4f0,   32, ff7b,  114,  20c,  19c,  1db,   f1,   83,   2e,   b6,   62,  103,  176,  13c,  16d,  170,   ab, fe90, fe3e, ff6b, ffc7, ffd5,   41,   f0,   96,  105,  11a,  1fc,  352,  2f7,  34c,  255,  21f,  32b,  268,  183, ffa6, ff24,   1b,  1b7,  2f6,  329,  2fd,  42a,  5ac,  6df,  801,  8c4,  986,  843,  654,  54f,  4df,  325,  21c,  2f8,  3a6,  35b,  2b9,  142,   ea,  152,  29f,  364,  45b,  54f,  3f7,  39f,  431,  52f,  58f,  4fc,  4b2,  456,  36f,  1db,  1a9,  222,   c6, ff7a, ff93,   95,   b7,   5e,   6b, fece, fe83, fea6, fe21, fdb0, fd60, fe88, fe5b, fcf1, fc0b, fbd1, fcd5, fdaf, ff76, ff51, fe7f, feb7,   d0,  26a,  217,   a7, fffe,   27,   ab,   b0,   3b,   21,   85,   7e, ff68, feb0, fcb2, fb72, fbd3, fd4a, ff18, fec7, fd29, fcd2, fc0e, fbc8, fbed, fcdc, fdfc, fd4d, fbfb, fb91, fb50, fb75, fc1b, fba8, fb2b, f8e0,   46, ffc9, ffaf, ffe5,   c8,   19, febf, fdb2, fd50, fce5, fc55, fc0e, fd1c, fe08, fecf, ff97, ff42, ff43, ff69, ffeb, ff71, fde5, fccb, fc54, fcb4, fc53, fb45, faa6, fc32, fcbf, fc6a, fb63, faeb, fc2c, fce7, fd99, fd9a, fd72, fe67, fe76, fee5, fe67, fd42, fd1e, fc2b, fbaf, fb84, fc2d, fd16, fd3f, fdad, fd99, fda0, fdfd, fd2c, fceb, fc67, fc26, fc7e, fbce, fb9d, fbe1, fc7d, fde6, ff35, ffe3,   fe,  341,  3bd,  30c,  1f3,  203,  336,  3a0,  316,  210,   ba,    b,   8c,  19f,  2b9,  276,  27c,  274,  2e2,  4b8,  4f9,  4a2,  4bc,  54f,  544,  545,  503,  5b1,  66e,  65d,  783,  779,  7c6,  6ab,  563,  3f1,  2d5,  3ea,  6b6,  742,  5e1,  4f4,  429,  471,  593,  55b,  497,  3c2,  338,  349,  2ac,  177,   43, fe37, fdc8, ffe6,  128,  28b,  363,  436,  646,  702,  702,  680,  5a0,  63c,  591,  5e5,  75e,  75a,  80e,  783,  828,  885,  7ba,  6ec,  683,  691,  73a,  6ba,  6a7,  7e4,  6bd,  5c9,  5d8,  45c,  3d0,  35a,  298,  2db,  227,  2b7,  26b,  184,   fd,  164,  259,  1f5,  241,  182,   81, ffe8, ffb1,    c,  140,   9e, ffe0, fea6, ff50, ff81, feb5, fdfc, fd37, fc85, fbab, fc1d, fcc7, fbb7, fb52, fcd9, ff32, ff43, fd79, fc2a, fc45, fbf4, fcbc, fd9c, fdeb, fd9d, fd89, fefe,    e, ff17, fec0,   49,   7a,   8a,   c7,   56, ff57, ffba, ff9d, febb, fe6b, fe8e, fea6, ffc9, ff71,   9b,   fc,  162,  30c,  37d,  34f,  2e1,  3e1,  44e,  434,  40e,  41f,  3e4,  446,  2fa,  1de,  151,   98, ff7d, ff83,   54, ff20, fe49, fe9f, ff62,    3,   af,   b7,   c3,  149,   c9,   21, ff4c, fed9, ff10, fef0, fea7, fea4, fe2a, fd76, fd87, fe6a, ff54, fecc, fdc3, fd04, fe83, fe4f, fd7b, fd03, fc12, fbba, fb7b, fc39, fc72, fc95, fcf3, fdcc, fe01, fc75, fafc, faf5, fa4b, f9aa, fa34, fade, fae7, fa4f, f937, f8dd, f837, f7b9, f6c3, f659, f6b8, f8c3, fb8a, fab7, f992, fb2e, fb7f, fabc, fa5a, f998, fa14, faac, fb39, fbd3, fbd0, fc4e, fc4f, fc48, fccb, fe73, fee9, fe13, fc69, fd32, ffe1,   b8,   4b,   27,  14b,  19a,  101,   92,   e9,   77,   cb,   97, ff88,    7, ff45,   42,   a3,   15,   3d,   cb,   e4,   87,   42, ff56, fed7, ff6d, fe74, fee1,   50,  1d1,  25d,  2d7,  37c,  2c6,  394,  4a8,  541,  674,  5f1,  673,  51c,  321,  3e9,  49a,  4a3,  36b,  39e,  416,  338,  22d,  23d,  186,  1ee,  281,  23f,  200,  378,  5ec,  5f1,  609,  5f7,  518,  47d,  300,  20c,  214,  1f7,  215,   70,   cb,  1c3,  1bf,  1b2,  261,  444,  60c,  5f7,  4e1,  3bd,  36e,  387,  322,  2a5,  1ef,  1ed,  1a0,  230,  3b1,  465,  3d5,  406,  3fa,  35b,  369,  2c9,  285,  3b4,  4f4,  4eb,  4f6,  53d,  11b,  135,  114,  1fb,  344,  40a,  485,  4b1,  3f7,  397,  34a,  279,  1e8,  121,  167,  11e,  16e,  344,  3e0,  364,  46e,  5e2,  649,  6a3,  589,  41f,  3d4,  4e7,  49d,  35c,  2ac,  298,  2be,  2c5,  375,  27e,  1b6,  2e0,  35e,  357,  204,   9e, fedd, fdac, fe69, ffed,   82,   7d,   5b,  109,  1dc,  2b1,  235,  1fc,  141,   93, ff4b, fd94, fd91, fcf0, fc73, fb8a, fc20, fb7f, fb25, fcb1, fd4b, fef6, ffca, fd92, fd01, fdf8, ff39, fef0, fd11, fbf9, fc2c, fe26, ff21, fe0a, fbe7, fb2a, fc87, fde1, fe9d, fdfe, fd73, fce5, fc09, fc15, fcb3, fd3f, fcb1, fc30, fd26, fe10, fe31, fe68, fe3e, ffb3,   4f, ff0f, fd91, fdae, fd1d, fe47,   5a,  181,  126,   1b, fe84, fded, fdb7, fdbb, fd69, fd2a, fef4, ffe6,  13c,  1be, ff1f, fca3, fcac, fe72, ff95, fee3, feae, fed9, ff44, ffc2, ffde, fff4, ffa2, ff37, ff41, ff29,  175,   fa, feb6, fe45, fe9c, ff03, fdf4, fcc1, fbe7, fa56, f897, f916, fb22, fbd2, fc9e, fc44, fbcd, fb6b, fcfb, ff40, ff1e, ff00, fe2b, fe63, fe81, fe25, fdfd, fd63, fe60, fe08, ␍␍␊
    [16:13:42:676] ␍␍␊
    [16:13:42:676] Displaying buffer1␍␍␊
    [16:13:42:676]  39d,  3d0,  3d6,  4a6,  3ea,  2e3,  525,  6b0,  789,  667,  581,  4eb,  310,  362,  217,  1e9,  1c3,  282,  2c7,  1b1,  28a,  293,  1c6,  12f,   c7,  13e,  150,   ea,   9b,   fa,  28a,  439,  448,  460,  5c6,  749,  8ca, f8f5, f9ed, fadd, fb70, fb2d, fb96, fa99, faaa, fba6, fd71, fe2a, fe4d, fe25, fe16, fe63, fef8, ffac, ffd4, ffde, ff5d, fec3, fdf9, fdec, fd50, fca1, fd10, fdab, fd4f, fddb, fd9f, fd4e, fd8f, fdc9, ff75,  15a,  190,  129,  11b,  254,  25f,  216,  333,  44d,  392,  36e,  4b6,  610,  630,  4d3,  4f8,  578,  40a,  297,   42, ff4f, fff6,  1a2,  313,  417,  326,  2ed,  2b4,  3fb,  536,  623,  6aa,  4b2,  1d1,   be,  183,  287,  3b1,  3b7,  1b6,   6c,  1fd,  280,  193,   20,    e, ff34, fe8e, fdde, fd91, fe74, ff97, ff72, fe28, faf5, f969, f948, f85c, f8e6, fa41, fb30, fbfc, fd30, fe67, ff7e, ff48, fdc2, fd1d, fe17, ffea, ffde, ff9d, ff17, feac, fe48, fd38, fdcd, feaf, ff46, fe02, fb48, f917, f832, f770, f68d, f5f1, f5c4, f6b1, f804, f810, f7f0, fa01, fc26, fd19, fe19,   18,  133,  1cf,  1a9, fff0, fe4b, fdd1, fe04, fd4d,   75,   9f,   d8,    f, fe36, fcc6, fd91, fd85, fdf0, fdba, feab, feed, fe50, fe2b, ff4e, ffe6,   39,   73, fffd,   e1,  27f,  440,  3e5,  2d1,  1da,  19e,  1a6,   8c, fe92, fd80, fd10, fea4, ffc9,   4a, ffc0,   44, ffd3, fe83, fe76, fd36, fb77, faa2, f9c7, f920, f986, f9fa, faee, fae1, faa1, fbfd, fc1c, fb8f, fa5f, faaa, fafc, fb4c, fc34, fc61, fb87, fb23, fad8, faa6, fa4e, f9d1, f920, f817, f847, f91c, f986, fa64, fa79, fa7e, faab, fb58, fbbc, fc5b, fb17, fa25, fafe, fce9, fc48, fb8b, fc23, fc3a, fc92, fca0, fcfb, fd1e, fc99, fcf0, fddc, fdb8, fd70, fe43, fd59, fd88, fe19, ffa4,   28,   66,  16e,  234,  26f,  2ab,  402,  4b5,  20f, ff53, ff13,   24,  1f9,  354,  27e,  149,  1b1,  27b,  35d,  28e,  204,   f0,   c3,   3a,   65,  178,  142,   c1,  181,  346,  68c,  83f,  78b,  740,  78a,  8d0,  9b5,  83c,  68a,  573,   5b,   e9,   ec,  138,  153,  103,   ad,  154,   f4,   2b, ffa1, ffaf,    7,   6c,   30,   3e,  103,   3f, ff49, fe80, fd82, fd42, fc92, fc2e, fb91, fb44, fad1, faeb, fca0, fe2f,   60,  204,  2c2,  22d,  225,  303,  40a,  43d,  44c,  40b,  387,  422,  498,  522,  508,  55f,  5bf,  5bf,  5ca,  5a3,  54a,  620,  64c,  6ef,  6c6,  6e9,  687,  5fd,  4a2,  2e4,  1b5,  18f,   e6, ff8b, ff70,   74,  1e7,  29f,  206,  250,  1eb,  218,  2d0,  4a3,  6e2,  70c,  875,  86a,  6c9,  583,  523,  4af,  511,  584,  56d,  523,  407,  379,  3ee,  2db,  174,  129,   e3, ff78, fe7e, fe6f, fe1f, fda4, fc86, fc3a, fbbc, fb2d, faf6, fbd9, fc8a, fc16, fd15, fdc5, ffaa,   cc,  13f,  16e, ffb6, ffab, ffd9,    2, fffa, ff3e, ff13, fcd2, fbad, fbb4, fc9f, fcb9, fb0b, fa2e, f9fd, f921, fa00, fa31, f9ec, f951, f948, f88e, f87d, f8b7, f93b, f8ee, f7f1, f8da, f8fc, f90d, f930, f8fd, fabf, fbd8, fc86, fd5f, fda5, fe41, fdbe, fe6e, ff97,  189,  331,  349,  3fe,  4a6,  4ac,  57a,  587,  6b7,  78f,  789,  63e,  524,  493,  412,  32b,  2e1,  225,  215,  17a,   a5, ff2f, fd81, fbb4, faec, faf8, fa5c, f8fb, f7b4, f703, f72d, f7a7, f7c7, f95b, fa9e, fae7, fc0f, fca9, fe55, ff9d,    2,    1,   5e,   ec,  178,   b1,   46, ffc7, ff47, fe15, fcc9, fc87, fbb7, fbbb, fa11, f76a, f4c5, f3de, f519, f552, f49f, f3ea, f541, f5bb, f64e, f7af, f95e, f87b, f71a, f7de, f895, fa01, fb71, fda0, ff26,   f1,  270,  3ba,  412,  3eb,  4ef,  6c1,  78a,  894,  946,  a27,  af8,  a30,  a20,  ac5,  8de,  67e,  5f6,  533,  485,  2a6,  202,  1a9,   92, ffd6, ff5d, ff2d, feaf, fe17, ff01, fff1,  24d,  2b0,  19b,  244,  3c2,  54a,  5c0,  5e7,  5ce,  69b,  7ae,  990,  bdb,  ca0,  bf8,  ab1,  889,  85a,  3e3,  461,  529,  480,  310,  247,  21f,  387,  1c4,   2a, ff8f, fef6, ff9f,   a3,  248,  363,  40a,  47d,  419,  3a8,  377,  2bb,  1c0,  194,  2f1,  38f,  3df,  2af,  1cf,   e6,  139,  316,  384,  3c8,  438,  41d,  452,  2f0,  2b5,  2c0,  1c3,  10c, ff7b, fe25, fd9e, fd29, fcc7, fd3b, fcfe, fb6c, fb8e, fb3a, fac2, fa9e, faff, fca0, fd77, fe85, ff4c, ff9d, ffc7, fe52, fed4,   79,  2bd,  5b9,  639,  5b8,  572,  4e3,  411,  31b,  1e5,  1f2,  31e,  3bf,  3c6,  3d0,  3b8,  354,  34f,  2c1,  422,  373,  1de, ffcc, fee1,   32,   28, feb5, fd9e, fc8d, fcae, fc9a, fe2e, ff0e, ff44,   ac,  165,  1ab,  15f,   ea,   7a, ff18, ff08, f

    If you find any bug in above code kindly mention or have any another tricks than please help because i can't recognize voice patterns just on the basis of 2-3 sec audio.

    Also in the reference file you mentioned, where i should declare the pins for my audio sensor. In overlay files too there is no pin definitions for mic. 

Children
  • If you find any bug in above code kindly mention or have any another tricks than please help because i can't recognize voice patterns just on the basis of 2-3 sec audio.

    I think it would make things easier if you use some data structures to help organize the PCM buffers. Specifically, I recommend using a memory slab for allocating PCM buffers, and a queue/FIFO to enqueue PCM buffers that have been filled.

    Let's say your algorithm runs on audio block sizes of 100 milliseconds, at 16 kHz sampling rate, this means each audio block is 3200 bytes. You would then define a memory slab of size X * 3200. X can be any number that fits within total memory. Note that it is probably best to define a struct for your audio data, which contains the int16_t audio buffer, plus the fifo_reserved data field, plus whatever else might be useful.

    In the PDM event hander, when a new buffer is requested, you try to allocate a new buffer from the slab (k_mem_slab_alloc). If this fails, you can log the error.

    In the PDM event handler, when a freshly filled buffer is released, you put the pointer to this buffer in the FIFO (k_fifo_put).

    Your algorithm can run as soon as there is one or more items in the FIFO (k_fifo_get).

    Once the algorithm has finished processing one audio buffer, it will release it back to the memory slab (k_mem_slab_free).

    This way your algorithm will always process the audio in order, and it is easy to see if you have a bottleneck somewhere.

    If you have multiple consumers of your audio data (e.g. local algorithm plus UART printout), this can be solved by adding a reference counter to the audio buffer struct.

Related