Commit 11c69b5b authored by François Revol's avatar François Revol
Browse files

Use TMR3 instead of TMR5 for interrupts from epicardium

Any reason to use TMR5 except preventing the use of PWM on the IR LED?

TMR4 is used for the LCD backlight it seems.
parent d44b5db2
Pipeline #4049 failed with stages
in 1 minute
......@@ -74,7 +74,7 @@ void __core1_init(void)
/*
* Clear any pending API interrupts.
*/
TMR_IntClear(MXC_TMR5);
TMR_IntClear(MXC_TMR3);
/*
* Reset Interrupts
......@@ -176,8 +176,8 @@ void __core1_init(void)
/*
* Clear any pending API interrupts.
*/
TMR_IntClear(MXC_TMR5);
NVIC_ClearPendingIRQ(TMR5_IRQn);
TMR_IntClear(MXC_TMR3);
NVIC_ClearPendingIRQ(TMR3_IRQn);
/*
* Jump to payload's reset handler
......
......@@ -6,9 +6,9 @@
void __dispatch_isr(api_int_id_t);
/* Timer Interrupt used for control char notification */
void TMR5_IRQHandler(void)
void TMR3_IRQHandler(void)
{
TMR_IntClear(MXC_TMR5);
TMR_IntClear(MXC_TMR3);
__dispatch_isr(API_CALL_MEM->int_id);
API_CALL_MEM->int_id = (-1);
}
......
......@@ -15,7 +15,7 @@ int api_interrupt_trigger(api_int_id_t id)
;
API_CALL_MEM->int_id = id;
TMR_TO_Start(MXC_TMR5, 1, 0);
TMR_TO_Start(MXC_TMR3, 1, 0);
}
return 0;
}
......
......@@ -207,8 +207,8 @@ DefaultHandler:
def_irq_handler TMR0_IRQHandler
def_irq_handler TMR1_IRQHandler
def_irq_handler TMR2_IRQHandler
def_irq_handler TMR3_IRQHandler
def_irq_handler TMR4_IRQHandler
def_irq_handler TMR5_IRQHandler
def_irq_handler RSV11_IRQHandler
def_irq_handler RSV12_IRQHandler
def_irq_handler I2C0_IRQHandler
......
......@@ -77,7 +77,7 @@ __weak void SystemInit()
SystemCoreClockUpdate();
// Enable API interrupt.
NVIC_EnableIRQ(TMR5_IRQn);
NVIC_EnableIRQ(TMR3_IRQn);
}
// newlib syscall to allow printf to work.
......
......@@ -23,8 +23,8 @@
/* Initialize everything for MicroPython */
void pycardium_hal_init(void)
{
/* TMR5 is used for interrupts from Epicardium */
NVIC_EnableIRQ(TMR5_IRQn);
/* TMR3 is used for interrupts from Epicardium */
NVIC_EnableIRQ(TMR3_IRQn);
/*
* Enable UART RX Interrupt so Pycardium can sleep until
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment