Post Go back to editing

should I register a callback function for each receive sport when integrate additional input/output sport interfaces

Category: Software
Product Number: ADSP-21569
Software Version: 3.0.2

hi guys

our costumes board is using adsp21569 , we have multiple input/output channels(1:sport 0B ->sport 4A for tdm16, 2:sport1B->sport 5A for tdm8 ,3:sport 6A->sport 2B for tdm16)

1.should I register 3 callback functions for each input/output channels , and define 3 different variables nDataAvail1 nDataAvail2 nDataAvail3 /CallbackCount1CallbackCount2CallbackCount 3 to count the data processing?  

 

2.should I register 3 SPU handler ?

thanks

  • Hi, 

    Regarding "should I register 3 callback functions for each input/output channels , and define 3 different variables nDataAvail1 nDataAvail2 nDataAvail3 /CallbackCount1CallbackCount2CallbackCount 3 to count the data processing? "

    >> Each SPORT typically operates independently. Hence, you can register a separate callback for each SPORT DMA channel or pair depending on how you are handling it. Each callback handles its own receive/transmit completion events.  

    Alternatively, the ADSP-2156x supports SPORT grouping feature, which allows multiple SPORTs to be enabled simultaneously. The SPORT Global Enable API can be used to start all grouped SPORT transfers at the same time. Ensure that all SPORTs within the group share identical data, clock, and frame sync configurations. When enabling multiple SPORTs, they must be properly synchronized so that all transfers start and/or stop together. 

    For reference, you can refer to Global SPORT example in ADSP-2156x BSP path given below. You can refer to the example and you can modify as per your requirement.[Installation directory]:\Analog Devices\EV-2156x_EZ-KIT-Rel3.0.0\EV-2156x_EZ-KIT\Examples\drivers\adc\SPT_GBL_Audio_Passthrough_TDM

    Also, please refer to the "Grouping of SPORTs" [Pg:23-44] and "Programming Global SPORT Groups" [Pg:23-50] for more clarity on SPORT grouping and Global Enable methods in the HRM.www.analog.com/.../adsp-2156x_hwr.pdf

    Regarding "should I register 3 SPU handler?"
    >> No, it is not necessary to register three SPU handler.

    Regards,
    Nandini C

  • hi 

    I don't think I can use the group feature because their configurations are different, you notice that "Ensure that all SPORTs within the group share identical data, clock, and frame sync configurations"

    I want make all the three channels (each pair transmits/receivers) work independently ,and   I need to integrate the ssn library , if I register three callbacks to   handles its own receive/transmit completion events, in the while loop , how should I finish below code to trigger ssn processing ?

    is that correct?  it seems that the second channel pair(associate with aDataAvail2) will interupt the first channel pair(associate with nDataAvail1 ,  in that example I only register two callbacks, can you teach me how to handle this?

  • Hi,

    Please refer the below FAQ link which contains documentation and examples to help with integrating additional input/output SPORT interfaces in the ADSP-2156x library example.
    Integrating Additional Input/Output SPORT Interfaces in the ADSP-2156x Library Example 

    If you have further inquiries regarding Sigma studio, please send you query via email at "ssplus_support@analog.com" for assistance.

    Regards,
    Nandini C