UART3 Interrupt

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

UART3 Interrupt

961 Views
ajaykr
Contributor I

Hi,

Thanks for the reply.I am fresher in the FRDM-64f.As per your reply i

checked the link and configured the PTC 16 and PTC 17 ,when i copied the

Pin_mux.c and Pin_mux.h it showing so many errors.Suggest me any other way

to find the solution.I could now read and write data using polling

method.But could not done with interrupt method.I don't know actual how

many characters will come in Rxbuff.I want to receive all the arriving

characters.

--

Regards

AJAY K R

0 Kudos
Reply
3 Replies

731 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ajay,

    I have modified the KSDK2.0_FRDM-K64 uart polling code and the interrupt code, both these project can work with PTC16 and PTC17 without problems.

   You can download KSDK2.0_FRDM-K64  from this link:

Welcome to Kinetis Expert | Kinetis Expert

  Click the build an SDK, and choose FRDM K64 board, then download KSDK2.0_FRDM-K64 .

  Now take SDK_2.0_FRDM-K64F\boards\frdmk64f\driver_examples\uart as an example:

1. polling_transfer project

Modified points:

(1) pin_mux.c file, void BOARD_InitPins(void)

void BOARD_InitPins(void)
{
    CLOCK_EnableClock(kCLOCK_PortC);
    /* Affects PORTB_PCR16 register */
    PORT_SetPinMux(PORTC, 16U, kPORT_MuxAlt3);
    /* Affects PORTB_PCR17 register */
    PORT_SetPinMux(PORTC, 17U, kPORT_MuxAlt3);
    
}

(2) uart_polling_transfer.c

#define DEMO_UART UART3
#define DEMO_UART_CLKSRC UART3_CLK_SRC

2. interrupt project

(1) pin_mux.c file, void BOARD_InitPins(void)

void BOARD_InitPins(void)
{
    CLOCK_EnableClock(kCLOCK_PortC);
    /* Affects PORTB_PCR16 register */
    PORT_SetPinMux(PORTC, 16U, kPORT_MuxAlt3);
    /* Affects PORTB_PCR17 register */
    PORT_SetPinMux(PORTC, 17U, kPORT_MuxAlt3);
    
}

(2) uart_polling_transfer.c

#define DEMO_UART UART3
#define DEMO_UART_CLKSRC UART3_CLK_SRC
#define DEMO_UART_IRQn UART3_RX_TX_IRQn
#define DEMO_UART_IRQHandler UART3_RX_TX_IRQHandler

Just follow my modification, then do the testing again, you can get the uart data in the PTC17 and can send the uart data to PTC16.

I also attached  the main file for your reference.

Wish it helps you!

Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

732 Views
ajaykr
Contributor I

Hi,

Thanks for your support.Can you tell me suggestion to find to solve the UART3 interrupt issue using KDS1.2 itself.If i can solve that issue using KDS1.2 it will be really helpful. 

0 Kudos
Reply

732 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Ajay,

  Please refer to this link to solve your KSDK1.2 problem:

https://community.nxp.com/message/539727?et=watches.email.thread#539727 

Wish it helps you!
Have a great day,
kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply