Visible to Intel only — GUID: iga1464289819862
Ixiasoft
Visible to Intel only — GUID: iga1464289819862
Ixiasoft
7.5.9.1. Timer Memory
The timer_memory_section.tcl script is located in the bsp/timer_hal directory. This Tcl script reserves 2048 bytes of the tightly coupled instruction memory. The reserved space is used to store the timer interrupt service routines.
The timer_memory_section.tcl script takes the tightly_coupled_instruction memory region and separates out 2048 bytes of the memory region into a new region called timer_isr_region. The next line of code adds a section mapping the .isrs section to the timer_isr_region.
# Create tightly_coupled_memory region. add_memory_region tightly_coupled_instruction_memory $slave $offset $new_span # Create a second region called timer_isr memory_region. add_memory_region timer_isrs_region $slave $split_offset $split_span # Create memory mapping to map .isrs to timer_isrs_region. add_section_mapping .isrs timer_isrs_region
The timer_interrupt_latency.h file is also updated to reflect the change in the section mapping of the timer_interrupt_latency_irq() timer interrupt service routine to .isrs instead of .exceptions. The timer interrupt service routines are now stored in the timer_isr_region.
The interrupt service routines must be located in the new .isrs section. Otherwise, the linker uses the default setting, defeating the purpose of declaring a special memory section for the interrupt service routine.
To locate the interrupt service routines in the new .isrs section, complete the following steps:
- Add a section mapping to map the .isrs section to the newly added memory region.
- Edit your source files to ensure the interrupt service routines are mapped to the new memory section.
- Compile your project files and check the linker.x and tcm_isr.objdump files to ensure that the section mapping and memory regions are declared correctly and contain the interrupt service routine.