BF706 ezlite mini input and output data types

Hi, I'm a bit lost right now. I can get the input and output from, let's say, Audio Precision, however, there is something missed.

I sent 1 kHz (100 mVRMS) to the BF706 ezlite mini and after I changed it to long fract or float, I got 0.0003. When I sent back to Audio Precision, it showed 81.2 mVRMS.

What did I miss? Do I have to do scaling rather than using lrbits or bitslr? Here's my code below, please kindly assist me. Thanks a lot.

Parents
  • void RX_ISR(uint32_t iid, void *handlerArg)
    {
        if (*pREG_DMA1_STAT & ENUM_DMA_STAT_IRQDONE)
            *pREG_DMA1_STAT = ENUM_DMA_STAT_IRQDONE;
    
        channel[codec_Left] = lrbits(bufferRx[codec_Left]);
        channel[codec_Right] = lrbits(bufferRx[codec_Right]);
    
        xS[0] = lrbits(bufferRx[codec_Right]);
    	for(i = orderS - 1; i > 0; i--)
    	{
    		xS[i] = xS[i - 1];
    	}
    
        bufferTx[codec_Left] = bitslr(output);
        bufferTx[codec_Right] = bitslr(xS[0]);
    }

Reply
  • void RX_ISR(uint32_t iid, void *handlerArg)
    {
        if (*pREG_DMA1_STAT & ENUM_DMA_STAT_IRQDONE)
            *pREG_DMA1_STAT = ENUM_DMA_STAT_IRQDONE;
    
        channel[codec_Left] = lrbits(bufferRx[codec_Left]);
        channel[codec_Right] = lrbits(bufferRx[codec_Right]);
    
        xS[0] = lrbits(bufferRx[codec_Right]);
    	for(i = orderS - 1; i > 0; i--)
    	{
    		xS[i] = xS[i - 1];
    	}
    
        bufferTx[codec_Left] = bitslr(output);
        bufferTx[codec_Right] = bitslr(xS[0]);
    }

Children