Re: Enable SPI driver on nrf52840


Jan Van Winkel <jan.van_winkel@...>
 

Hi Chuck,

Looks like you configured MOSI & MISO to the same pin (8) is this intentional?
As far as I know the NRF52840 does not support 3-wire (shared MISO/MOSI pin) SPI mode.

Regards,
Jan

On Sat, Sep 8, 2018 at 2:54 AM <cpmcparland@...> wrote:
Vinayak, Jan, et. al.

Thanks again for your combined help on this.  Just ran into a pothole and I thinks its
a simple config issue on my part.  I have a simple spi write set up and it appears
to be functional.  Am using the following prj.conf.

ONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y

CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_0=y
CONFIG_SPI_0_NAME="SPI_0"
CONFIG_SPI_0_OP_MODES=1
CONFIG_SPI_0_IRQ_PRI=1
CONFIG_SPI_NRFX=y
CONFIG_SPI_0_NRF_SPIM=y
CONFIG_SPI_0_NRF_SCK_PIN=7
CONFIG_SPI_0_NRF_MOSI_PIN=8
CONFIG_SPI_0_NRF_MISO_PIN=8
CONFIG_SPI_0_NRF_ORC=0xff

Having some problems w/debug, so I'm salting driver code with printk's.  Ok,
that's a bit of a hack, but will get debug up after this is running.  The problem is
that the driver is not returning on completion.  Its starting up and then it waits in
the sem take call -- as it should.  But, it never completes.  I have checked the
code that loads the event handler - that's executing at os start up.  I don't have
the ASYNC flag defined in config, so I would expect it to wait until the completion
event shows up from easyDMA.  Any suggestions?

Regards,
Chuck

Join {devel@lists.zephyrproject.org to automatically receive all group messages.