Some wrongs occurred in the function of STM8

Stuck with a problem in your code? Seek help here.

Some wrongs occurred in the function of STM8

Postby ailexs » April 14th, 2017, 12:31 am

Hi~all,
I would like to ask help about STM809LWX6F, this is the STM809LWX6F's datasheet: http://www.kynix.com/uploadfiles/pdf8798/STM809LWX6F.pdf.
My program always flied and started again.The codes are as following:

Code: Select all
#pragma vector=0x19
__interrupt void interrupt_handler_tim4(void)
{
    asm("SIM");
    TIM4->SR1 =0x00;

    Scan_Key();       // ( Invoking the subfunction, I think here has some problems;  The SCM is starting again)
    GC_Temp++;
    asm("RIM");
    asm("IRET");       
}



char  Scan_Key(void)    // ( It can’t operate even it’s so easy)
{
    char  a,b;
   return a+b;
}


Do you know what it suffered ?

Thanks a lot!
ailexs
 
Posts: 1
Joined: April 14th, 2017, 12:23 am

Return to Help Me! Software

Who is online

Users browsing this forum: No registered users and 1 guest