How to generate code for a Function-Call block interrupt service routine which Simulink thinks is not called?

I have interrupt service routine (ISR) code in a Function-call block, and I use coder.ceval within a Matlab Function block to attach an interrupt to this ISR function. However Simuink does not realize that the function is called whenever interrupts occur, and either objects that "Simulink Coder does not support models containing Simulink functions that are not called" or the ISR is generated but has no code within it.
I was hoping there might be a work-around, or some flag to tell Simulink not to remove the code - or some example/guidance on how to handle interrupts (ideally within the framework of Function-call blocks and Matlab Function blocks).

Answers (0)

Categories

Products

Release

R2019b

Asked:

on 22 Sep 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!