AnsweredAssumed Answered

SPI module jumps to "Default ISR" once enabled

Question asked by Mohammed Aboelnasr on Jun 28, 2017
Latest reply on Jun 28, 2017 by Mohammed Aboelnasr

Hello,

 

I have an issue regarding enabling SPI peripheral. Software jumps to "Default ISR" once I tried to write in the status registers like SPI0_C1, SPI0_C2, .. as following;

 

main.c:

#include "SPI.h"

init_SPI();

 

SPI.C:

/* Disable interrupts, Enable SPI system, Set SPI as master device, SPI clock as active high, First edge at start of first data transfer cycle*/
SPI0_C1 = 0x54;

 

While debugging, when code reaches this line (SPI0_C1 = 0x54) , I found that it jumps to file "startup_SKEAZN642.S" in this part;

DefaultISR:
ldr r0, =DefaultISR
bx r0
.size DefaultISR, . - DefaultISR

 

Could you help me with this behavior please ?

Outcomes