Skip to content
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

error parameter in spi_bus_initialize when using example connect (IDFGH-9750) #11083

Closed
3 tasks done
gl-chenxiaosheng opened this issue Mar 30, 2023 · 7 comments
Closed
3 tasks done
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally

Comments

@gl-chenxiaosheng
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

IDF Version: master(ab63aaa)

I use esp32s3 and eth module DM9051 to run example ot_br.
And it couldn't work as expect, log as follow:

I (571) app_start: Starting scheduler on CPU0

I (575) app_start: Starting scheduler on CPU1

I (575) main_task: Started on CPU0

I (585) main_task: Calling app_main()

E (605) spi: spi_bus_initialize(774): invalid dma channel, chip only support spi dma channel auto-alloc

ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x4200afc7

0x4200afc7: eth_start at /home/kelly/esp/esp-idf/examples/common_components/protocol_examples_common/eth_connect.c:125 (discriminator 1)



file: "/IDF/examples/common_components/protocol_examples_common/eth_connect.c" line 125

func: eth_start

expression: spi_bus_initialize(CONFIG_EXAMPLE_ETH_SPI_HOST, &buscfg, 1)



abort() was called at PC 0x4037f207 on core 0

So I modify the param in spi_bus_initialize, it work.
I hope this configuration can be fix and merge into the branch, thanks.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Mar 30, 2023
@github-actions github-actions bot changed the title error parameter in spi_bus_initialize when using example connect error parameter in spi_bus_initialize when using example connect (IDFGH-9750) Mar 30, 2023
@xieqinan
Copy link
Collaborator

OK, I will confirm the problem and fix it.

@jjsch-dev
Copy link

Hi, I have the same problem with an esp32-s3 and a wiznet w5500.

I (44) boot: ESP-IDF v5.1-dev-4167-gab63aaa4a2 2nd stage bootloader
I (45) boot: compile time Apr 18 2023 10:51:48
I (45) boot: chip revision: v0.1
I (49) qio_mode: Enabling QIO for flash chip WinBond
I (55) boot.esp32s3: Boot SPI Speed : 80MHz

E (1674) spi: spi_bus_initialize(764): invalid dma channel, chip only support spi dma channel auto-alloc ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x4200f4be 0x4200f4be: eth_start at /home/jjsch/esp/esp-idf/examples/common_components/protocol_examples_common/eth_connect.c:125 (discriminator 1)

I also fixed the problem by changing the code of the function eth_start in the eth_connect.c file.

Fail
ESP_ERROR_CHECK(spi_bus_initialize(CONFIG_EXAMPLE_ETH_SPI_HOST, &buscfg, 1));

Success
ESP_ERROR_CHECK(spi_bus_initialize(CONFIG_EXAMPLE_ETH_SPI_HOST, &buscfg, SPI_DMA_CH_AUTO));
`

@KaeLL
Copy link
Contributor

KaeLL commented Apr 19, 2023

@xieqinan ETA on this?

@xieqinan
Copy link
Collaborator

The error has already been fixed, and it will be synced to esp-idf today or tomorrow.

@jjsch-dev
Copy link

@xieqinan thanks for reply, when you make the change in the master, I update the IDF and compile my project to confirm that the problem is fixed.

@jjsch-dev
Copy link

@xieqinan I did the pull to the master and tried it with my motherboard that has a PHY W5500 and it works fine, thank you very much for the work.

@xieqinan
Copy link
Collaborator

@jjsch-dev Happy to help you.

espressif-bot pushed a commit that referenced this issue Jul 12, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

5 participants