This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

changing interrupts priority in F28027F

Other Parts Discussed in Thread: MOTORWARE, CONTROLSUITE

hi,

i'm using a F28027 launchpad and i want to use several interrupts(SCI, ADC, .....)

for using such a interrupts, i must change the interrupt priority. 

how can i do that? is there an example in motorware?

  • Hi agha85,
    Interrupts can be prioritized by software. You can find an example in control suite in this directory.

    Struct = C:\controlSUITE\device_support\f2802x\v230\f2802x_examples_structs\sw_prioritized_interrupts
    Driver = C:\controlSUITE\device_support\f2802x\v230\f2802x_examples_drivers\sw_prioritized_interrupts

    Hope it helps.
  • Hi agha85,

    Prakash is exactly right, the controlSUITE example for managing ISR priorities in SW is a good example.

    Keep in mind the HW design of the 28027, when an ISR is entered all other interrupts are disabled. Therefore to avoid a low priority interrupt from preventing a higher priority interrupt from executing, the ISR needs to re-enable all interrupts of higher priority thus allowing nested interrupts while the low priority ISR is executing.

    Your SW has control over which interrupts are re-enabled.

    Also keep in mind that controlSUITE is the main repository for device SW and MotorWare is the repo for motor control SW. We are merging the (2) formats used in a future release, for now it is important to be able to use SW from both controlSUITE and MotorWare.

    Jeff
  • hi,

    i read and check the examples that you said want to add them to my motorware project but something confused me.

    in every ISR, at first the program DISABLED the cpu interrupts  and the the pie_group interrupt that have a higher priority but i think, as you said in the post above, the program must ENABE the higher priority interrupts.

    do i understand the program right or no?

    for example in the ISR shown below, MINT1 and MG11 specified the higher priority interrupt by one. then this two parameter send to CPU_disableInt and PIE_disableInt functions. in this functions the MINT1  and MG11 become NOT and inserted into IER and PIEIER_PIEIFR[group].IER registers. 

    i think this operation, DISABLE the cpu interrupts  and the the pie_group interrupt that have a higher priority and must done without NOT in IER and PIEIER_PIEIFR[group].IER registers. am i right?

    i think this functionality

  • i tried this example:

    C:\controlSUITE\device_support\f2802x\v230\f2802x_examples_structs\sw_prioritized_interrupts

    and i am sure that it is incorrect.

    for using this example you must add a NOT(~) before interrupt defined. for example instead of  using MINT10 you must use ~MINT10.