Revert "osal: PRSDK-8153: AM65xx: OSAL sets R5F VIM interrupt priority incorrectly"
authorJonathan Bergsagel <jbergsagel@ti.com>
Thu, 14 May 2020 22:57:31 +0000 (17:57 -0500)
committerSivaraj R <sivaraj@ti.com>
Fri, 15 May 2020 07:59:08 +0000 (02:59 -0500)
packages/ti/osal/arch/core/r5/Arch_util.c

index db18a903c9b56b71d0a2a4310b78f95cf09bee66..bd084697a422a65d5b063781f149ff6517fc10dd 100644 (file)
@@ -239,6 +239,9 @@ HwiP_Handle OsalArch_HwiPCreate(int32_t interruptNum, HwiP_Fxn hwiFxn,
 
         hwi_handle->intNum = (uint32_t)interruptNum;
 
+        /* Registering the Interrupt Service Routine(ISR). */
+        Intc_IntRegister((uint16_t)interruptNum, (IntrFuncPtr) hwiFxn, (void *)params->arg);
+
         /* Set the priority to default priority if priority is set un-initialized */
         if (params->priority == HWIP_USE_DEFAULT_PRIORITY)
         {
@@ -252,9 +255,6 @@ HwiP_Handle OsalArch_HwiPCreate(int32_t interruptNum, HwiP_Fxn hwiFxn,
         /* Setting the priority for the UART interrupt in INTC. */
         Intc_IntPrioritySet((uint16_t)interruptNum, priority, 0);
 
-        /* Registering the Interrupt Service Routine(ISR). */
-        Intc_IntRegister((uint16_t)interruptNum, (IntrFuncPtr) hwiFxn, (void *)params->arg);
-        
         /* Enabling the interrupt if configured */
         if (params->enableIntr == 1U)
         {