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

ADAU1442 READBACK FUNCTION

SigmaDSP & SigmaStudio rwalborn Jan 23, 2017 00:00 6 replies Original on forum ↗
Subscribe
rwalborn Question
Jan 23, 2017 00:00

I have multiple ADAU442 in my system and recently added a rms and readback block so I could read the rms value of a signal ,Anyhow, when I first read the register I get normal reading the seem reasonable. However, when I read the register a second time I get all 0xffs. 3rd time is fine 4th is 0xff etc. Is this normal behavior?

.

Audio Signal Processors

adau1442

SigmaDSP Audio Processors

ADIApproved Reply
Jan 24, 2017 00:00

Hi

This doesn't seem like normal behavior. Are you sure that you are somehow not running into the limits of MIPS processing on the DSP. Is audio coming out correctly? If filters for example come at half the rate. This may mean that you are exceeding the program MIPS.

Please comment.

Miguel

rwalborn Reply
Feb 2, 2017 00:00

Miguel,

Even if I run in a program debug mode so I can halt the readback function between reads It still gives the same result.

DaveThib Reply
Feb 2, 2017 00:00

Hello,

How many bytes are you reading when you perform the read?

Dave T

rwalborn Reply
Feb 7, 2017 00:00

4 bytes

DaveThib Reply
Feb 7, 2017 00:00

I am not certain how you are doing the read but try this. Send a three byte message with no stop bit, So the chip address with the R/WR bit low (set to write) then the two bytes for the address of the memory location.

Then wait 600us and send a repeated start command with the chip address but this time with the R/WR bit high (set to read) then clock in four bytes. I think you will find this works.

If you look at SigmaStudio you will see that it has a read request followed by a read. Then looking at the I2C data itself you will see the three byte request followed by a delay to give it time to gather the data then the repeated start and the data.

Let me know how this goes.

Dave T

DaveThib Reply
Feb 7, 2017 00:00

One further bit of information. I inquired with one of the engineers on the project and he thinks the delay is really not needed. That the time it takes for the repeated start byte to transmit is long enough. So you can also try it with no delay, just the repeated start condition just like you would do with an EEPROM. Write the address you want to access, then a repeat start with the read bit set and then read the data. This should work.

Dave T