This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX , Cortex-M4 and vector table

Hello,

When coding a simple project (Freescale K40 + Keil IDE) it's possible to set the vector table offset register to the correct ram address.
For example:
#define RAM_START (0x20000000 - ((RAM_SIZE * 1024)/2)) // SRAM is symmetrical around 0x20000000

After this setup, registering an interrupt is being done by setting its address in the correct offset (RAM_START_ADDRESS + 16 + IRQ number)
I've noticed that once the RTX kernel was added to the project, any attempt to modify the vector tables offset (SCB->VTOR = xx) caused the software to jump to hard abort.

Any help please :)

Thanks,
Eitan Michaelson.

Parents
  • I've noticed that once the RTX kernel was added to the project, any attempt to modify the vector tables offset (SCB->VTOR = xx) caused the software to jump to hard abort.

    That's at least partly because of contradiction of objectives. By using an RTOS like RTX, you've promised to let that RTOS handle a good part of the fundamentals. Interrupt vectoring is well within that part. So no, you shouldn't be trying to fudge with the vector table behind RTX's back.

    Technically, the reason almost certainly is that what you're trying to do is only allowed in privileged mode --- but once you've put your code undert RTX control, it's not running in privileged mode any more.

Reply
  • I've noticed that once the RTX kernel was added to the project, any attempt to modify the vector tables offset (SCB->VTOR = xx) caused the software to jump to hard abort.

    That's at least partly because of contradiction of objectives. By using an RTOS like RTX, you've promised to let that RTOS handle a good part of the fundamentals. Interrupt vectoring is well within that part. So no, you shouldn't be trying to fudge with the vector table behind RTX's back.

    Technically, the reason almost certainly is that what you're trying to do is only allowed in privileged mode --- but once you've put your code undert RTX control, it's not running in privileged mode any more.

Children