nRF52804 SPIM3 not work.
(SCLK/MOSI not output)
However, if I debug it using jlink, it works.
My environment is
nRF52840-DK(PCA10056/v1.0.0)
nRF52 SDK 17.0.2
My program is
/* SCK */ nrf_gpio_pin_clear(SPIM_CLK_PIN); nrf_gpio_cfg(SPIM_CLK_PIN, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_CONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0S1, NRF_GPIO_PIN_NOSENSE); /* MOSI */ nrf_gpio_pin_clear(SPIM_MOSI_PIN); nrf_gpio_cfg_output(SPIM_MOSI_PIN); /* MISO */ nrf_gpio_cfg_input(SPIM_MISO_PIN, (nrf_gpio_pin_pull_t)NRFX_SPIM_MISO_PULL_CFG); /* SS */ nrf_gpio_pin_set(SPIM_SS_PIN); nrf_gpio_cfg_output(SPIM_SS_PIN); /**/ NRFX_IRQ_DISABLE(TARGET_SPIM_IRQ); SpimReg.ENABLE = SPIM_ENABLE_ENABLE_Enabled << SPIM_ENABLE_ENABLE_Pos; SpimReg.TASKS_STOP = 1; SpimReg.PSEL.SCK = SPIM_CLK_PIN; SpimReg.PSEL.MOSI = SPIM_MOSI_PIN; SpimReg.PSEL.MISO = SPIM_MISO_PIN; SpimReg.FREQUENCY = SPIM_FREQUENCY_FREQUENCY_K125; SpimReg.RXD.PTR = uint32_t(m_recv_buff), SpimReg.RXD.MAXCNT = 2; SpimReg.RXD.LIST = 0; SpimReg.TXD.PTR = uint32_t(m_send_buff), SpimReg.TXD.MAXCNT = 2; SpimReg.TXD.LIST = 0; SpimReg.CONFIG = 0; /* active-high / Leading / MsbFirst */ SpimReg.ORC = 0x00; SpimReg.EVENTS_END = 0; SpimReg.TASKS_START = 1; while ( SpimReg.EVENTS_END == 0);
EVENT_END is done.(Maybe the process is finished )
But SCLK and MOSI not output.