Question
hard fault after configure systick
i use NUCLEO - F767ZI and test a simple code as follow
int sum(int a,int b){
return a+b;
}
int main(void){
int dly;
__enable_irq();
SysTick_Config(100000);
NVIC_EnableIRQ(SysTick_IRQn);
dly = sum(1,3);
return 0;
}i debug it and when call sum(1,3), it will goto hard fault.
if comment NVIC_EnableIRQ(SysTick_IRQn); call and it work fine.
can someone help me ?