SPI module jumps to "Default ISR" once enabled

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI module jumps to "Default ISR" once enabled

754 次查看
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 回复

655 次查看
mohammedaboelna
Contributor III

I realized that I was not enabling clock for SPI peripheral

Solved .. Thank you

0 项奖励
回复