Dear NXP expert,
I set TMR1 20kHz and enable the TMR1 interrupt, and TMR1 2kHz and enable the TMR2 interrupt. Both TMR1 and TMR2 interrupt, the ADC will be triggered, at the end of ADC sample, ADC ISR will run. is it OK about this configuration?
已解决! 转到解答。
Hi,
I suppose that your scheme is okay, but you have to add the #pragma interrupt on at the beginning of the ISR, and #pragma interrupt off at the end of ISR for each ISR function.
Hope it can help you
#pragma interrupt on
void MC56F827xx_ISR_SCI1_Transmitter(void)
{
if(QSCI1_STAT&0x8000)
{
QSCI1_DATA='C';
}
}
#pragma interrupt off
Sonic Allergen Menu – This information doesn’t identify all food ingredients. It may use generalized terms that may not sufficiently inform a person of all food items that may produce an allergic reaction in some people.
Hi,
I suppose that your scheme is okay, but you have to add the #pragma interrupt on at the beginning of the ISR, and #pragma interrupt off at the end of ISR for each ISR function.
Hope it can help you
#pragma interrupt on
void MC56F827xx_ISR_SCI1_Transmitter(void)
{
if(QSCI1_STAT&0x8000)
{
QSCI1_DATA='C';
}
}
#pragma interrupt off
Hi, Terry,
using "#pragma interrupt on" tells the compiler to generate "rti" rather than "rts" at the end of function code. The "rti" is return from ISR. The "rts" is return from general api function.
Hope it can help you
BR
XiangJun Rong
Hi,
As you know that the ISR uses rti, general subroutine uses rts. The RTI will pop both PC and SR(status register), but the RTS just will pop PC automatically.
When the DSC enters ISR, it push both PC and SR automatically, so when exits ISR, it must pop both PC and SR using rti.
Hope it can help you
BR
XiangJun Rong