Page 1 of 1

WRITE_PERI_REG vs REG_WRITE

Posted: Wed Sep 19, 2018 7:05 pm
by michprev
Hi,
looking into this file https://github.com/espressif/esp-idf/bl ... /soc/soc.h it seems that REG_* and PERI_REG_* do the same because ETS_UNCACHED_ADDR and ETS_CACHED_ADDR does nothing. What is the idea behind it?

Re: WRITE_PERI_REG vs REG_WRITE

Posted: Sun Jan 13, 2019 2:35 pm
by abulafi
I had the same thought but couldn't find any answer.
I hope someone will shade light on this question.

Re: WRITE_PERI_REG vs REG_WRITE

Posted: Mon Jan 14, 2019 3:01 am
by ESP_Sprite
Not sure, I think PERI_REG is legacy and REG is newer, but you can use them interchangeably. The difference in uncached vs cached region probably comes from 'generic' Xtensa code; while the ESP32 has cache for the SPI flash and RAM, it sits outside the Xtensa cores and does not have a matching uncached region.