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

How to define the interrupt function ( UART0 )

hi
i whant define function "UART0_IRQHandler" in my library ( uart library )
but i dont whant use
#include <lpc17xx.h>
and
startup_LPC17xx.s

I tried this code but did not work
void (*test) (void) = (void (*) (void)) 0x54;

in file "LPC176x/5x User manual ( UM10360 )" and "Table 50" :

Interrupt_ID : 5
Exception_Number : 21
Vector_Offset : 0x54
Function : UART0
Flag(s) : Rx Line Status (RLS) Transmit Holding Register Empty (THRE) Rx Data Available (RDA) Character Time-out Indicator (CTI) End of Auto-Baud (ABEO) Auto-Baud Time-Out (ABTO)

Parents
  • In a Cortex-M3 device, the Nested Vector Interrupt Controller (NVIC) and the processor core interface are closely coupled, which enables low latency interrupt processing
    The device handles interrupts. This coupling means that are rules that need to be followed in setting up the vector table, including the order in the table, and how to place the initial stack pointer.

    See more at:

    developer.arm.com/.../about-the-nvic

    You can learn about the parts of a startup file here:
    www.keil.com/.../group__NVIC__gr.html

    As a warning, if you do not use the startup file that NXP provides, you will find it harder to get help from others for using non-standard code.

    If you want to write your own startup file, I suggest taking an online class about the Cortex-M architecture.

    www.arm.com/.../efficient-embedded-systems

Reply
  • In a Cortex-M3 device, the Nested Vector Interrupt Controller (NVIC) and the processor core interface are closely coupled, which enables low latency interrupt processing
    The device handles interrupts. This coupling means that are rules that need to be followed in setting up the vector table, including the order in the table, and how to place the initial stack pointer.

    See more at:

    developer.arm.com/.../about-the-nvic

    You can learn about the parts of a startup file here:
    www.keil.com/.../group__NVIC__gr.html

    As a warning, if you do not use the startup file that NXP provides, you will find it harder to get help from others for using non-standard code.

    If you want to write your own startup file, I suggest taking an online class about the Cortex-M architecture.

    www.arm.com/.../efficient-embedded-systems

Children
No data