Hi all,
I am experimenting with KL43Z board. In the startup_MKL43Z4.S I can see 2 gpio interrupt handler functions defined
PORTA_IRQHandler and PORTCD_IRQHandler. If I want to add another interrupt handler for a pin in PORTB, what should I do?
Is it as simple as
1) adding PORTB_IRQHandler in __isr_vector and then defining it at the end as
def_irq_handler PORTB_IRQHandler at the end?
2) then update IRQn_Type with an additonal value?
Thanks in Advance,
Tony
Hi, Tony,
Pls refer to the example located at:
C:\Freescale\SDK2.0KL43Z256\boards\frdmkl43z\driver_examples\gpio\input_interrupt\kds
Regarding the PortB interrupt vector, as you know that one PORT has only one interrupt vector, but for KL43, I suppose that two port share the same interrupt vector. PORTA and PORTB share interrupt vector 46, PORTC and PORTD share the interrupt vector 47. I think the "Pin detect (Port A)" is a typo, it should be "Pin detect (Port A and Port B)".
Hope it can help you
BR
Xiangjun Rong
Hi, Tony,
I get information from my colleague, For KL43, the PORTB pins can not generate interrupt, only PortA, PortC, portD can generate interrupt, PortA interrupt vector is 46, PortC and PortD share the same interrupt vector 47. Sorry for the mistake.
BR
Xiangjun Rong
I have been using KL43z as development board for KL17(supports PORTB interrupt). I gone through the other recommended dev board KL27. Unfortunately that also does not support PORTB interrupt. Is there another dev board for KL17 which supports PORTB interrupts?
Many Thanks,
Tony
Hi Tony
The KL27Z32 and KL27Z64 parts have a "single" interrupt vector for ports B, C, D and E.
This means that it has the same port interrupts as a KL17Z32 or KL17Z64 parts
Beware that KL17Z128 and KL17Z256s DON'T have the Port B support, as is the case for almost all other KLs (including KL27Z128 and KL27Z256!!!!!)
It is not clear exctly which KL17 you use - if it is with 32k or 64k Flash the FRDM-KL27Z board (with 64k Flash part) would be suitable for PORT B interrupt operation. If you use a bigger part there is NO PORTB anyway.
Generally, when developing, the exact board type should not be that critical since it should be possible to (temporarily) use any other port interrupts - the HAL layer should hide the details and keep the application always compatible (apart from when the final HW doesn't support it, in which case it should clearly inform you of that).
Regards
Mark
Kinetis for professionals: http://www.utasker.com/kinetis.html