FX2LP CY7C68013A Serial port 1 configuration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
r_shivakumar
Level 1
Level 1
5 replies posted 5 questions asked 10 sign-ins

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

0 Likes
1 Solution
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

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

View solution in original post

0 Likes
3 Replies