MPC5777C Stack overflow exception

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

MPC5777C Stack overflow exception

1,223件の閲覧回数
20Sidar04
Contributor III

Dear Mr./ Mrs.

When I checked e200z7 core document, I couldn't find exception for stackover flow. Is not available stackoverflow exception for MPC5777C?

Best Regards.

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

1,203件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

one option is to follow section "60.4 Using Debug Resources for Stack Limit Checking" in reference manual for MPC5744P:

https://www.nxp.com/webapp/Download?colCode=MPC5744PRM

This is not mentioned in RM for MPC5777C but it's still applicable.

You can also take a look at this thread for some code:

https://community.nxp.com/t5/MPC5xxx/MPC5744P-how-to-use-the-debug-registers-to-realize-the-quot/m-p...

Next option is to use Memory Protection Unit when you can configure small area just below the stack as no writeable.

Regards,

Lukas

 

0 件の賞賛
返信

1,198件の閲覧回数
20Sidar04
Contributor III

Dear Lukasz,

I cause stackover flow by calling recursive function in main source. But when I put breakpoint in IVOR13_Exception_Handler (IVOR13 - Data TLB Error Interrupt)  , it don't stop. I set  MSR. I set LED pin to test IVOR13. But not works for during debug mode also standalone mode. I wonder reason.

Best Regards.

タグ(1)
0 件の賞賛
返信

1,182件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

How did you configured the MMU and where is your stack?

Regards,

Lukas

0 件の賞賛
返信

1,136件の閲覧回数
20Sidar04
Contributor III

I used this source code for stack monitoring in main.c;

void config_SRAM(void){


PPCASM("e_lis %r4, 0x0000");
PPCASM("e_or2i %r4, 0x0000");
PPCASM("mtspr 563, %r4");

PPCASM("e_lis %r4, _stack_end@h");
PPCASM("e_lis %r4,_stack_end@l");
PPCASM("mtspr 316, %r4");

 

My function generate for stack overflow;

void generate_stack_overflow(int a) {
if (a== 0)
{return;}
a = 6;
generate_stack_overflow(a);
}

PPCASM("e_lis %r4, __SP_INIT@h");
PPCASM("e_or2i %r4, __SP_INIT@l");
PPCASM("mtspr 317, %r4");

}

0 件の賞賛
返信