TWR K64F+TWR-SER2

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

TWR K64F+TWR-SER2

Jump to solution
879 Views
kooroshhajiani
Contributor III

I've been trying to use the DB9 connector on TWR-SER2 to communicate from TWR-K64F120 UART1 to PC.

I can run the "Hello World" demo on TWR-K64F120 successfully and communicate to PC over the USB open cd victual com port link.

For the next step I decided to use the DB9  connector on  TWR-SER2 to do the same thing however I realized that :

  • UART1 is used in the demo for TWR-K64F120 to link up with the PC virtual com port
  • I can not find any jumper settings to connect TWR-K64F120 UART1 to UART1 on TWR-SER2 ,this is significant since DB9 connector is linked with UART1

So I'm not certain how to connect TWR-K64F120  UART1to TWR-SER2 UART1 and even if this is possible?

The jumper setting on TWR-K64F120,  connect the UART1 either to the USB open cd com port or to the UART0 of the TWR-SER2 via Primary TOWER Elevator board.

At this point I gave up on the UART1 connection from K64F to SER2 and decided to use US Serial interface on SER2  board, this interface uses UART0, so I need to change the demo code a little bit as to use UART0 rather than UART1 and try it.

Please let me know if my approach is correct and if any of the assumptions that I made is wrong. This is my 1st week working with all of these products and I know I'm missing something here.

One last thing:

When I try to download the driver for the USB , I just see an .inf file and no installer or anything like that, anyways  in device manager ,there is a USB-assigned to COM3 .IS THIS NORMAL?

Thanks,

Koorosh Hajiani

248-778-63

0 Kudos
1 Solution
577 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Koorosh

If you want use the DB9 on TWR-SER2, you need change the "TERM_PORT" defined in tower.h and define the UART5_ALT2.

tower.jpg

You can read these two Schematics:

TWR-K64F120M Schematics (REV B) 

TWR-SER2-SCH: Enhanced Serial Module Schematics (REV C)

TWR-K64F120M.jpg

TWR-SER2.jpg

Best Regard

Robin

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
6 Replies
578 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Koorosh

If you want use the DB9 on TWR-SER2, you need change the "TERM_PORT" defined in tower.h and define the UART5_ALT2.

tower.jpg

You can read these two Schematics:

TWR-K64F120M Schematics (REV B) 

TWR-SER2-SCH: Enhanced Serial Module Schematics (REV C)

TWR-K64F120M.jpg

TWR-SER2.jpg

Best Regard

Robin

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
577 Views
kooroshhajiani
Contributor III

Hi Robin,

Many Thanks for your response.

I can't find tower.h in ksdk_platform_lib-K64F12.Is there a separate lib for TWR I need to link?

Could you please tell me where I would  find it. I am using Design Studio for my environment

Regards,

Koorosh

0 Kudos
577 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Koorosh,

The UART1_RX and UART1_TX (TWR-SER2) are connected to PTE9 and PTE8 (TWR-K64F120) throught the A43 and A44 of TWR-ELEV.

So if you want use the DB9 connector, you should configure the  PTE9 (UART5_RX) and PTE8 (UART5_TX) as UART5 function.

If you are not using KINETIS-SDK , you can try the the method what I described yesterday.

After download the KINETIS_K64_SC (REV 1.2)you can find the tower.h in hello_world demo.(E:\Kinetis_K64_SC_INIT\K64F120M_IAR_Sample_Code\build\iar\hello_world)

If you are using KINETIS-SDK , the new released  Kinetis SDK Builder (REV 2 & 1.3) is recommended.

You can refer "Using Kinetis Design Studio v3.x with Kinetis SDK v2.0" update it first.

And then read the "Kinetis SDK v.2.0 API Reference Manual.pdf" to achieve it (configure the PTE9 and PTE8 as UART5 function).

Regards,

Robin

0 Kudos
577 Views
kooroshhajiani
Contributor III

Hi Robin,

Many Thanks for your response, yes it makes sense

When I try to switch to UART5 , by doing the following:

Port_HAL_SetMuxMode(PORTE,9u,kPortMuxAlt3);

Port_HAL_SetMuxMode(PORTE,8u,kPortMuxAlt3);

AS I step through the code, when it gets to Port_HAL_SetMuxMode  it hangs in some ISR that basically just spins forever (default ISR).

I can't tell which ISR it is in.

Actually this demo seems to work only for UART1 , I TRIED THIS FOR ANYOTHER UART and it does the same thing.

The board is TWR-K64F120 and the environment is KDS.

Thanks,

Koorosh Hajiani

0 Kudos
577 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Koorosh,

Could you please tell me which project are you testing?

It seems that you haven't enable the clock gate of PORTE.

If you want use other UART modules, you need enable their clock gates before trying to write or read the register of them.

Robin

0 Kudos
577 Views
kooroshhajiani
Contributor III

Hi Robin_Shen,

I got this to work last week .You're correct ,I had to do this:

CLOCK_SYS_EnablePortClock(PORTE_IDX);       for it to work.

Thanks for all the help.

Koorosh Hajiani

0 Kudos