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

SPI freezing in initialization, while SCK connected to GND

Hello, dear developers!

Tell me the solution to the problem, how to properly initialize the SPI peripherals so that the program does not hang while waiting for the end of data transfer, if the SCK and GND lines are short-circuited.

This is the initialization SPI

    nrf_spi_mngr_transaction_t internal_transaction = {
        .begin_callback      = spi_transaction_begin_cb,
        .end_callback        = spi_transaction_end_cb,
        .p_user_data         = (void *)&cb_data,
        .p_transfers         = p_transfers,
        .number_of_transfers = number_of_transfers,
        .p_required_spi_cfg  = p_config
    };


The interrupt callback at the beginning of the data transfer works, but the callback at the end of the data transfer does not work if the SCK line is shorted to ground. How can I fix this so that at least an error is generated or a timeout is triggered?

Parents Reply Children
Related