ΣSigmaStudio Ask AI Русский Log in

Need help with I2C register configuration on Master Boot

SigmaDSP & SigmaStudio ICUDSP Nov 2, 2021 00:00 3 replies Original on forum ↗
Subscribe
ICUDSP Question
Nov 2, 2021 00:00

Hi,

I am using the master port of the ADAU1452 in I2C master mode (i.e MP0 is pulled down low, so it doesn't boot up into the default SPI master mode).

I am able to successfully see the traffic, but I think something might be wrong with my header file. The Sigma DSP documentation wiki page shows I need to enter the values in decimal and I've tried doing both decimal and hex (decimal = 144, hex = 90), but it's not actually configuring the register properly for some reason when I sniff the I2C bus and read them. I have a suspicion it might have something to do with the sub address bytes/settings in the shown image. Whenever I enter 2 or 3 it flags an error saying the length doesn't match which doesn't make sense to me.

Can someone please advise what I'm doing wrong?

XML file writing a simple register

<?xml version="1.0" standalone="no"?>
<ROM IC="CS53L30" IC_Address="90" Address_byte_length="1">
<dateTime>2021-11-6T05:12:14.2859851Z</dateTime>
<version>3.14.1.1593</version>
<page modetype="Mode 0">
<action instr="writeXbytes" len="2" addr="A" ParamName="Reg1" DspName="IC 1">15</action>
</page>
</ROM>

Audio Signal Processors

adau1452

SigmaDSP Audio Processors

cs53l30.png
cs53l30.png
ADIApproved Reply
Nov 3, 2021 00:00

Hello,

Upon changing Sub-Address Bytes in the SigmaStudio window, you must also change the "Address_byte_length" parameter in the second line of the XML file to match Sub-Address Bytes.

Additionally, the "writeXbytes" length includes not only the data length, but the Sub-Address length as well. So if you are writing 1 byte of data, with 3 byte Sub-Addressing, the length for "writeXbytes" would be 4.

In this case, your XML file would look like:

<?xml version="1.0" standalone="no"?>
<ROM IC="CS53L30" IC_Address="90" Address_byte_length="3">
<dateTime>2021-11-6T05:12:14.2859851Z</dateTime>
<version>3.14.1.1593</version>
<page modetype="Mode 0">
<action instr="writeXbytes" len="4" addr="A" ParamName="Reg1" DspName="IC 1">15</action>
</page>
</ROM>

Let me know if that works for you!

Best regards,

Joshua

ICUDSP Reply
Nov 4, 2021 00:00

Hi Joshua,

Thanks for the quick reply. I tried using a new .xml file and am no longer getting the mismatch error, however I am getting a new error window popping up:

Any idea what's causing this? I tried changing len = 4, address_byte_length =3, and the sub-address bytes = 1 but I still get the same error.

<?xml version="1.0" standalone="no"?>
<ROM IC="CS53L30" IC_Address="90" Address_byte_length="1">
<dateTime>2021-11-6T05:12:14.2859851Z</dateTime>
<version>3.14.1.1593</version>
<page modetype="Mode 0">
<action instr="writeXbytes" len="2" addr="A" ParamName="Reg1" DspName="IC 2">E5</action>
</page>
</ROM>

pastedimage1635999886177v2.png
pastedimage1635999886177v2.png
pastedimage1635999982428v1.png
pastedimage1635999982428v1.png
ADIApproved Reply
Nov 10, 2021 00:00

Hello,

My apologies for the delay in responding.

I've tried your XML file and it compiles properly on my machine, I tried it with 1 byte addressing.

SigmaStudio can sometimes be picky with the XML files. It doesn't always reload the XML contents when you re-compile the DSP program. After making changes, try closing your XML editor, and re-specify the XML file name in the Master Control Port module (even if the name didn't change). Then re-compile and download the program.

Best regards,

Joshua