This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
My project using TI AFE031 FSK boostxl_afe031_f28004x_rx as template. I just change the interrupt source to EPWM4 as below
#pragma CODE_SECTION(epwm2_isr,".TI.ramfunc");
__interrupt void epwm4_isr(void)
{
EALLOW;
//
// Enable ADC ISR Nesting
//
uint16_t TempPIEIER;
TempPIEIER = PieCtrlRegs.PIEIER2.all;
IER |= M_INT1;
IER &= MINT1; // Set "global" priority
PieCtrlRegs.PIEIER2.all &= MG1_1; // Set "group" priority
PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
asm(" NOP"); // Wait one cycle
EINT; // Clear INTM to enable interrupts
//
// Run the FSK Correlation Detector Function
//
FSK_CORR_DETECTOR_OverSampl_RUN(&FSK_struct1);
//
// See if a mark or space bit is detected
//
if(FSK_struct1.bit_detected != 0)
{
rxMessage[message_index++] = FSK_struct1.bit_detected; // Save the detected bit in the message buffer
FSK_struct1.bit_detected = 0; // Clear the detected bit member
//
// Set flags when message buffer is full
//
if(RX_MESSAGE_SIZE <= message_index)
{
message_index = 0;
msgFull = 1;
}
}
//
// Clear INT flag for EPwm2
//
//EPwm2Regs.ETCLR.bit.INT = 1;
EPwm2Regs.ETCLR.bit.INT = 1;
//
// Acknowledge this interrupt to receive more interrupts from group 3
//
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
//
// Restore registers saved for ADC ISR Nesting
//
DINT;
PieCtrlRegs.PIEIER2.all = TempPIEIER;
//
// Toggle gpio pin for measuring frequency, debug purposes
//
//GpioDataRegs.GPCTOGGLE.bit.GPIO65 = 1; // LP Pin 47
}
and
#define INTERRUPT_BIT_ISR &epwm4_isi
interrupt_register(INT_EPWM4, INTERRUPT_BIT_ISR)
Anything was working fine as long as I added TI diagnostic function code which is reference to diagnostic library example f28002x_test_application.c
DINT;
uint16_t returnVal =
STL_CPU_REG_checkCPURegisters(STA_Tests_injectError);
if (returnVal == STL_CPU_REG_FAIL)
{
mcuFault_Status = mcuFault_Status | CPU_REGISTER_FAULT;
}
EINT;
The ISR function don't be run after a while ~ 7minutes. The diagnostic function will be ran in main loop ~ every 14ms.
Please advise that did I do something wrong?
Hi,
This thread looks like a duplicate of the below thread. Closing this thread. Please use the below thread for further communication.
Thanks
Vasudha