MabezDev / idf2svd

Apache License 2.0
14 stars 7 forks source link

IO_MUX & other missing peripherals #11

Open MabezDev opened 4 years ago

MabezDev commented 4 years ago

I got a query from someone about blinking thier onboard LED (which for them was GPIO13). GPIO13 does not default to GPIO function, and has to be changed to function 3 in the IO_MUX. It seems idf2svd doesn't parse this peripheral. I've updated master with some more logging, heres the extra output:

The following files contained no parsable information:
[
"esp-idf/components/soc/esp32/include/soc/wdev_reg.h", 
"esp-idf/components/soc/esp32/include/soc/io_mux_reg.h", 
"esp-idf/components/soc/esp32/include/soc/nrx_reg.h", 
"esp-idf/components/soc/esp32/include/soc/fe_reg.h", 
"esp-idf/components/soc/esp32/include/soc/bb_reg.h"
]

io_mux is a pretty crucial peripheral to have, the rest I'm not so sure about. As this doesn't follow the documentation format, we'll likely have to add custom parsing logic for this file.

Edit: FYI, reposting from matrix:

mabez:

core::ptr::write_volatile(0x3FF49038 as *mut _, 0b10 << 12);

might do the job, these values come from the list in 4.10 to find the IO_MUX name of pin13, page 59 to get the adress of the register & finally page 71, the MCU_SEL bitfield

muisje commented 4 years ago

Not sure if this is related, but i used this fix that might do the job and it blinks for a couple minutes and then stops blinking until i reset it.

(in combination with the quick start project)