Jump to other application

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

Jump to other application

1,716件の閲覧回数
rans
Senior Contributor I

Hello ,

We are using two seperate applications in out flash.

The 1st application shall jump to the 2nd by using a jump to absolute address (which is the main routine of the 2nd application).

Is it requited to add IVT to the 2nd application and jump  to ivt or can we jump to main routine directly.

Thank you

Ranran

4 返答(返信)

1,409件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Ranran

ivt is needed only for boot, so one can jump to main routine directly.

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

1,409件の閲覧回数
rans
Senior Contributor I

Hello Igor,

If I may,  one more question please on this topic:

Isn't IVT required also for interrupt handling ?

I mean, if there is no IVT can interrupt still be handled (note that we are using 2 separate applications as I mentioned in the original question above).

Wwhat is required to make interrupt handling supported in the second application ?

Thank you very much,

ranran

0 件の賞賛
返信

1,409件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Ranran

 

>>Isn't IVT required also for interrupt handling ?

no

>what is required to make interrupt handling supported in the second application ?

it depends on used environment: for example in FreeRTOS included in MCUXpresso
package supports this having additional layer built on top of standard SDK peripheral drivers to
achieve multithread (RTOS). You can use it or develop own multitask environment using these
examples as starting point.

Welcome | MCUXpresso SDK Builder 

 

Best regards
igor

1,409件の閲覧回数
rans
Senior Contributor I

Hi Igor,

 

I try to understand what's the function to be called from the 1st application in order to correctly start the 2nd application.

 

As I understand, in order to initialize interrupt vector, it is not main() that should be called, butResetISR() instead, because ResetISR() seems to be the function that allocates ISR and initialize it:

ResetISR -> SystemInit  -> initialize SBC->VTOR

 

Does it sound reasonable to call ResetISR() instead of main() ?

 

 

void ResetISR(void) {
// Disable interrupts
__asm volatile ("cpsid i");
#if defined (__USE_CMSIS)
SystemInit();
#else
....
#endif // (__USE_CMSIS)
// Call the Redlib library, which in turn calls main()
__main();
#else
main();
#endif
//
// main() shouldn't return, but if it does, we'll just enter an infinite loop
//
while (1) {
;
}
}
 
 

void SystemInit (void) {
...
#if defined(__MCUXPRESSO)
extern uint32_t g_pfnVectors[]; // Vector table defined in startup code
SCB->VTOR = (uint32_t)g_pfnVectors;
#endif
....
}
 
__attribute__ ((used, section(".isr_vector")))
void (* const g_pfnVectors[])(void) = {
&_vStackTop, // The initial stack pointer
ResetISR, // The reset handler
NMI_Handler, // The NMI handler
HardFault_Handler, // The hard fault handler
..
}

0 件の賞賛
返信