Post Go back to editing

ADAU1452 Slave Microcontroller port & USBi

Category: Hardware
Product Number: ADAU1452
Software Version: Sigma Studio 4.7-1831

Using a Teensy 4.1 to control ADAU1452, so the tutorial written for the Teensy 4.0 is really helpful, thanks.

My workflow is to develop and test the Sigma Studio design and use a USBi interface to load to the DSP (and to a self-boot 8MBit NAND Flash).  This is quick and allows the various features of the DSP to be quickly evaluated and adjusted in rea;-time using the USBi and Sigma Studio/

Once developed, the actual product uses the Teensy processor to control the ADAU1452 to make routing and system adjustments on the fly.  I would do this using the 'subordinate' I2C / SPI port on the DSP.

What is the best recommendation for hardware interfacing that would allow the Teensy to co-exist with a USBi adaptor that is plugged in at the same time?  So I can perhaps download and test the configuration using the development USBi interface on the actual target hardware.

For final targeting implementation I will probably use the exported files from SS rather than programming the Self-boot Flash (EEPROM) but this is a more convoluted method during development - so useful to be able to plug in and configure directly with Sigma Studio and USBi.

TIA

GKE

Top Replies

  • Hello GKE,

    What is the best recommendation for hardware interfacing that would allow the Teensy to co-exist with a USBi adaptor that is plugged in at the same time?  So I can perhaps download and…
Parents
  • Hello GKE,

    What is the best recommendation for hardware interfacing that would allow the Teensy to co-exist with a USBi adaptor that is plugged in at the same time?  So I can perhaps download and test the configuration using the development USBi interface on the actual target hardware.

    Were you initially planning for a parallel connection and asking for any other suggestions? 

    You can try having a multi pole multi throw switch externally to switch between your uC and USBi or you can also have a MUX circuit to switch between those two. 

    You can design an eight-pin connector in your board, four pin for uC and four pin for USBi, it will be split by MPMT switch like below.

                                             For I2C

                                          For SPI

    Another method may be having a MUX like  ADG774A.

    You can control the source select either by using your uC or a DIP switch.

    Make sure proper GND connections are given between devices.

    If you are going to use one for I2C and another for SPI, then note that initially the slave control port is in I2C mode by default, you have to toggle the SS pin three times or write three dummy writes to put the port into the SPI mode. Once it is put into the SPI mode then you can't go back to I2C mode without a power cycle or reset. Refer the slave control port in the datasheet for more info.

    Regards,

    Harish

Reply
  • Hello GKE,

    What is the best recommendation for hardware interfacing that would allow the Teensy to co-exist with a USBi adaptor that is plugged in at the same time?  So I can perhaps download and test the configuration using the development USBi interface on the actual target hardware.

    Were you initially planning for a parallel connection and asking for any other suggestions? 

    You can try having a multi pole multi throw switch externally to switch between your uC and USBi or you can also have a MUX circuit to switch between those two. 

    You can design an eight-pin connector in your board, four pin for uC and four pin for USBi, it will be split by MPMT switch like below.

                                             For I2C

                                          For SPI

    Another method may be having a MUX like  ADG774A.

    You can control the source select either by using your uC or a DIP switch.

    Make sure proper GND connections are given between devices.

    If you are going to use one for I2C and another for SPI, then note that initially the slave control port is in I2C mode by default, you have to toggle the SS pin three times or write three dummy writes to put the port into the SPI mode. Once it is put into the SPI mode then you can't go back to I2C mode without a power cycle or reset. Refer the slave control port in the datasheet for more info.

    Regards,

    Harish

Children
  • Thanks Harish.

    I can implement a hardware multiplexer for the control signals from both USBi and the control port from the micro as you suggest no problem.  However, I had hoped that there would be the possibility of operating the USBi adaptor in I2C mode and simply connecting it in parallel with the I2C bus from the microcontroller to the DSP SDA & SCL lines, without the need to use a hardware mux or switch - then all I would need to do is make sure that the microcontroller is not trying to access the I2C bus when the USBi adaptor is plugged in.  I'm assuming that when Sigma Studio is running and the USBi is connected, there is continuous I2C data traffic between the PC / USBi and the DSP for diagnostic readings etc.

    Anyway, if that is a possible scheme it would be more elegant, the only thing I would need to do is use an additional pin on the USBi connector on my PCB that gest grounded when the USBi is plugged in to indicate to the micro when in development mode (to inhibit local I2C bus access by the Teensy).

    Thanks for the prompt reply and support.

    GKE

  • Further update...

    I put a scope on the I2C lines from my USBi interface and it looks like it's driving the I2C SCL line 'hard' rather than with an open drain and pull-up.  Nasty, but it works in isolation.  So direct parallel connection with the microcontroller is probably not a solution unless I put some additional glue logic or a couple of FETs and pull-ups in the signal path.  Probably safest to use a dual 2:1 multiplexer solution.  For info anyway.  Note that the USBi adaptors that I am using are not made by AD - they are AliExpress ones in a silver USB pen-drive format with a 10-pin header at one end, USB-A at the other.