AnsweredAssumed Answered

PN7462 I2CM驱动问题???

Question asked by xia shuang on Oct 16, 2017
Latest reply on Oct 23, 2017 by Kan_Li

PN7462 I2CM驱动问题的驱动有问题,读I2C时,读取16字节,前面4个字节的数据总是重复的,不知道为什么?读写过PNEV7462B板子上的TDA8026的寄存器和EPSON公司的RX-8025SA时钟IC,都是这种情况,读写TDA8026的代码如下:

void phTestI2CM(void)
{
uint8_t pbuffer[128];
uint16_t wStatus;
do{
        //status = phhalI2CM_SlaveCheck(0x24);
        memset(pbuffer,0,sizeof(pbuffer));
        pbuffer[0]=0x00;
        wStatus = phhalI2CM_Transmit(0x24, 0x01, (uint32_t *)pbuffer);
       if (wStatus == PH_ERR_SUCCESS)
       {
         phLED_SetStatus(LED_G);
        }
      else
      {
         phLED_SetStatus(LED_R);
      }

      //读TDA8026的版本号(product version)
      wStatus = phhalI2CM_Receive(0x20, 0x10, (uint32_t *)pbuffer);
      if (wStatus == PH_ERR_SUCCESS)
      {
         phLED_SetStatus(LED_G);
      }
      else
      {
         phLED_SetStatus(LED_R);
      }
   }while(0);
}

执行完phhalI2CM_Receive后,pbuffer的内容如下:

C2 FF FF FF C2 FF FF FF   FF FF FF FF  FF FF FF FF

TDA8026的版本号(product version)为C2.

Outcomes