Skip to content

fixed periph.module bug#187

Open
davispolito wants to merge 1 commit into
someweisguy:release/v4.1from
davispolito:release/v4.1
Open

fixed periph.module bug#187
davispolito wants to merge 1 commit into
someweisguy:release/v4.1from
davispolito:release/v4.1

Conversation

@davispolito
Copy link
Copy Markdown

Fixes #164

@bensuffolk
Copy link
Copy Markdown
Contributor

This is quite hard to see what change you have made as the code has been reformatted so there are a lot of changes visible when you compare them.

@Florida-Rob
Copy link
Copy Markdown

Anyone finds the same error on esp-idf 5.4 ? compiles with the new uart.c, but other errors, immediate panic:
p.s I'm using esp32-c6 with UART2 which is the LP UART (which has always been 'special' since 5.2+

--- 0x420f1884: periph_ll_enable_clk_clear_rst at C:/Espressif/frameworks/esp-idf-v5.4/components/hal/esp32c6/include/hal/clk_gate_ll.h:303 (discriminator 1)
0x420f1882: periph_ll_enable_clk_clear_rst at C:/Espressif/frameworks/esp-idf-v5.4/components/hal/esp32c6/include/hal/clk_gate_ll.h:303

@Florida-Rob
Copy link
Copy Markdown

OK, so I found the fix, which was difficult to find. YET AGAIN, esp-idf have changed how LP peripherals are initialized, hence why again UART2 on the C6 was broken. I ran a diff on the 5.3.1 to 5.4 and found changes in lp_core_uart.c, which was different again from 5.2.x, I have a good fix, but need to know WHICH uart.c to modify. which has all the latest fixes ?

@Florida-Rob
Copy link
Copy Markdown

ok, so here is the file, modified to support up to 5.4
i have a question, why did @davispolito add dmx +1 ? the address passed from main is set correctly anyhow :
dmx_num = LP_UART_NUM_0;
so why did you add dmx+1 ? it should be simply as below:
periph_module_reset((periph_module_t)(**dmx_num**));

in my case setting LP_UART_NUM_0 does equate to UART2, and dmx_num = 2
uart.zip

@kernel-machine
Copy link
Copy Markdown

Why this code is not yet merged? Please don't left the project.
This issue is still present

@mariusmoo
Copy link
Copy Markdown

See my abandoned PR at #220 for why this should not be merged - my PR was this one minus the whitespace changes so you can see what's going on. We need a robust fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile Error ESP32

5 participants