8 years, 1 month ago.

Timer and Interrupt

Hi,

Can you let me know what timers and interrupts are being used within the library as you are not providing the source for me to check this myself.

Thanks

Andrew

Question relating to:

Library for LoRa communication using MultiTech MDOT. Lora, mdot, multitech

how to configure mbed timers for interrupts

posted by Rk c 21 Feb 2018

1 Answer

8 years, 1 month ago.

Andrew,

The mbed library uses a single timer in the system for a 1ms tick. Classes like Timer, Ticker, etc use this to function. The RTOS library uses the system tick timer as well. So those two would be off limits. Our library code uses mbed::Timer and RtosTimer objects, so it isn't tying up any physical timers.

Are you referring to internal interrupts or just external GPIOs?

There are some GPIO lines from the LoRa radio to the processor - the radio will generate interrupts on those. If you put your device into deepsleep and want to wake it up with an external interrupt, you must use pin PA_0. Normal sleep mode is more flexible. We also use RTC Alarm A as our time based wakeup source for the low power modes.

Cheers,

Mike

Accepted Answer

Thanks Mike, I need to do more investigations as I'm using PB_0 on pin 19 to measure pulse widths using the Timer and interrupts but getting inconsistent results.

Cheers

Andrew

posted by Andrew Lindsay 22 Mar 2016