1

I am trying to understand the use of the interrupt for LDRBS in this specific pseudocode. Our task is to measure the temperature using a temp sensor.

Here is the pseudocode steps:

Initialization

1) Don’t forget the PMC
2) Select Timer_Clock1 as TCCLK
3) Enable counter and make a sw_reset in TC0_CCR0
4) Load counter to A when TIOA falling in (TC0_CMR0)
5) Load counter to B when TIOA rising in (TC0_CMR0)
6) Enable the pin
7) Create init puls
8) Enable the interrupt (NVIC) with the inline declared function

Starting the measurement

1) Create a startpuls with a Delay(25); and make a sw_reset in TC0_CCR0
2) Clear old interrupt by read statusreg
3) Enable interrupt for LDRBS

Interrupt Handler

1) Disable interrupt LDRBS
2) Set a global flag.

The steps that I don't really understand is nr 8 in the initialization and nr 3 in the measurement function. I know for step 3 I am supposed to use

*AT91C_TC0_IER = (0x1 << 6); // or (AT91C_TC_LDRBS) instead of (0x1 << 6)

But I don't understand why this step is necessary, I want to know what function the interrupt for LDRBS has in TC0

4

0 回答 0