This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

stuck at nrf_spim_task_trigger

Hi,

When I try spi commnucation with sensor on nrf52840 (using Mbed OS with SDK14.2), it stuck to nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_START); while spim_xfer is called.

I mean uart debug log stopped right before nrf_spim_task_trigger().

Any clue about this problem? or was there any similar issue to this?
Best regards,
Won Huh.
  • Here is the code I am using.
    #define SPI_INSTANCE 0 /**< SPI instance index. */
    static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE); /**< SPI instance. */
        nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;

        spi_config.frequency = SENSOR_DEFAULT_SPI_FREQUENCY;

        spi_config.ss_pin = A111_SPI_CS_N_Pin;
        spi_config.miso_pin = A111_SPI_MISO_Pin;
        spi_config.mosi_pin = A111_SPI_MOSI_Pin;
        spi_config.sck_pin = A111_SPI_CLK_Pin;

        APP_ERROR_CHECK(nrf_drv_spi_init(&spi, &spi_config, spim_event_handler, NULL));

        nrf_gpio_cfg(spi_config.sck_pin,

         NRF_GPIO_PIN_DIR_OUTPUT,
         NRF_GPIO_PIN_INPUT_CONNECT,
         NRF_GPIO_PIN_NOPULL,
         NRF_GPIO_PIN_H0H1,
         NRF_GPIO_PIN_NOSENSE);
       nrf_drv_spi_transfer(&spi, tx_buffer, buffer_size, buffer, buffer_size); 
  • Mbed forum is the best place to ask this question.  Did you try asking this question in their forum first?

Related