ADE7880 can't write in register located in DSP data memory RAM

Hi everyone 

i want to calibrate ADE7880 for example APGAIN register .

i try write with I2C bus , and after write when going to read this register is 0 like default value!! ({0x43,0x89,0,0,0x40}; sample of data send by I2C to ADE7880 for Calibrate APGAIN)

all of register in 87/107 register list in datasheet had same happend for write value to those registers.

before set register i power up and software reset the ADE7880. and after set i run DSP.

why am i wrong?? or any process that i didn't use???

thanks.



.
[edited by: Mahdi at 2:27 PM (GMT 0) on 30 Apr 2020]
  • 0
    •  Analog Employees 
    on May 6, 2020 1:31 PM 6 months ago

    Are you using the eval board and software? Is this custom code? Please send code and if possible scope captures of coms. 

    Dave

  • hello dave thanks for reply.

    no i just use IC without eval board and software, i use I2C and i cant lock and unlock Data RAM memory!!!

    uint8_t RAM_ADD1 [2] = {0xE7,0xFE} ;
    uint8_t RAM_ADD2 [2] = {0xE7,0xE3} ;

    uint8_t RAM_Protection_1 [3] = {0xE7,0xFE,0xAD};
    uint8_t RAM_Protection_2 [3] = {0xE7,0xE3,0x00};
    uint8_t RAM_Protection_3 [3] = {0xE7,0xE3,0x80};

    TM_I2C_WriteMultiNoRegister(I2C2,0x70,RAM_Protection_1,3);

    TM_I2C_WriteMultiNoRegister(I2C2,0x70,RAM_Protection_2,3);

    and after that i starting to read data in memory RAM register with this code:

    Delayms(200);
    TM_I2C_WriteMultiNoRegister(I2C2,0x70,RAM_ADD1,2);
    memset(Data,'\0',4);
    TM_I2C_ReadMultiNoRegister(I2C2,0x71,Data,4);
    sprintf(Buff,"\r RAM_ADD1 CONFIG: 0x%x%x%x%x \n",Data[0],Data[1],Data[2],Data[3]);
    TM_USART_Puts(ADEUSART, Buff);

    Delayms(20);
    TM_I2C_WriteMultiNoRegister(I2C2,0x70,RAM_ADD2,2);
    memset(Data,'\0',4);
    TM_I2C_ReadMultiNoRegister(I2C2,0x71,Data,4);
    sprintf(Buff,"\r RAM_ADD2 CONFIG: 0x%x%x%x%x \n",Data[0],Data[1],Data[2],Data[3]);
    TM_USART_Puts(ADEUSART, Buff);

    --->

    and get this from IC
    RAM_ADD1 CONFIG: 0xe8000
    RAM_ADD2 CONFIG: 0x08502f