Hi All,
I was using timer interrupt with PEx, but when I tried to install an isr manually it doesn't work.
That's my code:
void tpm1_interr(void *user_isr_ptr) { Bit2_NegVal(); //Output led TPM1_SC |= 0x10000000; //Clears TOF flag by writing a logical '1' } void Task1_task(uint32_t task_init_data) //Main task { _int_install_isr(LDD_ivIndex_INT_TPM1, tpm1_interr, NULL); TPM1_SC = 0xF; TPM1_CNT = 0x2; TPM1_MOD = 0x0000ffff; TPM1_C0SC = 0x00000050; TPM1_C0V = 0x0000ffff; for(;;) { _time_delay_ticks(300); } }
When I try to play the program the debugger goes at this unhandled exception isr:
PE_ISR(Cpu_Interrupt) { /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */ PE_DEBUGHALT(); }
Why this is happening? My isr_install is wrong?
Thanks,
Original Attachment has been moved to: full-code-(isr-install).zip