How to read a parameter from I2C on boot time - ADAU1462

Hello,

Let me first explain what I want to do; During production a few calibration parameters will be saved to the upper page (64kB eeprom) of the I2C eeprom connected to the Master I2C port of the ADAU which is also used for self booting the DSP. Now we want to read these parameters from the eeprom during boot time and write them in the correct parameter in RAM, say the value of a DC source.  Reading of this parameters is easy using the "Startup Boot - Master Control Port IO" block together with a sequence file.

I checked the I2C lines with an oscilloscope and it does indeed read the correct data from the I2C EEPROM.

The problem I am facing is that I cannot find any documentation on how to instruct the DSP to copy this read data to a parameter, in this case the value of the DC source. Some assistance would be very helpful.

I can also see the data is read into the "ControlPortDataBuffer0" parameter of the corresponding Control Port So I am very close it only has to copy it to the DC value parameter.

I should probably make another entry but while I was experimenting with the different I2C read functions in Sigmastudio I noticed I was not able to read any memory address in the eeprom above 7FFF, when trying to read an address above this it would just read the value from address 7FFF (checked the lines using an oscilloscope). All I2C read functions seem to suffer this issue except for the "On Boot Time".

Thanks & kind regards,

Nand

Parents
  • 0
    •  Analog Employees 
    on Aug 19, 2019 9:08 PM

    Hello Nand,

    Have a look at this. I think this is what you need:

    https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/mastercontrolport/realtimevariant

    With this cell you can setup different variants. It was designed for products like a crossover/amp that may be used in several products. In one product it may be a three way and a 2 way in another. Or one has an 8-inch woofer and the other a 6" so the EQ parameters would need to be slightly different. Each product PCB would have different settings on the two GPIO pins and that would trigger the loading of a different set of parameters. 

    In your case it would only be one set but you would update the EEPROM location of the data and then load it in. 

    This cell is good because the code is only run once during the startup code and then it does not use up MIPS during normal operation. 

    Have a look and see if this might help you. 

    Dave T

Reply
  • 0
    •  Analog Employees 
    on Aug 19, 2019 9:08 PM

    Hello Nand,

    Have a look at this. I think this is what you need:

    https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/mastercontrolport/realtimevariant

    With this cell you can setup different variants. It was designed for products like a crossover/amp that may be used in several products. In one product it may be a three way and a 2 way in another. Or one has an 8-inch woofer and the other a 6" so the EQ parameters would need to be slightly different. Each product PCB would have different settings on the two GPIO pins and that would trigger the loading of a different set of parameters. 

    In your case it would only be one set but you would update the EEPROM location of the data and then load it in. 

    This cell is good because the code is only run once during the startup code and then it does not use up MIPS during normal operation. 

    Have a look and see if this might help you. 

    Dave T

Children
  • Hi Dave,

    Thanks for your response and suggestion.

    While this function might be a workaround for the problem I am facing it suffers from the same bug it not being able to read above EEPROM address 7FFF which I mentioned in the last paragraph of my initial post. Below you can see the variant editor where it is supposed to read from address FFF8 while monitoring the I2C lines with an oscilloscope shows it limits the address to 7FFF.

    I did verify the functionality with addresses lower than this and then it functions properly. Although for the purpose I want to use it not quite ideal.  Let me explain the drawbacks I am seeing. The main concern is that this variant parameters not only store the value of the parameter but also the address of where the parameter is located in the RAM. This is an issue since these addresses can change each time the program is amended and compiled. A workaround would be to use the indirect parameter access table but this creates a lot of overhead (32 bytes to store a 4 byte parameter).

    Anyhow would the regular master port I2C read functions work properly and be able to read above 7FFF there are more simple solutions (a triggered read for instance). I guess there is not much to do for me but wait until the bug gets fixed.

    Or is there any way to go further with my original thought of using the startup boot function with a sequence which does not seem to suffer from this bug?

    Thanks & kind regards,

    Nand

  • Hi Dave,

    Do I need to report this bug somewhere or is mentioning it here sufficient?

    Thanks & kind regards,

    Nand

  • 0
    •  Analog Employees 
    on Aug 26, 2019 6:06 PM in reply to Nand

    Nand,

    Sorry for the delayed response. I'll try this out on the bench here and report back. I'll also report the bug to the developers if need be.

    Ken

  • Hi Ken,

    Did you manage to replicate the behavior i am seeing?

    Thanks & kind regards,

    Nand

  • Hi Ken & Dave,

    Any news on this issue? We are waiting for this to be solved to finish our production software.

    Thanks & kind regards,

    Nand