Mask Set Errata for Mask 1N03P

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Mask Set Errata for Mask 1N03P

1,065件の閲覧回数
EugeneHiihtaja
Senior Contributor I

Hello !

Do I undestand right and "Mask Set Errata for Mask 1N03P Rev. 09 Sept 2015" is the latest one what available for K82 MCU ?

On my K82 I can see 1N03P  sign.

As result all interrupt handlers should have this code at the end of routine:

/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif

Or may be even:

__DSB();

__ISB();

Regards,

Eugene

0 件の賞賛
返信
2 返答(返信)

960件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Eugene,

     Yes, The IN03P errata from this link:

https://www.nxp.com/docs/en/errata/KINETIS_K_1N03P.pdf 

   is the latest document.

   The relate item is e9005, actually, it is the ARM errata 838869, you also can check the ARM core website.

   About the workaround code, you totally can refer to the SDK K82 code, that code driver already add the DSB, take an example:

void LPUART0_LPUART1_TX_DriverIRQHandler(void)
{
    if (CLOCK_isEnabledClock(s_lpuartClock[0]))
    {
        if ((LPUART_STAT_OR_MASK & LPUART0->STAT) ||
            ((LPUART0->STAT & LPUART_STAT_TDRE_MASK) && (LPUART0->CTRL & LPUART_CTRL_TIE_MASK)))
        {
            s_lpuartIsr(LPUART0, s_lpuartHandle[0]);
        }
    }
    if (CLOCK_isEnabledClock(s_lpuartClock[1]))
    {
        if ((LPUART_STAT_OR_MASK & LPUART1->STAT) ||
            ((LPUART1->STAT & LPUART_STAT_TDRE_MASK) && (LPUART1->CTRL & LPUART_CTRL_TIE_MASK)))
        {
            s_lpuartIsr(LPUART1, s_lpuartHandle[1]);
        }
    }
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
  exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
    __DSB();
#endif
}

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

960件の閲覧回数
EugeneHiihtaja
Senior Contributor I

Hi Kerry !

Yes, _DSB() entry is visible in almost all interrupt handlers.

But not in TickTimerHandler in FreeRTOS port.c:

void xPortSysTickHandler(void)
{
   uint32_t ulDummy;

   ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
   {
   /* Increment the RTOS tick. */
      if (xTaskIncrementTick() != pdFALSE)
      {
         /* Pend a context switch. */
         portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
      }
   }
   portCLEAR_INTERRUPT_MASK_FROM_ISR(ulDummy);

// ???

}

Even if I unroll all macros, _DSB is not visible.

Or errata is not effect special handlers ?

By the way, do you have idea when new SDK will be released  with new FreeRTOS 10.1.0 for K82 ?

Regards,

Eugene

0 件の賞賛
返信