How to config the tdm port on nrf54lm20

I want to try the tdm function on the nrf54lm20 dk.

But i have encountered problem in the first step.

I do not know how to add the tdm port and assign the pin.

Whin i enable the tdm in the device tree, there is nothin in this page.

only this code generated in the overlay files

I try to assign the pin:

But seems invalid...

Can you help me to pass the first step?

Thank you very much!

  • Hello Håkon

    No worries, you've already helped me a lot and thanks for that.

    And thanks for your detailed explanation, which has been truly beneficial to me.

    However, if you switch to the 24 MHz clock source, you will be much closer to the wanted 44.1 kHz:

    24000 / 44.1 = 17.007 (44.13 kHz)

    I have read the page you shared to me and the datasheet of nRF54LM20A, if i change the "

    mck-clock-source" to ACLK, seems it is the 24M? Do I understand correctly?
    The caveat at this time is that the zephyr driver does not support this clock source yet for the nRF54LM20, which I will report internally.

    Or you mean that now i can not use ACLK as “mck-clock-source”?

    There is still another question that confuses me, now we use I2S for TDM, does this mean that we cannot really use TDM format signals, for example, I don't think setting "i2s_cfg.channels" to a value greater than 2 is valid...

    Thank you very much!

  • Hello,

     

    huma said:

    I have read the page you shared to me and the datasheet of nRF54LM20A, if i change the "

    mck-clock-source" to ACLK, seems it is the 24M? Do I understand correctly?

    Yes, this shall change the clock source for MCK output, but I would recommend that you double-check the SCK/WS output to ensure that those are correct.

    As mentioned, the driver is not fully supporting these features, it seems.

    huma said:
    There is still another question that confuses me, now we use I2S for TDM, does this mean that we cannot really use TDM format signals, for example, I don't think setting "i2s_cfg.channels" to a value greater than 2 is valid...

    These two modes are not setting max_num_of_channels=2:

    https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/i2s/i2s_nrf_tdm.c#L533-L546

     

    ie. "I2S_FMT_DATA_FORMAT_PCM_SHORT" and "I2S_FMT_DATA_FORMAT_PCM_LONG".

    This test sets up different modes and configurations, which could be beneficial for your use-case:

    https://github.com/nrfconnect/sdk-zephyr/blob/main/tests/drivers/i2s/i2s_additional/src/main.c

     

    Kind regards,

    Håkon

  • Hello Håkon

    Thank you, i have to ask for help...

    I modified your project, the wave(lrclk, bclk, data) looks good, but when i connect to a ex-codec(adau1761),  the sound is distortion(can distinguish sound, but with heavy distortion, like data misalignment). But the same voice data i played on nrf5340 audio DK is well.

    And i have tried everything i can, but i can not find the problem, can you help me?

    hello_world_i2s_lm20a_modified.zip

    Thank you very much!

  • Hello,

     

    huma said:
    I modified your project, the wave(lrclk, bclk, data) looks good, but when i connect to a ex-codec(adau1761),  the sound is distortion(can distinguish sound, but with heavy distortion, like data misalignment). But the same voice data i played on nrf5340 audio DK is well.

    It hard for me to give a good indication, as I do not have the same setup as you.

    How does the waveforms (logic trace) compare between the two setups? Is the working communication I2S or left/right justified?

     

    Kind regards,

    Håkon

  • Hello Håkon

    I understand, you have already help me a lot.

    Thank you very much!

    I will close this ticket.

Related