- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using CY7C68013A-128AXC chip. My requirement is to print debug messages through TXD1 (Serial port 1).
I have referred to application note "AN58009 - Serial (UART) Port Debugging of EZ-USB® FX1/FX2LP™ " and Firmware example "FX2LPSerial.c" file. Firmware example is provided for Serial port 0.
There is not much clear information provided in the application note on changes to be done in the "FX2LPSerial.c" file to use serial port 1.
Can i know the changes needs to be done to transmit debug messages through TXD1. My application doesn't need RXD1 to be enabled.
If you could modify the attached file to use Serial port 1 (TXD1) and send it back, it would be of greatest help. Thanks.
- Shivakumar
Solved! Go to Solution.
- Tags:
- cy7c68013a
- fx2lp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Kindly refer to the folder FX2LPSerialDebug in the project. Under FX2LPSerial.c, FX2LPSerial_Init () configures the serial port (0 in this case) along with the timer (Timer2 in this case). In case you need to use serial port 1, you should configure SCON1 instead of SCON0. Additionally, serial port 1 cannot use Timer 2 as its baud rate generator which is used in this case. So you would need to use a different timer. Lastly, you should replace serial buffer register SBUF0 with SBUF1 in the code.
Kindly refer to Chapter 14 in the FX2LP TRM. You will be able to get complete information on configuring the serial port registers and timers.
Kindly let me know if you have any queries on this.
Regards,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Kindly refer to the folder FX2LPSerialDebug in the project. Under FX2LPSerial.c, FX2LPSerial_Init () configures the serial port (0 in this case) along with the timer (Timer2 in this case). In case you need to use serial port 1, you should configure SCON1 instead of SCON0. Additionally, serial port 1 cannot use Timer 2 as its baud rate generator which is used in this case. So you would need to use a different timer. Lastly, you should replace serial buffer register SBUF0 with SBUF1 in the code.
Kindly refer to Chapter 14 in the FX2LP TRM. You will be able to get complete information on configuring the serial port registers and timers.
Kindly let me know if you have any queries on this.
Regards,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mallika,
Thanks for the information. I will check the FX2LP TRM as per your suggestion.
Just wanted to check if Cypress has any example firmware for using seral port 1. This would be an easier and quicker solution for me. Thanks.
-Shivakumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shivakumar,
No the only example available is the one pointed by you which uses Serial port 0.
You may check this KBA: https://community.cypress.com/t5/Knowledge-Base-Articles/Usage-of-Serial-Ports-0-and-1-on-FX2LP-impl...
Although it is for a different application, it is using Serial Port 1 and talks about how to configure the same.
Regards,
Mallika