hi ,everyone:
my code always fail at nrf_spi_event_check, why?
I suggest that the code don't use the semphore to broke spi.
hi ,everyone:
my code always fail at nrf_spi_event_check, why?
I suggest that the code don't use the semphore to broke spi.
sorry,
I think that the code don't use the semphore to block spi ?
Hi,
The nrf_spi_event_check function just reads a register value, there is no semaphore there. In fact, the implementation is a one-liner (SDK 15):
__STATIC_INLINE bool nrf_spi_event_check(NRF_SPI_Type * p_reg, nrf_spi_event_t spi_event) { return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)spi_event); }
It is not clear to me what you are doing and how it is failing. Can you be more specific?
I would also want to mention that you may want to use the SPI driver (master or slave) instead of doing the low level stuff yourself.