Hi, I can get ahold of the SPI device and call the spi_transceive function wihtout returning error codes. Logic analyzer shows nothing happening, such as SCK clocking. I am using the NRF52833-DK board.
In pj.conf:
CONFIG_SPI=y
Hi, I can get ahold of the SPI device and call the spi_transceive function wihtout returning error codes. Logic analyzer shows nothing happening, such as SCK clocking. I am using the NRF52833-DK board.
In pj.conf:
CONFIG_SPI=y
Hello,
Kind regards,
Øyvind
Hello,
Kind regards,
Øyvind
Hi Øyvind,
-Are you referring to the .ninja_log? Will provide when certain.
-SDK version is 2.2.0
--Yes, started with 'hello world' for nRF52833. Have 802.15.4, GPIO output, GPIO inputs w/ interrupts, and GPIOTE working
Thank you!
-Ben
Ben,
bmalchow said:-Are you referring to the .ninja_log? Will provide when certain.
No, I am referring to the logger module that you are using in your code:
if (ret < 0) { LOG_ERR("err code %d", ret); }
Please see the documentation on Logging API. This will allow you to print issues into a UART terminal through the nRF52833DK.
Have you tried going through our nRF Connect SDK Fundamentals course in DevAcademy?
You could also look at this SPI master slave sample which my colleague Torbjørn has made.
Kind regards,
Øyvind
Oh, I missunderstood. Yes, it is outputting a '0', which is success. I am printing over UART to NRF console. I'll have a look and get back. Thanks!
Hi Øyvind,
The sample project has been helpful! I think I may have found an issue though. I choose nrf52833dk_nrf52833 as my board as that is my dev board. When making my overlay, all the references, such as &spi2, are referencing nrf52dk_nrf52832.dts. Thi pins specified do not match the dev board I have so could this be a bug with nRF Connect? I figured I'd ask.
Aside from that, I cannot get the example to compile I am getting this now:
zephyr\include\zephyr\device.h:83:41: error: '__device_dts_ord_DT_N_NODELABEL_mcp2517fd_BUS_P_cs_gpios_IDX_DT_N_NODELABEL_mcp2517fd_REG_IDX_0_VAL_ADDRESS_PH_ORD' undeclared here (not in a function)
83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:\Users\Bmalch01\ncs\v2.2.0\zephyr\include\zephyr\device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:\Users\Bmalch01\ncs\v2.2.0\zephyr\include\zephyr\device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
It cannot get a reference to the CS pin. I had to add some tweaks to get the overlay to not have errors. I'll highlight those:
Forgot to add this as it shows where the error is being generated: