I think you need a few more things turned on in your config file. To figure out what you need turned on I always use the menuconfig tool and diff the old and new .config files, then I take the changes and pit them in my prj.conf file
In this case I ran ‘ninja menuconfig’ in the build directory, turned on SPI, then CANBUS, then MCP25625, here is a diff between zephyr/.config.old and zephyr/.config:
> CONFIG_SPI=y 678a679,695 > # CONFIG_SPI_ASYNC is not set > # CONFIG_SPI_SLAVE is not set > CONFIG_SPI_INIT_PRIORITY=70 > # CONFIG_SPI_LOG_LEVEL_OFF is not set > # CONFIG_SPI_LOG_LEVEL_ERR is not set > # CONFIG_SPI_LOG_LEVEL_WRN is not set > CONFIG_SPI_LOG_LEVEL_INF=y > # CONFIG_SPI_LOG_LEVEL_DBG is not set > CONFIG_SPI_LOG_LEVEL=3 > # CONFIG_SPI_0 is not set > # CONFIG_SPI_1 is not set > # CONFIG_SPI_2 is not set > # CONFIG_SPI_3 is not set > # CONFIG_SPI_4 is not set > # CONFIG_SPI_5 is not set > # CONFIG_SPI_6 is not set > CONFIG_SPI_NRFX=y 749a767,768 > # CONFIG_SPI_NOR is not set > # CONFIG_SPI_FLASH_W25QXXDV is not set 760c779,797 < # CONFIG_CAN is not set --- > CONFIG_CAN=y > # CONFIG_CAN_LOG_LEVEL_OFF is not set > # CONFIG_CAN_LOG_LEVEL_ERR is not set > # CONFIG_CAN_LOG_LEVEL_WRN is not set > CONFIG_CAN_LOG_LEVEL_INF=y > # CONFIG_CAN_LOG_LEVEL_DBG is not set > CONFIG_CAN_LOG_LEVEL=3 > CONFIG_CAN_INIT_PRIORITY=80 > CONFIG_CAN_WORKQ_FRAMES_BUF_CNT=4 > CONFIG_CAN_0=y > CONFIG_CAN_1=y > CONFIG_CAN_MCP2515=y > CONFIG_CAN_MCP2515_OSC_FREQ=8000000 > CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE=512 > CONFIG_CAN_MCP2515_INT_THREAD_PRIO=2 > CONFIG_CAN_MCP2515_MAX_FILTER=5 > CONFIG_CAN_MCP2515_INIT_PRIORITY=80 > # CONFIG_CAN_LOOPBACK is not set > # CONFIG_CAN_NET is not set
My guess is you are not finding the SPI bus because you haven’t configured it.
Lawrence King Principal Developer +1(416)627-7302
From: users@... <users@...>
On Behalf Of christophhintz@...
Sent: Tuesday, November 19, 2019 5:19 AM To: users@... Subject: [Zephyr-users] MCP2515 with nRF52832 using zephyr #dts #nrf52832
Hi I had a question to setup the MCP2515 driver in the zephyr project. We made a custom board for the decawave DWM1001 module, which uses a nRF52832 chip. They have a device tree file in the zephyr project for this module, so I started with that device tree and configured it for our setup, which is
. I attached the devicetree and project file to this post.
|
||||||||||||||
|