AnsweredAssumed Answered

i.MX6ULL I2S接收,中断报:Receive overflow detected错误

Question asked by guochgz on Mar 2, 2020
Latest reply on Mar 5, 2020 by Wigros Sun

hello,AEs:

          我现在碰到了一个问题,自己实现了一个用于接收I2S数据的驱动。但是,在驱动的isr服务中报:Receive overflow detected,请教一下是什么问题? 寄存器的配置情况如下:

          

      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 1: 0x00000010
      
      接收Watermark 0x10 = 16,默认值之前设置为6 - 1 = 5也试过,一样。
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 2: 0x02000000
      
      BCP Bit Clock Polarity 位时钟极性 = 1
      Bit Clock is active low with drive outputs on falling edge and sample inputs on rising edge.
 
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 3: 0x00010000
      
      RCE = 1, 这个位是在fsl_sai_hw_params()函数中设定的。
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 4: 0x00011f10
      
      这里:MF = 1, MSB, 其余 FSE,FSP,FSD 都为0
      SYWD:Configures the length of the frame sync in number of bit clocks, 这个数值范围为0 ~ 31,一帧数据有多少个bit clock。在RX的接收程序中,这里为31,0x1f
       FRSZ: Configures the number of words in each frame. 这个输入范围为0 ~ 31,一帧,多少个Word,Word大小为32,下一个寄存器配置的,这里配置俩个Word,2 - 1 = 0x1
   
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 5: 0x1f1f1f00
      
      WNW:Configures the number of bits in each word 0 ~ 31取值,32bit 
      W0W:Configures the number of bits in each word 0~31取值,32bit 
      FBT:First Bit Shifted 0x1F,31
       
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Mask           : 0xfffffffc
      
     Configures whether the receive word is masked (received data ignored and not written to receive FIFO) for the corresponding word in the frame. 
      0 Word N is enabled. Word N is masked.
       0xc -> 1100 , bit 0, 1为0,表明,Word0,1 使能。
      
     中断触发时,打印的寄存器的值:
     fsl-sai-i2s-rx 2028000.sai: isr: Receive overflow detected, RFR0:0x00200000, RDR0:0x00695a00
     fsl-sai-i2s-rx 2028000.sai: isr: Receive overflow detected, RFR0:0x00000020, RDR0:0x00694d00
     
   
     RCSR寄存器的值:SAI Receiver Control        : 0xd0000c01 
    
     这个寄存器,我们配置了FSL_SAI_CSR_FRDE, FSL_SAI_CSR_SEIE,FSL_SAI_CSR_FEIE,FSL_SAI_CSR_TERE,FSL_SAI_CSR_SE。

Outcomes