AnsweredAssumed Answered

Is there an "elegant" way to handle event interrupts in a 'MQX + PE' application?

Question asked by Luiz Fernando Schrickte on Jun 24, 2014
Latest reply on Jun 24, 2014 by Matthew Kendall

Hi folks,


If you configure an Event via PE interface in the BSP project, (let's say, a TimerUnit TimerCounterRestart event) is there a way to handle this event in the application directly, instead of programming it in the function generated by PE in the BSP project?


I've figured out two possible approaches:


1. Disable PE event and install the interrupt manually via MQX functions in the application. Cons: I'll need to check which interrupt happened manually and there is a risk of creating some conflict with PE generated code.

2. Configure the event, and when a TU1_OnCounterRestart event happens, set bits on an app MQX event, post to an app semaphore or call an app function, all of them, as said, in the application (and declared as external symbol in the bsp.a compilation)


Is there any other way to do this? I wish I could keep one BSP configured for more than one project in the same board. Otherwise, I will need to have one BSP per project, even if I'm using the same board!


Thank you!

Luiz Fernando