fix wrong exit call

master
Eyck Jentzsch 3 months ago
parent 36a6de6dc0
commit 4c2208c1ac
  1. BIN
      riscv-bldc-forced-commutation/riscv-bldc
  2. 10
      riscv-bldc-forced-commutation/src/riscv-bldc.cpp

@ -58,8 +58,8 @@ extern "C" void handle_m_ext_interrupt() {
plic_source int_num = PLIC_claim_interrupt(&g_plic);
if ((int_num >=1 ) && (int_num < PLIC_NUM_INTERRUPTS))
g_ext_interrupt_handlers[int_num]();
else
exit(1 + (uintptr_t) int_num);
//else
// exit(1 + (uintptr_t) int_num);
PLIC_complete_interrupt(&g_plic, int_num);
}
/*! \brief mtime interval interrupt
@ -242,9 +242,9 @@ void run_closed_loop(void){
int main() {
platform_init();
printf("Starting motor\n");
start_open_loop();
start_open_loop();
printf("done...\n");
// Switch to sensor-less closed-loop commutation.
run_closed_loop();
return 0;
run_closed_loop();
return 0;
}

Loading…
Cancel
Save