Skip to content

Commit d222dac

Browse files
Ganesh Ramachandranadbridge
authored andcommitted
Clear interrupt and delta check removed
1 parent cee857e commit d222dac

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

targets/TARGET_TOSHIBA/TARGET_TMPM066/us_ticker.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,13 @@ uint32_t us_ticker_read(void)
7979

8080
void us_ticker_set_interrupt(timestamp_t timestamp)
8181
{
82-
int delta = 0;
82+
uint32_t delta = 0;
8383

8484
// Stops and clear count operation
8585
TSB_T16A1->RUN = TMR16A_STOP;
8686
TSB_T16A1->CR = TMR16A_SYSCK;
8787
// Set the compare register
88-
delta = (int)(timestamp - us_ticker_read());
89-
if (delta < 0) {
90-
// Ticker interrupt handle
91-
us_ticker_irq_handler();
92-
return;
93-
}
88+
delta = (timestamp - us_ticker_read());
9489
TSB_T16A1->RG = delta;
9590
// Set Interrupt
9691
NVIC_EnableIRQ(INT16A1_IRQn);
@@ -110,5 +105,5 @@ void us_ticker_disable_interrupt(void)
110105

111106
void us_ticker_clear_interrupt(void)
112107
{
113-
NVIC_ClearPendingIRQ(INT16A1_IRQn);
108+
//no flags to clear
114109
}

0 commit comments

Comments
 (0)