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.

MCU-PLUS-SDK-AM243X: Disabling all interrupts, but letting a specific interrupt active

Part Number: MCU-PLUS-SDK-AM243X

Tool/software:

Hello,

we need to have the possibility to deactivate all other interrupts but let only one interrupt active.

Unfortunately a call to HwiP_disable() and afterwards a call to HwiP_enableInt(interruptNumber) does not work. As I checked both do not work the same way. HwiP_disable disables interrupts via the cpsr-register while the HwiP_enableInt is using the VIM directly. That's unfortunately a bit misleading because one might think they are working together.

So how can we achieve this? Best would be not to modify anything in the SDK for that.

Background:

When we want to restart the device we will close all drivers and we also need to manually drive the reset-pin of our flash. Since there is a timing-contrains we are using the ClockP_usleep()-function to get the µs-exact time to wait to proceed. Unfortunately we are using some third-party-libraries which also started some entities which will trigger some interrupts, where themselves in the routines they will access a resource. They can't be shut down correctly because that's not implemented by them. So we need to disable the interrupts, else we could get data-aborts because they try to access a resource which is already closed. But when the interrupts are disabled the ClockP_usleep-function does sometimes not work, since it needs the systick (HWTIMER8 in this case) for correct calculation.

Regards

Felix

  • Hello Felix,

    Thank you for your query.

    we need to have the possibility to deactivate all other interrupts but let only one interrupt active.

    Unfortunately, there is no such API which will disable all interrupts except one interrupt to be active.

    If you want to disable all interrupt and let only one interrupt to be active you have to use HwiP_disableInt(intrNum) API and pass the interrupt number in arguments for each interrupt you want to disable.

    Please refer HW_interrupts for more details. 

    Regards,

    Tushar