SPI module jumps to "Default ISR" once enabled

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SPI module jumps to "Default ISR" once enabled

751件の閲覧回数
mohammedaboelna
Contributor III

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 ?

0 件の賞賛
返信
1 返信

652件の閲覧回数
mohammedaboelna
Contributor III

I realized that I was not enabling clock for SPI peripheral

Solved .. Thank you

0 件の賞賛
返信