Post Go back to editing

Analog Signal Pass-Through on EV-SC598-SOM

Category: Software
Product Number: ADSP-SC598
Software Version: CrossCode Embedded Studio 3.0.1
Category: Software
Product Number: SC-598
Software Version: CrossCode Embedded Studio (CCES) 3.0.1

Platform:

Processor: ADSP-SC598

Board: EV-SC598-SOM with EV-SOMCRR-EZKIT

Development Environment: CrossCore Embedded Studio (CCES)

Goal:

I am working on passing an analog signal from a waveform generator connected to AN1/AN2 and outputting this signal as an waveform through DAC1/DAC2 to an oscilloscope. The system should act as a real-time analog signal pass-through mechanism.

Problem:

While exploring example projects, I found the Audio Walkthrough I2S SC598 Share example project, which handles audio signal processing using the I2Sprotocol. I tried to use it since the description was best matching one with my goal among the others. Since it's my first ever experience with Board and CrossCode itself as part of my bachelor's degree I lack a lot of experience and still in process of reading some manuals. Hope that someone can help with this issue. 

Devices Involved:

1. EV-SC598-SOM with ADSP-SC598 processor.

2. Waveform generator connected to AN1/AN2 (analog input).

3. Oscilloscope connected to DAC1/DAC2 (analog output).

4. Development environment: CrossCore Embedded Studio (CCES).

Actions Taken:

I have identified the necessary HADC and DAC peripherals on the SC598, and I understand that these need to be initialized and configured.

I reviewed the Audio Walkthrough I2S SC598 Share example project, which is based on I2S. While the I2S setup works for digital audio, it doesn’t directly help with my analog pass-through goal.

Final Objective:

I want to modify the project (or develop a new one if needed) to:

1. Initialize reading the analog signals from AN1/AN2.

2. Initialize sending the analog signals through DAC1/DAC2 to the oscilloscope.

3. Pass the signal in real-time from AN1/AN2 through the board SC-598 and directly out through DAC1/DAC2.

Request:

Is it possible to modify the I2S-based project to achieve this?

Could you provide guidance or an example of how to properly configure peripherals for this type of real-time analog signal pass-through?

Any references to existing BSP examples or additional resources for configuring on the EV-SC598-SOM would also be helpful.

Additional Notes:

I am open to either modifying the I2S example project or starting fresh, whichever would be more straightforward.

I would appreciate any tips on the proper clock settings, channel configuration, and data transfer mechanisms to ensure real-time signal pass-through.

Thank you in advance for your support!

  • Hi Nurmukhammad,

    We believe the Audio_Talkthrough_I2S example provided in the BSP will meet your requirements.
    Here’s the flow of the Audio_Talkthrough_I2S example. Here TWI is used to set up the ADC and DAC.

    As you intend to supply analog input to the ADC and obtain output from the DAC, you may directly utilize this example.
    This example demonstrates using buffers int_SP0ABuffer1, int_SP0ABuffer2, int_SP0ABuffer4 and int_SP0ABuffer5 as user defined buffers. The input data received from the ADC is written into int_SP0ABuffer4 and int_SP0ABuffer5 buffer via SPORT4B.

    The data in int_SP0ABuffer4 is copied to int_SP0ABuffer1 and data in int_SP0ABuffer5 is copied to int_SP0ABuffer2. The copied data (int_SP0ABuffer1, int_SP0ABuffer2) is then sent to the DAC through SPORT4A.
    In the ADSP-SC598 EV-SOMCRR-EZKIT, audio jack J12 is connected to ADC channels 1 and 2, while J17 is connected to DAC channels 1 and 2. Please refer the EV-SOMCRR-EZKIT schematic for more details in the below link.
    https://www.analog.com/media/en/technical-documentation/eval-board-schematic/ev-somcrr-ezkit-schematic.pdf

    In ADSP-SC598 EV-SOMCRR-EZKIT, ADC supports sampling rate range from 8kHz to 192kHz. We can set this sample rate ranges by setting 0 to 2 bit of the ADC SAI_CTRL0 register. For more information refer the Table 20. Bit Descriptions for SAI_CTRL0 in ADAU1979 datasheet. But, DAC only supports the sample rate range from 32kHz to 192kHz. We can't set the sample rate below the 32kHz in DAC register. For more information refer the Table 31. Bit Descriptions for DAC_CTRL0 in ADAU1962A datasheet. The example provided uses a default sample rate of 48 kHz.

    Please refer the ADAU1979(ADC) and ADAU1962A(DAC) datasheets in the below link:
    https://www.analog.com/media/en/technical-documentation/data-sheets/adau1979.pdf

    https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1962A.pdf

    For more information regarding SPORT, please refer the Hardware Reference Manual in the below link.
    https://www.analog.com/media/en/dsp-documentation/processor-manuals/adsp-sc595-sc596-sc598-hrm.pdf

    Could you please confirm if you’ve tested the example without any modifications? If yes, please provide audio input to the ADC and let us know if you can hear the correct output from the DAC.
    Alternatively, if you have made any modifications to the example, please let us know the changes.

    Regards,
    Nandini.C

  • I have not modified anything in the example project. I tried to load and run the example project on the board and got following result in the console. However, nothing has changed related to the waveform generator and digital storage oscilloscope. The input is sin signal:

  • Hi Nurmukhammad,

    Thanks for your inputs.

    As stated earlier, could you please check by supplying audio input to the ADC and let us know if the DAC output through the headphones is accurate?

    Regards,
    Nandini C

  • Hi Nandini,

    Thank you for your follow-up. I’ve tested the example project with an audio input signal directly into the ADC and connected the output to headphones via the DAC. Unfortunately, I am still not receiving any output signal from the DAC. I double-checked my connections, and the sine wave input is functioning as expected from the waveform generator.

    Here are a few additional details from my setup:

    • I’m using a 1 kHz sine wave input to the ADC channels 1 and 2 through J12.
    • The DAC channels 1 and 2 are connected to Oscilloscope as an output at J17.
    • No modifications have been made to the sample rate or the default settings in the example.

    Could you advise if there’s any further diagnostic step I should take? Also, is there any way to confirm whether the ADC is successfully receiving the signal, or if there’s an issue between the ADC and DAC data transfer?

    Thanks again for your support!

    Best regards,
    Nurmukhammad

  • Hi Nurmukhammad,

    Thanks for sharing more details.

    1.To analyse further, could you please let us know which BSP version you are using? Also, please confirm if you’re using the example from the following path:
    <installation path>:\Analog Devices\EV-SC59x_EZ-KIT-Rel<BSP revision>\EV-SC59x_EZ-KIT\Examples\drivers\adc\Audio_Talkthrough_I2S.

    2. You can set a breakpoint in the SPORT Rx callback to check if the DAC buffers are receiving data. You can view the buffers in the expressions window. To add the Expressions view to your current perspective, go to Window > Show View > Other > Debug > Expressions and click OK. For more information, refer to the following help path:
    CrossCore® Embedded Studio 3.0.1 > Integrated Development Environment > Navigating Within the IDE > Views > Debug.

    3.From your previous image, it seems you are using the SHARC core example. However, you have imported both ARM and SHARC examples. Please confirm whether you are using the ARM or SHARC example. If you are working with the ARM core, please add the following function before the main function and let us know the outcome:
    " void adi_mmu_Init(){
          asm("nop;");
    } "

    4.In your hardware boot mode switch is set to 1. Please change this to no boot mode (0) and try again.

    Regards,
    Nandini.C

  • Hello Nandini,

    Thank you for your detailed response.

    To answer your questions:

    1. I am currently working on BSP revision 4.0.
    2. I followed your instructions to set a breakpoint in the SPORT Rx callback and view the buffers in the Expressions window. I’ll continue to use this approach to check if the DAC buffers are receiving data.
    3. Regarding the use of either the ARM or SHARC core example, I can confirm that I am primarily working with the SHARC core. However, I will try the suggested function for the ARM core if necessary.
    4. I also took into consideration the suggestion to change the hardware boot mode to no boot mode (0), and I will make that adjustment.

    In the end, I swapped the input and output to other audio types, specifically using laptop audio in and speaker out, which ended up working just fine. However, when I use an oscilloscope and signal generator, I don’t get any signal.

    Thank you again for your assistance.

    Best regards,
    Nurmukhammad

  • We’re glad to know that you can hear the audio, and it appears there’s no issue with our BSP example.
    It seems that the problem may be related to the input source (the signal generator), since you can hear output when using your laptop. So, please verify if you're receiving proper output from the signal generator.
    Please let us know if you need any further assistance

    Regards,
    Nandini C