6 years, 11 months ago.

Timer in us_ticker.c for TARGET_LPC176X

The timer in us_ticker.c for TARGET_LPC176X hard coded uses TIMER3, any chance there can be an option to use a different timer? TIMER3 can be used for edge triggering on GPIOs that are pinned out on the LPC1768 development board, so it'd be nice to use TIMER3 for that.

All good, i've made a PR to make timer choice an option: https://github.com/ARMmbed/mbed-os/pull/8122, also discussion: https://os.mbed.com/forum/platform-7-mbed-LPC1768-community/topic/33174/

posted by Alex Buenos 13 Sep 2018

1 Answer

6 years, 11 months ago.

Hi Alex, From the documentation, it seems like TIMER 2 and TIMER 3 have similar capabilities. Could you try using TIMER 2 for your purpose and see if that works for you?

Thanks,

Naveen,

Team mbed.

Thanks for the prompt input Naveen. Unfortunately using TIMER2 for capture events would require using pins p29 and p30, which I am using for CAN communication :(

Is there an easy way to somehow make an option of which timer to use via config files at project level perhaps?

posted by Alex Buenos 12 Sep 2018