ΣSigmaStudio Ask AI Русский Log in

There are some bugs in the adi_int_NestingISR of uCOS

Processors & DSP YuSong Jul 22, 2010 00:00 2 replies Original on forum ↗
Subscribe
YuSong Question
Jul 22, 2010 00:00

Hi,

I want to use SSL(System Services Library) in the uCOS, but when porting the interrupt processing, I found there are some bugs in the adi_int_NestingISR.

In the flowing code, R0 has the IVG number, the code want to save the IVG number to the stack, and restore it from stack after OS_CPU_ISR_Entry call, but in the OS_CPU_ISR_Entry function, there are always many registers be saved to the stack, and the SP is decreased when return from OS_CPU_ISR_Entry, so the "R0 = [SP++];" does not works as wanted, the R0 is not the IVG number now.

__STARTFUNC(_adi_int_NestingISR)

/* Anomaly 05000428 does not apply here because the memory read is from MMR space */

.MESSAGE/SUPPRESS 5517;

WORKAROUND_05000283()

.MESSAGE/POP 5517;

#if defined(ADI_SSL_UCOS)

/* Save the RETS before making the call */

[ -- SP ] = RETS ;

/* this function takes care of incrementing OSIntNesting and saving */

/* processor context. */

[--SP] = R0; /* since OS_CPU_ISR_Entry is an external function (uCOS port), it's register usage */

/* is not known, so it's just better to save the argument on the stack */

R0 = NESTED;

CALL.X _OS_CPU_ISR_Entry;

R0 = [SP++];

/* Setup C Run-Time stack */

LINK 0;

SP += -12 ;/* make space for outgoing arguments when calling C-functions */

#else

ADI_INT_ISR_PROLOG(__NESTED)

#endif

ucos

blackfin

ADIApproved Reply
Jul 22, 2010 00:00

Hi,

this appears to be a duplicate of your other thread: There are some bugs in the adi_int_NestingISR of uCOS

To avoid duplication of effort I will lock this thread. Please continue discussion on the other thread.

regards,

Craig.

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin