JN-AN-1217-Zigbee-3-0-Base-Device - UART1

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

JN-AN-1217-Zigbee-3-0-Base-Device - UART1

1,593 Views
minhtan_uet
Contributor III

Hi suppor team!
Now. I'm working with JN-AN-1217-Zigbee-3-0-Base-Device

Relate to end:  https://community.nxp.com/thread/438796  
TB Coordinator project work well with UART1.
Then I want to use UART1 for transfer data in Router

I add more funtion to enable UART1 on Basic Router as Project Coordinator
    + app_serial_commands.c, app_serial_commands.h, uart.c, uart.h

app_start.c :: APP_vInitialise

pastedImage_6.png

main.c

pastedImage_3.png

pastedImage_2.png

main.h

pastedImage_9.png

Define in make file for enable UART 1 with baurate 115200
But have problem When printf data

Case 1:

pastedImage_3.png

pastedImage_5.png

It is OK ( Output UART1, Output UART 0)

Case 2:
pastedImage_1.png

pastedImage_2.png

It is OK! (Input UART0, Output UART 1)

Case 3:

pastedImage_6.png

pastedImage_5.png

Not work - Nothing to printf

I'm not defined 14, 15 for led


Is there a problem? Hope you help!
See my project:  GitHub - minhtan58 / JN-AN-1217-Zigbee-3-0-Base-Device 

Thank a lot!

Labels (1)
7 Replies

1,167 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Tran Minh Tan, I hope you're doing well!

 

Am I understanding you correctly in that you want to communicate and print debug information from the same UART?

 

If that's what you're trying to do, in Application Note JN-AN-1216 we use UART0 to both communicate and print debug information. You could take what's being done as reference in JN-AN-1216 and port it to JN-AN-1217. There are some changes in the initialization and in the makefile. Could you please try doing that?

 

If it's not what you meant, could you please let me know?

 

Best regards,

Sebastian

1,167 Views
minhtan_uet
Contributor III

HI Sebastian Delrio Employé
Actually. I just want tranfer data to UART1 on Router (UART0 => UART1)

Only with JN-AN-1217-Zigbee-3-0-Base-Device project
I have add app_serial_commands.c, app_serial_commands.h, uart.c, uart.h to Rounter (Base on Coordinator - JN-AN-1217)
But when i define

Case 3:

pastedImage_6.png

pastedImage_5.png

Nothing to printf to UART1. and I don't know what reason? (With Coordinator JN-AN-1217 it work well)

Addition. I have get uart.c,uart.h  from JN-AN-1216 add to Router JN-AN-1217 => Nothing to printf when i send data to UART1

Thank a lot! :smileygrin:

 

0 Kudos

1,167 Views
minhtan_uet
Contributor III

Hi Sebastian Delrio Employé

JN5169 UART1 SEND DATA 
JN5169 uart1 Cannot send data to computer 

I have config the same with Coordinator but still can't print data to UART1. What wrong with Router?
Thanks

0 Kudos

1,167 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Tran Minh Tan,

 

The changes necessary to enable and use UART1 are in the attached zipped file. They are marked with a "//Sebastian" comment. With this code, we were able to enable functionality to the UART, however, when implementing it into your code, you should make sure that you're not interfering with a task or with a critical process and that the pins used by the UART1 are not being used for any other purpose or peripheral. Also, you should see if the irq file is being changed accordingly for use with UART1 instead of UART0.

 

Could you please take a look at these files?

 

Best regards,

Sebastian

0 Kudos

1,167 Views
minhtan_uet
Contributor III

Dear Sebastian Delrio
Thank you so much!!!
I have try many times, But nothing print when i send Data to UART1
Make file:
pastedImage_2.png

pastedImage_3.png

Sorry for the inconvenience ;((

1,167 Views
leduytoan123456
Contributor I

Sorry Tan. I come from VietNam country. I also code with JN516x but I can't enable Uart 0 or Uart 1 for console log and send command.  I have tested for 1 week but it's fail despite of I have read all comment from members in community of NXP. Can you share code test for Uart to me? Thanks so much.

Please let me know if you argee.

0 Kudos

1,167 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Tran Mihn Tan,

 

Could you please try implementing the code in another application note so that you can see if without other functionality you can make it work?

 

The problem may be related to the fact that maybe the same pins are being used for multiple other peripherals, could you please check that the functionality of the pins is not being overwritten by another peripheral in your implementation?

 

Please let me know of your findings.

 

Best regards,

Sebastian

0 Kudos