hello, I have WROOM-32D
I would like to start with SPI. I chosen SPI2 (HSPI), but I cannot write to some register i.e. SPI_PIN_REG, SPI_MOSI_DLEN_REG.
What would have a cause of this?
I would like to use registers without API (at this moment).
At the picture a I showed that i Can modify register on SPI0 and SPI1 interfaces.
Before that I set GPIO signal to function2 ( MCU_SEL na function2 (val=1)) (MOSI and CLK) and set them as output mode. I used GPIO_PAD13 and 14 (as a default)
Do you know what I have done wrong?
maybe some clock oraz mode master register bit,to enable this function perihperial/accces to write some register?
maybe some power managment features?
I Can write/clear to register which associatted with SPI(1) (see at pict.)
I can write to buffor eg with SPI_W0_REG(2) register.
I cannot write to register associated with HSPI
-
- Posts: 28
- Joined: Thu May 30, 2019 12:05 pm
I cannot write to register associated with HSPI
- Attachments
-
- ESP32_problem_wrtie_register_SPI2SPI3.png (85.29 KiB) Viewed 7457 times
Re: I cannot write to register associated with HSPI
Code: Select all
periph_module_enable(PERIPH_HSPI_MODULE);
-
- Posts: 28
- Joined: Thu May 30, 2019 12:05 pm
Re: I cannot write to register associated with HSPI
Thank you for help, I find the in 5.3.7 Technical Manual, but It's still not working correctlly.
Maybe Should I start/reset initialization of clock?
Maybe Should I start/reset initialization of clock?
- Attachments
-
- ESP32_problem_wrtie_register_SPI2SPI3_002.png (104.59 KiB) Viewed 7440 times
-
- Posts: 28
- Joined: Thu May 30, 2019 12:05 pm
Re: I cannot write to register associated with HSPI
If anyone know a diffrent about this 2 register?
- Attachments
-
- ESP32_problem_wrtie_register_SPI2SPI3_003.png (168.42 KiB) Viewed 7438 times
-
- Posts: 28
- Joined: Thu May 30, 2019 12:05 pm
Re: I cannot write to register associated with HSPI
anyone can help me?
Re: I cannot write to register associated with HSPI
You have to clear the reset bit for the peripheral as well as set the clk_en bit.
Is there a reason why you need to write the registers directly, rather than calling periph_module_enable(PERIPH_HSPI_MODULE); ?
If it's still not working, can you please post the code that you're using?
Is there a reason why you need to write the registers directly, rather than calling periph_module_enable(PERIPH_HSPI_MODULE); ?
If it's still not working, can you please post the code that you're using?
-
- Posts: 28
- Joined: Thu May 30, 2019 12:05 pm
Re: I cannot write to register associated with HSPI
oh, great, it's work, thx You
Who is online
Users browsing this forum: No registered users and 91 guests