Hi,
I am trying to set up the timer for two interrupts, one for match and one for capture in an input pin.
However I am struggling to understand the multiple interrupt system in the SDK for the LPC55S69. The current code is as follows:
Referring to this post: Interrupt for Capture on Standard Timer 0 not being called
I saw the sample for match interrupt and I realized that they left the first element blank so I recalculated the index of the capture 1 and rewrote this line to:
ctimer_callback_t g_ctimer_callback[] = {NULL, NULL, NULL, NULL, NULL, NULL, ctimer_capture_callback, NULL};
The callback is now at the 6 index position (when starting from 0). This fixed the problem for me.
BTW the documentation you linked has a lot to be desired.
It does not give a description of where (index value) to place the callback. Also if you check the other post, I found out there that the callback indices are slightly different from the register bits in the datasheet.
Long story short, it would be nice if this was either in the documentation or there was an example for the capture function.
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Where does each callback function go for each match and capture?
-- These callback functions will be called in the interrupt function: CTIMER_GenericIRQHandler(), you can learn more information about it by reviewing the code.
In my opinion, these callback functions are a bit 'too fancy to learn' for the developers, I'll report the feedback with the SDK team later.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Jeremy,
Just some documentation would be nice.
Regards
Thanks for your reply.
It's the link (https://mcuxpresso.nxp.com/api_doc/dev/1222/index.html) of online documentation of SDK API reference manual which you can refer to.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------