Hi There,
I am switching over to using KDS. I am trying to figure out how user interrupt vectors are supposed to be setup in KDS. In codewarrior there was the kinetis_sysinit.c file where the user interrupts could be define. But, the structure seems to have changed in KDS.
Can someone point me to any documentation on how KDS should be properly setup?
It appears that maybe vectors are defined in the "startup_MK20D5.s" file and I would just need to define my intertupt vector in user code with the same names here?
Are there any project examples for KDS?
snippet of "startup_MK20D5.S" code
.section .isr_vector, "a"
.align 2
.globl __isr_vector
__isr_vector:
...
.long DMA0_IRQHandler /* DMA channel 0 transfer complete interrupt*/
.long DMA1_IRQHandler /* DMA channel 1 transfer complete interrupt*/
.long DMA2_IRQHandler /* DMA channel 2 transfer complete interrupt*/
.long DMA3_IRQHandler /* DMA channel 3 transfer complete interrupt*/
.long DMA_Error_IRQHandler /* DMA error interrupt*/
...
Thanks.
Solved! Go to Solution.
Hello M J:
You are correct, vectors are defined in the startup_xxx.S file, then you only have to declare your Interrupt Service Routine (ISR) with the same name as in that file, or change it if you wish. Apart from this everything is the same as in CW, enabling the peripheral interrupt and the NVIC manager. For the NVIC you count with some helpful files in the "Includes" folder:
- core_cm0plus.h
- core_cm4.h
- core_cmFunc.h
If you are not familiar with the NVIC you can download the K20_50 MHz sample code and compare it with the Reference Manual:
Freescale Freedom Development Platform for th|Freescale
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello M J,
There is (the attachment )a demo about KDS interrupt (GPIO interrupt ), this is create on k60, you can refer to it .
Best Regards,
Alice
------------------------------------------------------------------------------------------
If this post answers your question, please click the Correct Answer button.
Thank you for the verification and the example!
Hello M J:
You are correct, vectors are defined in the startup_xxx.S file, then you only have to declare your Interrupt Service Routine (ISR) with the same name as in that file, or change it if you wish. Apart from this everything is the same as in CW, enabling the peripheral interrupt and the NVIC manager. For the NVIC you count with some helpful files in the "Includes" folder:
- core_cm0plus.h
- core_cm4.h
- core_cmFunc.h
If you are not familiar with the NVIC you can download the K20_50 MHz sample code and compare it with the Reference Manual:
Freescale Freedom Development Platform for th|Freescale
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------