I have been writing a control software for field oriented control of three phase induction motor. As far as the platform I have been using the FreeRTOS real time operating system. My plan is to calculate the whole torque control loop in the interrupt service routine associated with end of the A/D conversion interrupt which will be invoked regularly with 100 us period. Besides the torque control loop the associated isr will be also responsible for implementation of software oscilloscope. Operation of the software oscilloscope will be configurable in such a manner that it will be possible to set how many samples are reserved for the pre-trigger, to set the trigger variable and trigger condition (given variable greater than or less than the specified value).
My question is how to pass the oscilloscope configuration into the interrupt service routine (more precisely into the oscilloscope module which is invoked from the isr) in such a manner that it is ensured that in all cases the oscilloscope works with consistent configuration i.e. always new pre-trigger setting, new trigger variable and new trigger condition are used together (it is not allowed to use let´s say new pre-trigger setting, new trigger variable with old trigger condition).
My idea was to exploit disabling of the interrupts in case configuration of the oscilloscope will being changed. But I have doubts regarding the negative impact on the torque control loop execution. Does anybody have better idea how to resolve that? Thanks in advance for any ideas.