SPI Kconfig.nrfx changes in recent (1.13.99) clone - setting GPIO pins for SPI master now fails.


cpmcparland@...
 

My zephyr app, built on ver 1.13.0 with the following prj.cfg file:

CONFIG_FLOAT=y
CONFIG_FP_SHARING=y
CONFIG_NEWLIB_LIBC=y
CONFIG_HEAP_MEM_POOL_SIZE=16384

CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_0=y
CONFIG_SPI_ASYNC=y
CONFIG_SPI_0_NAME="SPI_0"
CONFIG_SPI_0_OP_MODES=1
CONFIG_SPI_0_IRQ_PRI=0
CONFIG_SPI_NRFX=y
CONFIG_SPI_0_NRF_SPIM=y
CONFIG_SPI_0_NRF_SCK_PIN=28
CONFIG_SPI_0_NRF_MOSI_PIN=29
CONFIG_SPI_0_NRF_MISO_PIN=30
CONFIG_SPI_0_NRF_ORC=0xf

built and ran successfully on a nrf52840_pca10056 board.  I have recently updated to ver 1.13.99 and it no longer
gets through cmake because several symbols are no longer in the Kconfig.nrfx file for the SPI driver.  Namely,
CONFIG_SPI_0_SCK_PIN, _MOSI_PIN, and _MISO_PIN. I need to set these pins to coincide with target hardware,
Also, SPI_0_NAME seems to have disappeared.

Looking more closely at the Kconfig.nrfx files from both clones, the latest version has changed and does not include
symbols to set up these pins.  I guess I could edit the .config file, but that would be overwritten every time I run cmake.

Maybe I'm just out of phase here.  Is there a nrf spim driver update in progress?  Any help would be appreciated.

Thanks,
Chuck


Jan Van Winkel
 

Hi Chuck,

SPI config has switched to devicetree and you only need following configs in you prj.conf file for SPI_0:
CONFIG_SPI=y
CONFIG_SPI_0=y
CONFIG_SPI_NRFX=y

All other configurations come from the boards DTS files. Have a look at boards/arm/nrf52840_pca10059/nrf52840_pca10059.dts and dts/arm/nordic/nrf52840.dtsi . 

In case you need to adapt the default settings you can add an overlay to your project directory.

Regards,
Jan
 

On Mon, Oct 22, 2018 at 1:18 AM <cpmcparland@...> wrote:
My zephyr app, built on ver 1.13.0 with the following prj.cfg file:

CONFIG_FLOAT=y
CONFIG_FP_SHARING=y
CONFIG_NEWLIB_LIBC=y
CONFIG_HEAP_MEM_POOL_SIZE=16384

CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_0=y
CONFIG_SPI_ASYNC=y
CONFIG_SPI_0_NAME="SPI_0"
CONFIG_SPI_0_OP_MODES=1
CONFIG_SPI_0_IRQ_PRI=0
CONFIG_SPI_NRFX=y
CONFIG_SPI_0_NRF_SPIM=y
CONFIG_SPI_0_NRF_SCK_PIN=28
CONFIG_SPI_0_NRF_MOSI_PIN=29
CONFIG_SPI_0_NRF_MISO_PIN=30
CONFIG_SPI_0_NRF_ORC=0xf

built and ran successfully on a nrf52840_pca10056 board.  I have recently updated to ver 1.13.99 and it no longer
gets through cmake because several symbols are no longer in the Kconfig.nrfx file for the SPI driver.  Namely,
CONFIG_SPI_0_SCK_PIN, _MOSI_PIN, and _MISO_PIN. I need to set these pins to coincide with target hardware,
Also, SPI_0_NAME seems to have disappeared.

Looking more closely at the Kconfig.nrfx files from both clones, the latest version has changed and does not include
symbols to set up these pins.  I guess I could edit the .config file, but that would be overwritten every time I run cmake.

Maybe I'm just out of phase here.  Is there a nrf spim driver update in progress?  Any help would be appreciated.

Thanks,
Chuck


cpmcparland@...
 

Jan,

Thanks....am working on an overlay now.  Sure makes the prj.cfg look a lot
cleaner.  Am I right to expect that this sort of transformation will make its way
into other drivers as well (e.g. I2C)?

Regards,
Chuck


Jan Van Winkel
 

Hi Chuck,

As far as I know a lot of progress is ongoing in Zephyr to move to DTS and if I'm not mistaken I2C was there before SPI.

Regards,
Jan



On Mon, Oct 22, 2018 at 10:23 PM <cpmcparland@...> wrote:
Jan,

Thanks....am working on an overlay now.  Sure makes the prj.cfg look a lot
cleaner.  Am I right to expect that this sort of transformation will make its way
into other drivers as well (e.g. I2C)?

Regards,
Chuck