Page 1 of 1

ESP32-S3 undocumented pcm2pdm register values

Posted: Mon Apr 17, 2023 7:05 pm
by Demirug
For low latency reasons we use the I2S module direct without the driver to output a PDM single channel signal. After figuring out how the clock needs to be configured it works great. But we noticed that the i2s_struct.h has more pdm related register values than we could find in the technical referece manual.

Code: Select all

            uint32_t tx_prescale                   :    8;  /*I2S TX PDM prescale for sigmadelta*/
            uint32_t tx_hp_in_shift                :    2;  /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
            uint32_t tx_lp_in_shift                :    2;  /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
            uint32_t tx_sinc_in_shift              :    2;  /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
            uint32_t tx_sigmadelta_in_shift        :    2;  /*I2S TX PDM sigmadelta scale shift number: 0:/2 , 1:x1 , 2:x2 , 3: x4*/
            uint32_t tx_sigmadelta_dither2         :    1;  /*I2S TX PDM sigmadelta dither2 value*/
            uint32_t tx_sigmadelta_dither          :    1;  /*I2S TX PDM sigmadelta dither value*/
and

Code: Select all

            uint32_t tx_iir_hp_mult12_5            :    3;  /*The fourth parameter of PDM TX IIR_HP filter stage 2 is (504 + I2S_TX_IIR_HP_MULT12_5[2:0])*/
            uint32_t tx_iir_hp_mult12_0            :    3;  /*The fourth parameter of PDM TX IIR_HP filter stage 1 is (504 + I2S_TX_IIR_HP_MULT12_0[2:0])*/
while the default values seems to be fine we like to make sure that they are optimal for our use case. Where these forgotten in the reference manual or are we not suppose to change these anyways?