TM4C123GXL interrupt handler

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
SvenGlueck
Posts: 3
Joined: Thu Mar 26, 2020 5:09 pm

TM4C123GXL interrupt handler

Post by SvenGlueck » Thu Mar 26, 2020 5:19 pm

Hi all,

I am new to this forum. So this will be my first post.

I am currently working for a project at my university. In this project we arte trying to bring uP to the TI TM4C123GXL board. It is working good so far, but now I am stuck with interrupt handlers.

I implemented the interrupt configuration so far. So e.g when the an interrupt on a GPIO for a rising edge shall be generated, the register are set. This is working. But I don't know how the uC saves the written interrupt handler over the REPL into the Vector Table (start address of the handler)? I saw some examples for the ESP boards and how they write interrupt handlers over the REPL. But how to save this written code in the uC? Because this handler needs to be somewhere in order the uC can jump into it.

Thank you for your help.

Best regards
Sven

Online
User avatar
jimmo
Posts: 1847
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: TM4C123GXL interrupt handler

Post by jimmo » Tue Apr 14, 2020 5:08 am

SvenGlueck wrote:
Thu Mar 26, 2020 5:19 pm
I implemented the interrupt configuration so far. So e.g when the an interrupt on a GPIO for a rising edge shall be generated, the register are set. This is working. But I don't know how the uC saves the written interrupt handler over the REPL into the Vector Table (start address of the handler)? I saw some examples for the ESP boards and how they write interrupt handlers over the REPL. But how to save this written code in the uC? Because this handler needs to be somewhere in order the uC can jump into it.
Hi,

Sorry I missed this earlier, got stuck in the open tab queue!

Sorry I'm not quite sure what you're asking. What does it mean to "saves the written interrupt handler over the REPL into the Vector Table" ? I assume by REPL you mean the interactive prompt? I'm guessing you want to be able to use the Pin.irq method to set a callback (and perhaps you're doing this from the REPL?)

Unless you're using an RTOS, the general approach is that you'd have a static ISR handler (written in C) for the pin IRQ, which would then look up registered Python callbacks.

Rather than looking at the ESP32/ESP8266 ports (which are based on an RTOS and for a vastly different architecture), the STM32 port is probably a much better reference (also based on the Cortex M series).

Post Reply