New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ulp I_RD_REG compile error #297
Comments
I tried to this I_RD_REG in my project, but seems the result I got is incorrect. Can someone please confirm if this is really implemented in esp-idf 2.0 release? |
Thanks for reporting this. We'll fix the issue before v2.0. |
Thanks @igrr for your quick response! did you get chance to test after .wr_reg -> .rd_reg? Can it really readback right value from a register? I did this in on my board, but not working as expected somehow. |
There is a bug in the definitions of |
@igrr, even AFTER I fixed the I_RD_REG definition locally, I still cannot read correct value from this instruction. Can you please confirm if that works for you? I'm sure the initial settings are OK, and I can read correct value from api rtc_gpio_get_level(...). |
The bugs related to |
Clearly it's a typo:
diff --git a/components/ulp/include/esp32/ulp.h b/components/ulp/include/esp32/ulp.h
index f4e37e9..179d1ee 100644
--- a/components/ulp/include/esp32/ulp.h
+++ b/components/ulp/include/esp32/ulp.h
@@ -320,7 +320,7 @@ static inline uint32_t SOC_REG_TO_ULP_PERIPH_SEL(uint32_t reg) {
*/
-#define I_RD_REG(reg, low_bit, high_bit, val) {.wr_reg = {
+#define I_RD_REG(reg, low_bit, high_bit, val) {.rd_reg = {
.addr = reg & 0xff,
.periph_sel = SOC_REG_TO_ULP_PERIPH_SEL(reg),
.unused = 0, \
The text was updated successfully, but these errors were encountered: