API-interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

API-interrupt

1,038 次查看
xiaohui200808
Contributor III

hello

   I am now using S12ZVC .I meet API interrupt .What is the CPMUACLKTR meaning.? When I set CPMUAPICTL_APICLK=1,little time later application will die.

My code API_init(){

CPMUAPIR=0x1234;

CPMUACLKTR=0;

CPMUAPICTL=0x99;

CPMUAPICTL_APIF=1;

CPMUAPICTL_APIFE=1;

CPMUAPICTL_APIF=1;}

标签 (1)
0 项奖励
4 回复数

752 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi

The CPMUACLKTR register configures the trimming of API. The example project attached shows use of it. API period is measured with a timer and then increased or decreased accordingly using ACLKTR [5:0] bits.

I don’t know why your application dies, please try the attached code and if the problem remains, let me know.

Regards

Daniel

0 项奖励

752 次查看
xiaohui200808
Contributor III

Hello

   Recently,I test a bootloader which used API interrupt.When I donot use bootloader ,downloaded the app into MCU ,API and other interrupts can work normally.

when downloaded the app into MCU by CAN bus.Other interrupts can work normally,except API interrupt .I test the app, find than when  downloaded the app into MCU by CAN bus.API interrupt occured normally,but a Machine Exception interrupt occured at the sametime.  Idonot know why the Machine Exceptioncould happen.Is there any solution to this problem?Attenchment is my code. Thank you!

0 项奖励

752 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi

Have you tried to find the source of the issue that cause the Machine exception. When machine exception occurs, several registers (MMCEC, MMCPC,…) contain information about the failure.

Daniel

0 项奖励

752 次查看
xiaohui200808
Contributor III

Hello

     I read the Register,When machine exception occurs:

 MMCECH=0x11;MMCECL=0x11;

MMCPCH=0xFF;MMCPCM=0xF1;MMCPCL=0x00;

MMCCCRH=0x00;MMCCCRL=0x40;

But I still donot know what is the problem.

0 项奖励