Hello All,
My problem statement = How to call ISR function automatically when interrupt will get generated ( in HEW) ?
As per knowledge, In HEW, there is "intprg.c". This .c contains all the functions with interrupt name.
and in "vecttbl.c" , there is a function pointer named "void (*INT_Vectors[])(void)". and this function body contains address of all the functions which are present in "intprg.c".
So, I have called my "CAN_Ch_1_TX_ISR()" in interrupt function present in ""intprg.c".
So I enabled all interrupts in code. but when interrupt is generated, "CAN_Ch_1_TX_ISR()" not gets called automatically?
Is there any HEW setting needed to do for this?
Which SH processor do you use? For example SH-2 and SH-2A processors have a hardware interrupt controller. This checks ALL interrupt requests after every instruction. If it finds an active interrupt AND interrupts are enabled it will trigger the interrupt routine. SH-4 or SH-4A do NOT have an interrupt controller. There ALL interrupts trigger the same interrupt handler. This has to determine what the interrupt cause is by software and call the interrupt routine.
OK, in SH72531 manual it is called only SR (Status Register) instead of PSR (Processor Status Register). It is a CPU control register.