2016-11-17 03:15 AM
Hello e2e,
Is there any exemple demonstrating the INTC HW vector mode? I'm using SPC564B74 and I don't know how to add my vectors in the linker script. I added .extern pit1_ISR in ivor.s:/*
* INTC registers address. */ .equ INTC_IACKR, 0xfff48010 .equ INTC_EOIR, 0xfff48018.extern pit1_ISR
but I was getting the assembler error:
../bsp/components/spc56ecxx_osal_component/lib/src/ivor.s:49: error: unrecognized external symbol type '''' must be STT_OBJECT/STT_FUNC
So I removed it since the manual says that extern is ignored. It compiles then but the PIT is not generating interrupts...
My goal is to use FlexCAN, LINFlex and PIT1 using HW vector mode to be as fast as possible.
By the way, I'm following SPC5Studio since V2, and with V5, I have to say that it has never been so easy to start from scratch! (especially the license setup since node locked detection is just a click away) Thanks a lot!
#intc2016-11-21 02:44 AM
Hello Aurelien ,
Did you solve your issue ?B74 Hardware Vector Mode is managed by the IVPRcf chapter HVEN should be set to 1cf chapter 19.4.2 in RF Best regards Erwan2016-11-23 02:18 AM
Hello Aurelien ,
Here is the feedback of a SPC5x Expert,''First of all, the documentation about hardware interrupts is unclear and could confuse the reader
With an unclear documentation I did a simple test by enabling hardware interrupts (HVEN = 1)
and using PIT0 as source of interrupt.
As soon as a PIT0 interrupt is fired the Program Counter (PC) is set to 0x000018EC where:
In order to manage the (hardware) interrupt in hardware mode, at address 0x000018EC need to have a branch ('bl') instruction
which redirect the execution flow to the user interrupt handler.
The user interrupt handles will be responsible to acknowledge the interrupt source and to return to normal
execution (using an ‘rfi’ instruction at the end).
For each hardware interrupt, in the hardware vector table, 4 bytes available (see table 155 in Reference manual)
At the end, the vector table should be a list of branch instructions and the vector table must be
placed (by a linker script directive) to a specific address (0x00001000 in case of Bolero)''
Best regards Erwan2016-11-24 12:25 AM
Hello Erwan,
these precisions will help for sure. Thank you.
Happy to discover that this community forum will be updated!
Aurélien
2016-11-24 12:49 AM