Author Topic: TM4C1294 Registration of the UART Interrupt Handler  (Read 545 times)

0 Members and 1 Guest are viewing this topic.

Offline MihayKTopic starter

  • Newbie
  • Posts: 1
  • Country: nl
TM4C1294 Registration of the UART Interrupt Handler
« on: June 19, 2023, 12:31:14 pm »
I'm trying to make an interrupt handler by UART. Here is a link to the code I use:

https://www.programmersought.com/article/9640953879/

However, when initializing the UART, the controller freezes on registering the interrupt handler function:

Code: [Select]
UARTIntRegister(UART0_BASE, vUART0_IntHandler);
(under the debugger, I checked the input to this function, the filling of the interrupt vector, but when exiting this function, the debugger does not go further. I even made a semaphore of LEDs to make sure that after this function, the controller stops further code execution) Moreover, the function vUART0_IntHandler - can be either filled or completely empty. 

I feel like I missed some detail.
What is missing in the code?
Who knows - please help!
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4397
  • Country: us
Re: TM4C1294 Registration of the UART Interrupt Handler
« Reply #1 on: June 20, 2023, 08:24:44 am »
Did you see this:


Quote
The use of this function (directly or indirectly via a peripheral driver interrupt register function) moves the interrupt vector table from flash to SRAM. Therefore, care must be taken when linking the application to ensure that the SRAM vector table is located at the beginning of SRAM; otherwise the NVIC does not look in the correct portion of memory for the vector table (it requires the vector table be on a 1 kB memory alignment). Normally, the SRAM vector table is so placed via the use of linker scripts. See the discussion of compile-time versus run-time interrupt handler registration in the introduction to this chapter.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf