Do I need to create Vector table in RAM while using FreeRTOS with FRDM KL26Z?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Do I need to create Vector table in RAM while using FreeRTOS with FRDM KL26Z?

1,670 Views
vartikasingh
Contributor I

Hi,

I am using Free RTOS and FRDM KL26Z board and in my application, I need to give semaphore to a task from within Low power timer interrupt handler.  Inorder to use the ISR, I tried registering it with FreeRTOS so that vector address gets allocated to this particular ISR but my code after compilation is stopping at the point below: 

/* Check whether there is vector table in RAM */
assert(__VECTOR_RAM != 0U);

Do I need to create vector table in RAM for  interrupt usage with FreeRTOS ?

0 Kudos
Reply
3 Replies

1,191 Views
vartikasingh
Contributor I

Hi,

Thanks xiangjun. We don't need to create Vector table in RAM for FreeRTOS but still, my LPTMR interrupt stops working as soon as I start the OS scheduler. The Interrupt works fine without starting the scheduler but stops working after the scheduler is started and the task works after the scheduler is run but not interrupt. I debugged the code by checking the LPTMR interrupt code separately, changing the priority of both task and interrupt, checked the FreeRTOS site for this issue but still not able to resolve the issue.

0 Kudos
Reply

1,191 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls try to set the LPTMR in the highest the priority by code:

  NVIC_SetPriority(LPTMR, 0U);  //set LPTMR in highest interrupt priority

__asm("cpsie i");  //enable interrupt

what is the result?

As far as i know the FreeRTOS uses systick module to get time.

BR

XiangJun Rong

0 Kudos
Reply

1,191 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

If you use FreeRTOS, I do not think that the freeRTOS modify the interrupt table.

The interrrupt vector is located at 0x00000000 flash address, in other words, you can change the interrupt vector table in the startup_MKxxx.S to register your ISR directly.

I copy the part from *.map. you can see that address of vector table.

Hope it can help you.

BR

Xiangjun Rong

.interrupts     0x00000000      0x400
                0x00000000                __VECTOR_TABLE = .
                0x00000000                . = ALIGN (0x4)
 *(.isr_vector)
 .isr_vector    0x00000000      0x400 ./startup/startup_MK64F12.o
                0x00000000                __isr_vector
                0x00000400                . = ALIGN (0x4)

.flash_config   0x00000400       0x10
                0x00000400                . = ALIGN (0x4)
 *(.FlashConfig)
 .FlashConfig   0x00000400       0x10 ./startup/startup_MK64F12.o
                0x00000410                . = ALIGN (0x4)

0 Kudos
Reply