WRITE_PERI_REG vs REG_WRITE

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

WRITE_PERI_REG vs REG_WRITE

Postby michprev » Wed Sep 19, 2018 7:05 pm

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?

abulafi
Posts: 4
Joined: Tue Dec 25, 2018 11:20 am

Re: WRITE_PERI_REG vs REG_WRITE

Postby abulafi » Sun Jan 13, 2019 2:35 pm

I had the same thought but couldn't find any answer.
I hope someone will shade light on this question.

ESP_Sprite
Posts: 9719
Joined: Thu Nov 26, 2015 4:08 am

Re: WRITE_PERI_REG vs REG_WRITE

Postby ESP_Sprite » Mon Jan 14, 2019 3:01 am

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.

Who is online

Users browsing this forum: No registered users and 71 guests