Updating SigmaDSP Parameter with a Microcontroller

Document created by BrettG Employee on Jan 9, 2014
Version 1Show Document
  • View in full screen mode

Originally authored by KJBob


     Working with SigmaStudio is like a walk in a beautiful park -- until you say the word microcontroller, then the ground opens up and you fall into the "digital snake pit" underneath.  Once you find your way down there, you'll master booting and controlling your DSP as have many before you.  I'm still not very comfortable down there either.  In spite of this (or perhaps because of it!) here's a bit of help:


    Size of write sequences:  As you found out, there's more activity on the scope than the raw data suggests.  Notice in the capture window that these are safeload writes.  Writing parameters directly to a running DSP's memory causes awful noises, the safeload method avoids that.  It does, however, involve more overhead, reflected in your scope trace.  Safeload is described on pages 30 & 37 of the ADAU1701 data sheet; you can also search for its many references in this forum.  Also, although the DSP takes 28-bit parameters padded to four bytes, actually each of them are five bytes long.  There needs to be a dummy byte in the middle, for reasons described at http://ez.analog.com/thread/6429


    Booting the -1701:  In theory it's possible to self-boot and change to uC control afterward, yet this approach appears roundly discouraged in the forum -- see for example, http://ez.analog.com/message/14318#1431
Thus, I also suggest that you boot the -1701 from your micro.  It may not be as difficult as it first appears.  ADI's orthodox boot method involving C header files and such is designed to boot any SigmaDSP -- fortunately this is a bit more than what some older models need.  At the risk of espousing heresy,  here's a primitive boot procedure:

  • Link-compile-download your design, ignore the error box if no hardware is presently connected.  The Capture Window shows only a few block writes, unlike the dozens that more powerful SigmaDSPs need -- this makes the primitive boot method possible.


  • Select Export System Files from the Actions menu, save them in your project's folder.
  • Open the resulting TxBuffer_IC1 file with Notepad.  Copy to clipboard all the lines between commented lines as shown below -- these are your DSP program instructions.



  • Paste these lines into a byte constant (or equivalent) in your uC source code.
  • Do the same with the  Param  and  IC 1.HWConfiguration blocks.  You now have  byte constants for program, parameters, and HW config in your uC code.


If anyone who has hooked up an Arduino to a SigmaDSP is willing to jump in here, that would be appreciated (I've only used PICs).  Basically you have your Arduino get the DSP's attention over the SPI bus and set up its program memory's base address (0x0000).  Write a loop that block-writes all 5120 bytes to the DSP.  Do the same for the parameters (4096 bytes) and HW controls (24 bytes).  Finally, write 0x00, 0x1C to your 1701's core control register at address 0x081C to enable the DSP core (must maintain core!).



     Best regards,





This FAQ was generated from the following discussion: Parameter updates with Microcontroller

3 people found this helpful