Affordable and flexible platform to ease prototyping using a STM32F303K8T6 microcontroller.

Ticker and external interrupt

30 Apr 2017

Hi,

I have a robot with encoders on the wheels - which are set up as external interrupts - occurring randomly depending on whether the robot is moving - the function called simply adds 1 to a counter (very quick)

I also have a 1ms Ticker event which takes 300us to complete and it calculates various speed profile and control parameters.

I have an issue with the robot missing encoder pulses as I believe the Ticker event is blocking the external interrupts...is there a way to prioritise the external interrupt.

My thoughts are to use a line something like: NVIC_SetPriority(TIMER3_IRQn, 255);

Is this possible, or is there an alternative that may work?

Thank you in advance for your help,

Best Regards,

Stephen