Interrupt Port Code Generation in KDS2.0 for KL25

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupt Port Code Generation in KDS2.0 for KL25

710 Views
youngcheolsong
Contributor II

Hello,

i designed USB device using MKL25Z128VLK4 with KDS 2.0 .

i want to use the PTA4/NMI port(pin 30) to GPIO Interrupt input.
However the generated code is not correct to use for GPIO interrupt input.

it is different from the generated code by the CodeWarrior 10.4.

below is the different part between KDS2.0 and CW10.4.

<CW10.4>

  /* Clear interrupt status flag - w1c */

  PORTA_ISFR = PORT_ISFR_ISF(0x10);                                  

  /* Initialization of Port Control registers */

  /* PORTA_PCR4: ISF=0,IRQC=0x0B,MUX=1 */

  PORTA_PCR4 = (uint32_t)((PORTA_PCR4 & (uint32_t)~(uint32_t)(

                PORT_PCR_ISF_MASK |

                PORT_PCR_IRQC(0x04) |

                PORT_PCR_MUX(0x06)

               )) | (uint32_t)(

                PORT_PCR_IRQC(0x0B) |

                PORT_PCR_MUX(0x01)

               ));                                

 

<KDS2.0>

  /* PORTA_PCR4: ISF=0,MUX=7 */

  PORTA_PCR4 = (uint32_t)((PORTA_PCR4 & (uint32_t)~(uint32_t)(

                PORT_PCR_ISF_MASK

               )) | (uint32_t)(

                PORT_PCR_MUX(0x07)

               ));

 

Could you help me to use KDS2.0 ?

Original Attachment has been moved to: KDS20_ExtIntLdd9.c.txt.zip

Original Attachment has been moved to: CW104_ExtIntLdd9.c.txt.zip

Labels (2)
0 Kudos
2 Replies

399 Views
david_diaz
NXP Employee
NXP Employee

Hello,

The following document could be useful for you:

https://community.freescale.com/docs/DOC-104352

This document explains the interrupt handling mechanism of KSDK platform and how to use it for baremetal KSDK projects.

Have a great day.

Best Regards, :smileyhappy:

David Diaz.

0 Kudos

399 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

Thank you for reporting of this issue. The ExtInt_LDD component in KDS 2.0.0 contain a bug. I will report this defect to the responsible development team.

Best Regards,

Marek Neuzil

0 Kudos