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.
Tool/software: TI-RTOS
Hi TI!
Help me please with my issue.
Why interrupt instruction is not available?
I have interrupt from my ADC A and B ? they have address of function HWI_ADC.
Can i define same function for ADC A and ADC B interrupt? And why i have problem with this interrupt.
Start of ADC convention selected by EPWM4 , it works like a timer.
Hi, i have fault after initialization adc, meas.func is ok, name of function modify for screenshot.
May be i have problem with interrupt epwm?
If i set for start adc -epwm4a i have that problem.
I think problem because instruction interrupt is not valid , in examples werd interrupt have another colour.
programm dont come to interrupt function hwi_adc, after set adc and epwm - fault
after set epwm4 i have foult
EPwm4Regs.TBCTL.bit.CTRMODE = 0x3; // Disable the timer
EPwm4Regs.TBCTL.all = 0xC033; // Configure timer control register
/*
bit 15-14 11: FREE/SOFT, 11 = ignore emulation suspend
bit 13 0: PHSDIR, 0 = count down after sync event
bit 12-10 000: CLKDIV, 000 => TBCLK = HSPCLK/1
bit 9-7 000: HSPCLKDIV, 000 => HSPCLK = SYSCLKOUT/1
bit 6 0: SWFSYNC, 0 = no software sync produced
bit 5-4 11: SYNCOSEL, 11 = sync-out disabled
bit 3 0: PRDLD, 0 = reload PRD on counter=0
bit 2 0: PHSEN, 0 = phase control disabled
bit 1-0 11: CTRMODE, 11 = timer stopped (disabled)
*/
//**************************************************************************
/*** Configure ePWM4 to trigger the ADC at a 37KHz rate ***///**************************************************************************
EPwm4Regs.TBCTR = 0x0000; // Clear timer counter
EPwm4Regs.TBPRD = TB3;
EPwm4Regs.TBPHS.bit.TBPHS = 0x0000; // Set timer phase
EPwm4Regs.ETPS.all = 0x0100; // Configure SOCA
/*
bit 15-14 00: EPWMxSOCB, read-only
bit 13-12 00: SOCBPRD, don't care
bit 11-10 00: EPWMxSOCA, read-only
bit 9-8 01: SOCAPRD, 01 = generate SOCA on first event
bit 7-4 0000: reserved
bit 3-2 00: INTCNT, don't care
bit 1-0 00: INTPRD, don't care
*/
EPwm4Regs.ETSEL.all = 0x0A00; // Enable SOCA to ADC
/*
bit 15 0: SOCBEN, 0 = disable SOCB
bit 14-12 000: SOCBSEL, don't care
bit 11 1: SOCAEN, 1 = enable SOCA
bit 10-8 010: SOCASEL, 010 = SOCA on PRD event
bit 7-4 0000: reserved
bit 3 0: INTEN, 0 = disable interrupt
bit 2-0 000: INTSEL, don't care
*/
EPwm4Regs.TBCTL.bit.CTRMODE = 0x0; // Enable the timer in count up mode
}
//*****************************
Hi, yes i copy rumfunc to ram.
I think i found problem, my iq math function mpy have copy in rumfunc but when i call that function with argument 5000 mpy 0, i have not result 0 . Can you help me debug that problem.