Timer interrupt S-function for Arduino due

1 visualizzazione (ultimi 30 giorni)
Max Ganelius
Max Ganelius il 17 Lug 2018
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

Risposte (0)

Categorie

Scopri di più su Arduino Hardware in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by