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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,090 Views
guochgz
Contributor III

hello,AEs:

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

          

      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 1: 0x00000010
      pastedImage_1.png
      接收Watermark 0x10 = 16,默认值之前设置为6 - 1 = 5也试过,一样。
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 2: 0x02000000
      pastedImage_2.png
      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
      pastedImage_3.png
      RCE = 1, 这个位是在fsl_sai_hw_params()函数中设定的。
      fsl-sai-i2s-rx 2028000.sai: SAI Receiver Configuration 4: 0x00011f10
      pastedImage_4.png
      这里: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
      pastedImage_5.png
      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
      pastedImage_6.png
     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
     pastedImage_7.png
   
     RCSR寄存器的值:SAI Receiver Control        : 0xd0000c01 
    pastedImage_8.png
     这个寄存器,我们配置了FSL_SAI_CSR_FRDE, FSL_SAI_CSR_SEIE,FSL_SAI_CSR_FEIE,FSL_SAI_CSR_TERE,FSL_SAI_CSR_SE。
Labels (2)
0 Kudos
1 Reply

1,027 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

我不太理解为什么您要自己写I2S driver,我们的linux bsp已经支持了sai driver---->fsl_sai.c。难道您使用的不是linux OS吗?我建议您最好使用NXP提供的sai driver,毕竟这是经过验证和测试的。

---------------English-------------

I don't quite understand why you should write your own I2S driver. Our linux bsp already supports sai driver ----> fsl_sai.c. Aren't you using linux OS? I suggest you better use the sai driver provided by NXP, after all, it is verified and tested.

------------------

Have a nice day!

Weidong

0 Kudos