MATLAB EMBEDDED IDE LINK 4 - FOR USE WITH TEXAS INSTRUMENTS CODE COMPOSER STUDIO Guide de l'utilisateur Page 110

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 575
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 109
3 Project Generator
C onnecting the ISRs to the corresponding interrupt service vector table
entries
Note You are responsible for m apping and enabling the interrupts you
specify in the block dialog box.
Connect the output of the Hardware Interrupt block to the control input
of a function-call subsystem. By doing so, you enable the ISRs to call the
generated subsystem code each time the hardw are raises the interrupt.
TheIdleTaskblockspecies one or more functions to execute as background
tasks in the code generated for the model. The functions are created from the
function-call subsystems to which the Idle Task block is connected.
Mapping and Enabling Interrupts in Generated Code
Although the scheduling blocks generate ISRs to respond to interrupts, they
donotenabletheinterruptsinyourcode. Theblocksalsodonotmapthe
interrupts to the specic ISRs y ou specify in the block dialog bo xes.
To enable and map the interrupt routines, you provide code that performs the
mapping and enabling functions. ISR mapping and enabling code might look
like following samples w hich enable and map interrupts 5 and 7:
IRQ_map(IRQ_EVT_EXTINT5,5); % Map interrupt 5 in the block to ext. int.5.
IRQ_set(IRQ_EVT_EXTINT5); % Enable interrupt 5.
IRQ_map(IRQ_EVT_EXTINT7,7); % Map interrupt 7 in the block to ext. int.7.
IRQ_set(IRQ_EVT_EXTINT7); % Enable interrupt 7.
The following gure shows the block dialog b ox that species the interrupts
3-20
Vue de la page 109
1 2 ... 105 106 107 108 109 110 111 112 113 114 115 ... 574 575

Commentaires sur ces manuels

Pas de commentaire