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

SPI hardfault

Hi, with this SPI init code:

spi_master_config_t spi_config = {                                                                           \
        SPI_FREQUENCY_FREQUENCY_K125, /**< Serial clock frequency 125k. */      \
        1,       /**< SCK pin . */               \
        2,       /**< MISO pin . */              \
        3,       /**< MOSI pin . */              \
        4,       /**< Slave select pin . */      \
        3,       /**< Interrupt priority LOW. */             \
        SPI_CONFIG_ORDER_MsbFirst,  /**< Bits order LSB. */                     \
        SPI_CONFIG_CPOL_ActiveHigh, /**< Serial clock polarity ACTIVEHIGH. */   \
        SPI_CONFIG_CPHA_Leading,    /**< Serial clock phase LEADING. */         \
        0                           /**< Don't disable all IRQs. */             \
};
    
spi_master_open(SPI_MASTER_0, &spi_config);

I get a hardfault error in spi_master.c on line 323 (p_spi_instance->p_nrf_spi->EVENTS_READY = 0;).

Do you have any idea why?

Parents Reply Children
No Data
Related