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

ADAU1787 problem accessing Program Ram

SigmaDSP & SigmaStudio wygonski Aug 3, 2020 00:00 1 replies Original on forum ↗
Subscribe
wygonski Question
Aug 3, 2020 00:00

I am having trouble accessing Program Ram in SPI control mode from a microcontroller. This is a summary of my microcontroller code that downloads the exported DSP code (SigmaStudio v4.5) to the ADAU1787:

the PD\ is initially low
Take PD\ high for each DSP
Wait 50 ms
Put IC_1 in SPI control mode
Read Vendor and Device Id regs for both chips (this returns the correct result always)
Execute:
default_download_IC_1_Sigma();
default_download_IC_1_Fast();

After this the download is verified by reading Program Ram starting at 0x5000, but I do not read back the programs bytes as expected--the reads always return zeros. However I can read contents of various registers and the expected result is returned.

I examined the sequence contained in the exported default_download_IC_1_Sigma(), and removed the last line in the sequence which runs the Sigma Dsp core, which is:

SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1_SIGMA, REG_SDSP_CTRL2_IC_1_Sigma_ADDR, REG_SDSP_CTRL2_IC_1_Sigma_BYTE, R208_SDSP_CTRL2_IC_1_Sigma_Default );

This line enables the SDSP_RUN bit in the SDSP_CTRL2 reg. When this line is removed, the bytes read back from Program Ram match the program image.

Can anyone shed some light on why this is not working?

Thanks,

John

After removing this line from the download, I can read Program Ram and verify that it contains the expected bytes.

ADAU1787

Integrated/Special Purpose A/D Converters

Audio CODECs

DaveThib Reply
Aug 12, 2020 00:00

Hello John,

I think was is going on here is that the program RAM is protected once the core is running. I will verify this soon.

Dave T