在"spi_master_example_main.c"中对SPI引脚的定义是这样的
#define PIN_NUM_MISO 25
#define PIN_NUM_MOSI 23
#define PIN_NUM_CLK 19
#define PIN_NUM_CS 22
但是这个与"esp32_datasheet_en.pdf"中的定义对不上号
在49页的IO_MUX中,GPIO_19和GPIO_22的定义分别是VSPIQ和VSPIWP
而GPIO25更是没有SPI的接口定义
请问这个引脚的分配到底根据哪个文档?
SPI master例程的疑问
Re: SPI master例程的疑问
The datasheet gives correct mapping of pins to the IOMUX.
SPI can be connected to the pins via IO MUX or GPIO matrix.
Since the example uses pins which are not IOMUX pins, the driver will use GPIO matrix to connect the peripheral to the pins.
SPI can be connected to the pins via IO MUX or GPIO matrix.
Since the example uses pins which are not IOMUX pins, the driver will use GPIO matrix to connect the peripheral to the pins.
Re: SPI master例程的疑问
你好,
ESP32有一个GPIO交换矩阵,一些外设可以通过该交换矩阵将信号分配到任意可用的io pad上,方便硬件设计。
可以参考如下资料:
* https://docs.espressif.com/projects/esp ... -and-iomux
* https://espressif.com/sites/default/fil ... ual_en.pdf
ESP32有一个GPIO交换矩阵,一些外设可以通过该交换矩阵将信号分配到任意可用的io pad上,方便硬件设计。
可以参考如下资料:
* https://docs.espressif.com/projects/esp ... -and-iomux
* https://espressif.com/sites/default/fil ... ual_en.pdf
-
- Posts: 22
- Joined: Wed Dec 19, 2018 2:10 am
Re: SPI master例程的疑问
thanks for answering. And I've found detailed description for IO MUX and GPIO Matrix, they are really amazing things and totally different from stm32 series. It would be much better if there is a highlight in these different features in the general HW/SW datasheets.
I get from the ds that utilization of GPIO MATRTIX would compromise the high speed performance of the high speed buses as SPI, UART etc, and I wonder if there is a example of direct access to the spi using only IOMUX? Or is it compatible with the povided spi master example, and all I have to do is replace the PIN_MAP defs with IO MUX accessible pins?
-
- Posts: 22
- Joined: Wed Dec 19, 2018 2:10 am
Re: SPI master例程的疑问
谢谢,这个功能挺有意思,有种在用FPGA的错觉Xiong Yu wrote: ↑Tue Dec 25, 2018 11:14 am你好,
ESP32有一个GPIO交换矩阵,一些外设可以通过该交换矩阵将信号分配到任意可用的io pad上,方便硬件设计。
可以参考如下资料:
* https://docs.espressif.com/projects/esp ... -and-iomux
* https://espressif.com/sites/default/fil ... ual_en.pdf
Re: SPI master例程的疑问
That's right, you can change the pin numbers in the example to IOMUX pins, and the driver will use the IOMUX.aureoleday wrote: ↑Tue Dec 25, 2018 2:19 pmOr is it compatible with the povided spi master example, and all I have to do is replace the PIN_MAP defs with IO MUX accessible pins?
Who is online
Users browsing this forum: Bing [Bot] and 41 guests