Cannot read back I2S registers (possible documentation bug)

detlier
Posts: 15
Joined: Tue Nov 06, 2018 3:44 am

Cannot read back I2S registers (possible documentation bug)

Postby detlier » Tue Jun 25, 2019 11:15 pm

I'm trying to debug a I2S/ADC application. I'd like to inspect the I2S registers to make sure they don't change, in particular the I2S_RX_SHORT_SYNC, I2S_TX_SHORT_SYNC, I2S_RX_MSB_SHIFT and I2S_TX_MSB_SHIFT registers. The following code just sets them and reads them straight back:

[Codebox]
void app_main()
{

I2S0.conf.tx_short_sync = 1;
I2S0.conf.rx_short_sync = 1;

ESP_LOGI(TAG,
"TX short sync: %d | RX short sync: %d",
I2S0.conf.tx_short_sync,
I2S0.conf.rx_short_sync
);

}
[/Codebox]

The output is:

[Codebox]
I (272) i2s-test: TX short sync: 0 | RX short sync: 0
[/Codebox]

I know that on some microcontrollers, certain registers will always read back a fixed value even though they can be set. However, page 320 of the ESP32 Technical Reference Manual lists these registers as R/W. Is the documentation wrong? Am I doing something wrong here?

[*] Platform: Wemos Lolin D32 (uses the ESP32-WROOM-32)
[*] IDF version: v3.3-beta2
[*] Build System: Cmake
[*] Compiler version: 1.22.0-80-g6c4433a
[*] Operating System: Linux (Ubuntu 18.04)
[*] Power Supply: USB

detlier
Posts: 15
Joined: Tue Nov 06, 2018 3:44 am

Re: Cannot read back I2S registers (possible documentation bug)

Postby detlier » Tue Jun 25, 2019 11:17 pm

Sorry, not sure why BBCode isn't working there, it was not disabled.

Who is online

Users browsing this forum: No registered users and 12 guests