how to goto VECTOR 2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,163件の閲覧回数
everkimage
Contributor IV

My mcu is MC9S12XE.The Vector 0 is __Startup(),it's the default startup routine.And Vector 2 is __cop_reset_startup(),just like:

byte gb_flag = 0x00;

void __cop_reset_startup(void)

{

   Init();

   gb_flag = 0x55;

   main();

}

In main(),cop is enabled without feeding,after about 1 seconds later,system restart but don't goto __cop_reset_startup(),cause gb_flag == 0x00;

Also i change "VECTOR 2 __cop_reset_startup" to "VECTOR ADDRESS 0xFFFA __cop_reset_startup",result is same.

I debug the project and find that when system restart,PC is equal to 0xFF13.

ラベル(1)
0 件の賞賛
1 解決策
987件の閲覧回数
lama
NXP TechSupport
NXP TechSupport

Hi,

the COP reset vector usage depends on COP reset, COP reset recognition and correct external HW becasue the COP reset recognition depends on timing characteristics of the external reset circuitry.

For more info look at: S12 FAMILY DEVICES COP RECOGNITION CONSIDERATIONS_v2.0.pdf 

If large capacitor is used for reset circuitry then the rising time of the voltage exceeds the time for COP reset recognition and the MCU starts with POR.

BTW, the COP is not debuggable because the MCU losts BDM connection during reset. Better is to use some temporary signal or diode to signalize the COP.

The COP SW example can be found at https://community.nxp.com/docs/DOC-329209 

(XET is a subset device of XEP100 device)

Best regards,

Ladislav

元の投稿で解決策を見る

4 返答(返信)
988件の閲覧回数
lama
NXP TechSupport
NXP TechSupport

Hi,

the COP reset vector usage depends on COP reset, COP reset recognition and correct external HW becasue the COP reset recognition depends on timing characteristics of the external reset circuitry.

For more info look at: S12 FAMILY DEVICES COP RECOGNITION CONSIDERATIONS_v2.0.pdf 

If large capacitor is used for reset circuitry then the rising time of the voltage exceeds the time for COP reset recognition and the MCU starts with POR.

BTW, the COP is not debuggable because the MCU losts BDM connection during reset. Better is to use some temporary signal or diode to signalize the COP.

The COP SW example can be found at https://community.nxp.com/docs/DOC-329209 

(XET is a subset device of XEP100 device)

Best regards,

Ladislav

987件の閲覧回数
everkimage
Contributor IV

Finally it's ok.

First remove the capacitor,then initialize the SP and MMC before invoke the Init() in function __cop_reset_startup().

0 件の賞賛
987件の閲覧回数
everkimage
Contributor IV

I remove the capacitor connected with RESET pin,and change VECTOR 2 to __Startup(),system can reset again and again,but when i change VECTOR 2 to __cop_reset_startup(),system only reset once.

Is there any wrong with function __cop_reset_startup()?

0 件の賞賛
987件の閲覧回数
everkimage
Contributor IV

Thanks for your reply very much.

The reset pin of MCU connect with a 100nF capacitor,now i remove it,but still can't goto COP Reset Vector.

The difference is the system always halt after the first timeout of COP.

By the way,the system type out the value of gb_flag every 500ms after system initialization through CAN,and i always see the value 0x00,so i know that the COP Reset didn't happen.

0 件の賞賛