SB70LC external interrupts

Discussion to talk about hardware related topics only.
Post Reply
romanluba
Posts: 10
Joined: Mon Oct 26, 2020 6:03 am

SB70LC external interrupts

Post by romanluba » Thu Sep 09, 2021 6:32 am

Hello,

I noticed that the EPORT / IRQ pins on the SB70LC are all used up (N7, M7, L7, P8, N8) and I was wondering if anyone has a suggestion on how to create an interrupt that will execute an ISR when pins B8, D8 and D9 go through a rising edge. I was suggested to use the pins in their GPIO config, implement a lean timer that polls on them to check their state in the ISR, and use the gpio registers directly to check them to go past the Pins.h file.

Is there another well known/ commonly practiced solution for a situation like this

User avatar
TomNB
Posts: 435
Joined: Tue May 10, 2016 8:22 am

Re: SB70LC external interrupts

Post by TomNB » Thu Sep 09, 2021 7:50 am

Hello,

The timer input pin, T3IN, can be used to generate an interrupt. It is part of the DMA timers and has timer functions as well. These DMA timers are great and can be used for anything, I never liked the DMA in the name as it makes it seem that is all its good for. If your doing an ISR, you should read the gpio registers directly. The pins class was created to make things very easy for those without tight timing. But in an ISR timing matters. Section 22 of the MCF5270 Reference Manual covers the timer functions. I am not certain, but think this pin is used as an interrupt for various gps applications, so support might have some example code or pointers.

It seems like you are repurposing UART1. Can you provide a list of the signal pins and what you are using them for? There might be a better choice than using a UART peripheral .

romanluba
Posts: 10
Joined: Mon Oct 26, 2020 6:03 am

Re: SB70LC external interrupts

Post by romanluba » Thu Sep 09, 2021 8:39 am

Tom,

Sadly the Pins I am using are are set in stone, essentially I am using pins 8, 12, and 13 as GPIO to read their state. My plan was to use a DMA timer to execute at twice the speed of my sensor input rising rate, so the inside the ISR I read the state of the pin directly from the GPIO register. I plan on checking all 3 pins and tossing data into a mailbox for another task to act upon.

If you agree with this design choice, could you also tell me if there's a way to just check the rising edge on a GPIO pin? I wouldnt like to create an event every time the ISR is executed since some of those pins will be held high for quite some time.

romanluba
Posts: 10
Joined: Mon Oct 26, 2020 6:03 am

Re: SB70LC external interrupts

Post by romanluba » Fri Sep 17, 2021 1:15 pm

Tom, I figured it out thank you for your help we can close this out.

User avatar
TomNB
Posts: 435
Joined: Tue May 10, 2016 8:22 am

Re: SB70LC external interrupts

Post by TomNB » Fri Sep 17, 2021 2:57 pm

Good way to end a Friday! Thanks for letting me know and have a good weekend.

Post Reply