Timer interrupt S-function for Arduino due

1 次查看(过去 30 天)
Hi!
I am trying to implement a S-function which uses one of the built-in timers of the Arduino Due to produce an ISR which outputs a function-call to a connected block.
I have tried making both non-inlined and inlined s-functions both I can't figure out how to define the interrupt handler function.
If I put it directly in my s-function .c-file I want to use the "ssCallSystemWithTid(S,0,tid)" command although since the handler function needs to be a void-void function I can't supply the "S" and "tid" input parameters and therefore I am unable to run the command.
If I try to put the handler function in the .TLC file instead I found the "LibBlockExecuteFcnCall(block, 0)" but that doesn't seem to work either, I actually succeded in building the model but nothing happens at the Arduino...
Anyone that can point me in the right direction here? I feel kind of lost...
Don't know how to include the code in the best way so I attached it as .txt files...
Regards, Max

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by