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

If delay is inserted after data transmission by SPI, it transits to default_handler

Hi!

I am planning to port SPI sending and receiving functions to the sample code of ble_app_uart of SDK 14.0.0.

The transplant was finish, but when I am debugging,if I add a delay after sending data with SPI while debugging, it will transition to Default_handler.

The code running SPI and UART worked fine without problems.

Is it impossible to put a delay in ble's sample code?

best regards!!

void SPITxCommand(unsigned char Data)
{
nrf_gpio_pin_clear(22); //CS pin low
nrf_drv_spi_transfer(&spi, &Data, 1, NULL, NULL);
//nrf_delay_us(50);
nrf_delay_us(100); //error component
}

 

Parents Reply Children
No Data
Related