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;}
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
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!
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
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.