-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
sample/net/sockets/dumb_http_server not working with enc28j60 #45362
Comments
Upon further inspection of the issues involving the enc28j60, I reviewed this one. I followed the changes and replicated in my setup, and I still get the same issues. The basic understanding I have at the moment is pointing me towards the board overlay that I've added to the project. The build error messages involve the properties of the eth_enc28j60: eth_enc28j60@0 node. These are the errors I get:
This is the board overlay for the cc1352:
I saw that the .yaml file in the binding folders specified to use the macros and not the ENUM values. I'm using visual studio code and it didn't recognize the values as SPI_HALF_DUPLEX, and SPI_FRAME_FORMAT_TI. Any insights will be extremely appreciated at this point. Thank you |
@mauricionh - I was able to build your setup with this:
and |
Thank you @cfriedt, were you able to reach the server through a browser or ping the device? I can't find it. I'm in the same (local)network, checking with different tools to see what is connected to the local network. |
@mauricionh - I don't have the same Ethernet adapter board so cannot reproduce end-to-end. Likely you will also need to set some network addresses (just additional Kconfig settings). The If you are able to resolve your issue, then please let us know. |
Thank you so much! I will let you know how it goes. :) |
Closing for now. @mauricionh please reopen if you believe there is a bug here. |
Hi @cfriedt, the application builds correctly, but I don't see anything in the network. I've attached the files that are involved.. prj.conf, overlay-enc28j60.conf, cc1352r1_launchxoverlay Also tried removing the network addresses declared in prj.conf and only using the ones in the overlay. Does the dumb_http_server require some commands to start, maybe something needs to happen over the CC1352 serial interface? |
@cfriedt do you know how to invert the polarity on the MOSI and MISO lines? I'm comparing the signals from a sample app from arduino. MOSI is Active low, while MISO is Active high. This is the opposite for the current state of the dumb http server app for the cc1352. I think I need to change this in the board overlay, but I'm not sure how, and I haven't found the documentation. In the cc1352r1_launchxl-pinctrl.dtsi I see that the spi0_mosi_default pin is defined with the properties pinmux, and bias-disable, and spi0_miso_default is defined with the properties pinmux, bias-disable, and input-enable. |
@mauricionh - I would suggest asking on Discord maybe in the #spi channel (or if there is a #pinctrl channel, there too) |
Describe the bug
I'm trying to build the dumb_http_server sample application for a CC1352 launch pad, but it doesn't seem to work with the enc28j60 ethernet adapter board. I get a lot of build errors.
I'm using zephyr sdk 0.14.1, on Windows 10, following the instructions from the getting started page v 3.0.99
Please also mention any information which could help others to understand
the problem you're facing:
The target board I'm using is a Texas Instruments CC1352r1 launch pad xl. Hw: rev B.
I have roamed around several posts here in the repository, but they seem to include an outdated set of configuration flags. I was able to add the following to create my own overlay-enc28j60.conf file:
I also used this to create a cc1352r1_launchxl.overlay file:
To Reproduce
Steps to reproduce the behavior:
I'm using west build on a folder containing all elements from the dumb_http_server sample.
west build --pristine --build-dir \cc1352_enc28j60\build \cc1352_enc28j60 -b cc1352r1_launchxl -DCONF_FILE="prj.conf overlay-enc28j60.conf"
Expected behavior
Having no build errors.
Having a proper overlay for the board configuration
Having a proper enc28j60 configuration overlay
Impact
Showstopper
Logs and console output
Upon building the project I see the following:
warning: TEST_RANDOM_GENERATOR (defined at subsys/random/Kconfig:8) was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: (!ENTROPY_HAS_DRIVER) (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_TEST_RANDOM_GENERATOR and/or look up TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
I then start getting some warnings and errors:
*
[152/292] Building C object zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_cc13xx_cc26xx.c.obj <path-to-sdk>/zephyrproject/zephyr/drivers/spi/spi_cc13xx_cc26xx.c:237:36: warning: 'spi_cc13xx_cc26xx_driver_api' defined but not used [-Wunused-const-variable=] 237 | static const struct spi_driver_api spi_cc13xx_cc26xx_driver_api = { |
*
In file included from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/arch/arm/aarch32/arch.h:20, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/arch/cpu.h:19, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/kernel_includes.h:33, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/kernel.h:17, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/zephyr.h:18, from <path-to-sdk>/zephyrproject/zephyr/drivers/ethernet/eth_enc28j60.c:16: <path-to-sdk>/cc1352_enc28j60/build/zephyr/include/generated/devicetree_unfixed.h:3865:40: error: DT_N_S_soc_S_spi_40000000_S_eth_enc28j60_0_P_local_mac_address' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40000000_S_eth_enc28j60_0_P_label'? 3865 | #define DT_N_INST_0_microchip_enc28j60 DT_N_S_soc_S_spi_40000000_S_eth_enc28j60_0 |
*
In file included from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/toolchain/gcc.h:88, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/toolchain.h:50, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/sys/atomic.h:12, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/logging/log_msg.h:9, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/logging/log_core.h:9, from <path-to-sdk>/zephyrproject/zephyr/include/zephyr/logging/log.h:11, from <path-to-sdk>/zephyrproject/zephyr/drivers/ethernet/eth_enc28j60.c:13: <path-to-sdk>/zephyrproject/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_N_S_soc_S_spi_40000000_S_eth_enc28j60_0_BUS_ORD' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40000000_S_eth_enc28j60_0_ORD'? 96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name) |
And several others...
Environment (please complete the following information):
Thanks!
The text was updated successfully, but these errors were encountered: