Writing new parameters to eprom from Raspberry Pi


I would like to write data on the eprom of an AUDA1452 over SPI from a Raspberry Pi. That basically already works, as long as I compile the programm with Sigmastudio, i get a file, that I can read and then write to the eprom in the same way sigma studio does this. 

As a next step I'd like to be able to change some parameters and then write these parameters to eprom (it's ok to rewrite the whole program), but without recompiling in sigmastudio. My idea is to simply change the values in the 'E2Prom.Hex' (exportet from Sigmastudio) and then rewrite the whole program, the same way I wrote it the first time. For this I've analyzed the file that is being written to eprom a bit and realized, that there seems to be some offset to the address where the value is written to in the 'E2Prom.Hex' file.

as an example for some arbitrary Parameter in the Project:
1. Project: Parameter Address 4983, Position of Parameter Value in E2Prom.Hex: 958 -> Offset: -4025
2. Project: Parameter Address 161, Position of Parameter Value in E2Prom.Hex: 140 -> Offset: -21

Within the Project this Offset is always constant, which means, that Sigma Studio writes something else at the beginning of the E2Prom.Hex file, but I don't know what this is and therefore don't know the Offset without checking it by hand. If I knew that I could save a lot of time, by doing this automatically with the Raspberry Pi

Has anybody ever done this, or has any clues to how to achieve this? That would save a whole lot of time!

Best regards

  • +1
    •  Analog Employees 
    on Feb 12, 2020 3:16 PM 9 months ago

    Hello Matias,

    This is an unusual thing to do. Usually it's best to use SigmaStudio to re-compile the program and generate a new EEPROM file. Is this for some kind of assembly line calibration?

    You can learn more about the selfboot EEPROM data format on pages 52 and 53 of the ADAU1452 datasheet. This describes the header and offsets you found in the hex file.

    I'm not convinced that changing the hex file will be the best way for you to proceed. My concern is that the register locations for your parameters are not guaranteed to stay in the same locations in the hex file if you change the program in SigmaStudio.

    One alternative, if the Raspberry Pi will always be connected to to your ADAU1452, is to use the Indirect Parameter Access Table. This table has the advantage of maintaining a constant address for your parameters, even if you alter the program in SigmaStudio. You could program the DSP to mute the outputs initially; and then after the DSP self-boots, update the parameters from the Raspberry Pi over the slave port and un-mute the outputs.


    Finally, if you really need to change the value in selfboot memory, you can change the EEPROM hex file as you suggest. However, you will also need to recompute and update the 64-bit checksum near the end of the hex file. And be very careful to verify the register locations if you ever change the SigmaStudio program.


  • Many thanks

    The pages you mentioned from the datasheet seem to tell me exactley what I was looking for (I obviously overlooked these... shame on me). 

    And as an explenation why I want to do this like this: The Programm itself should not change once I compiled it with sigmastudio, but only the values written there. I want the new values in the eprom, since they should also stay after e powerfail, even if the raspberry does not start for some reason (meaning, writing everything after startup from the raspberry is no option). As mentioned, I already achieved this, but did not know the length of all the blocks, before the block, that I am interested in (i always had to check what line changed after changing a value) and therfore it was very tedious to get everything setup, after a new firmware version was made. 

    Thanks again