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

Ethernet Sample Echo Failed in Nucleo_f429zi - bisected #24509

Closed
ghost opened this issue Apr 20, 2020 · 4 comments · Fixed by #25288
Closed

Ethernet Sample Echo Failed in Nucleo_f429zi - bisected #24509

ghost opened this issue Apr 20, 2020 · 4 comments · Fixed by #25288
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug
Milestone

Comments

@ghost
Copy link

ghost commented Apr 20, 2020

Describe the bug
I've tried with commit 65eacef to use the IP connection on a nucleo_f429zi but it doesn't work.
I bisected it and it seems the problem slipped in with commit
`commit bfaa109
Author: Erwan Gouriou erwan.gouriou@linaro.org
Date: Thu Apr 16 20:52:22 2020 +0200

boards: stm32: Use dt API for peripheral configuration

Replace use of Kconfig SPI_X symbols by calls to DT API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>`

To Reproduce
Steps to reproduce the behavior:

  1. cd zephyrproject/zephyr/samples/net/sockets/echo
  2. west build -p auto -b nucleo_f429zi .
  3. west flash
  4. from pc ping 192.0.2.1

Expected behavior
Example must work

Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper)

@ghost ghost added the bug The issue is a bug, or the PR is fixing a bug label Apr 20, 2020
@jukkar jukkar added platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug labels Apr 20, 2020
@ABOSTM
Copy link
Collaborator

ABOSTM commented Apr 21, 2020

Hi @giellamoswhard,
With the commit you highlight, there is a conflict for STM32F429 nucleo board:
Both SPI1 and Ethernet use pin PA7.
As a workaround, you can disable SPI1: edit file ...\boards\arm\nucleo_f429zi\nucleo_f429zi.dts

&spi1 {
	status = "disabled";
};

I need to wait @erwango , to define the best solution to solve this conflict.

@ghost
Copy link
Author

ghost commented Apr 21, 2020

@ABOSTM Thank you very much the workaround is confirmed to work.

@akofoed
Copy link

akofoed commented Apr 21, 2020

You can use MOSI on pin PB5 instead:
pinmux:

#ifdef CONFIG_SPI_1
#ifdef CONFIG_SPI_STM32_USE_HW_SS
	{STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS},
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
	{STM32_PIN_PA5, STM32F4_PINMUX_FUNC_PA5_SPI1_SCK},
	{STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO},
	{STM32_PIN_PB5, STM32F4_PINMUX_FUNC_PB5_SPI1_MOSI},
#endif	/* CONFIG_SPI_1 */

@akofoed
Copy link

akofoed commented Apr 21, 2020

I see that the last part of the .../nucleo_f429zi/pinmux.c that someone has updated all the ifdefs to DT_HAS_NODE but they are missing the last USB_otg_fs one. This compiles on my machine:

#if DT_HAS_NODE(DT_NODELABEL(usbotg_fs))
	{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
	{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
#endif	/* CONFIG_USB_DC_STM32 */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants