Stuck with UART

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
YuryShatz
User
Posts: 6
Joined: Sat 2016-11-05 19:36

Stuck with UART

Postby YuryShatz » Sat 2017-02-04 0:50

Hi everyone

I have a VS1005 breakout board. To debug my program I got FTDI serial-to-USB cable. This one
http://www.ftdichip.com/Support/Documen ... CABLES.pdf
Can I use it or should I get one from VLSI?

I presume that I can, it's practically a standard, right? Anyway I connected cable's green wire (RX) to pin 38, and orange (TX) to 37. I am a bit worried that your cable has different color coding, according to this.

From my program I tried to write to stdout, stderr, vo_stdout, vo_stderr, with no result. Then I copied DevUart.c to my project, and used the code from main. My init code looks like this:

WriteIMem((void *)(0x20+INTV_UART_TX),
0x2a00000e + ((u_int32)UartTransmitInterrupt << 6));
PERIP(INT_ENABLE0_LP) |= INTF_UART_TX;
vo_stdout = &uartOutFile;

Still no result.

Then I downloaded the latest VSIDE and kernel and decided to flash it. VSIDE can't find my board, either. It detects my COM port, spends some time blinking, then says it can't detect it.

I must be doing something wrong. How do I figure out what?

Thanks a lot

martij
User
Posts: 3
Joined: Mon 2017-01-30 5:05

Re: Stuck with UART

Postby martij » Sat 2017-02-04 21:12

I've been using FTDI serial-USB with not much trouble. I even did a board with one. Make sure your config.txt has:

# Clear UART RX interrupt enable
RUN YBITCLR FC00,D
# Clear UART TX interrupt enable
RUN YBITCLR FC00,C
# Start UART in/out driver
UARTIN

somewhere in it before you start SHELL.AP3 or your program.

Some caveats:
1) Windows PUTTY doesn't seem to like FTDI much though it works with the European USB converter sent with the development board. Haven't figured out why.
2) The FTDI CMOS side generates enough power to keep the VS1005 running in some sort of degraded mode even if you remove the 5v VBUS it provides.
Jed

Arek
User
Posts: 7
Joined: Thu 2016-09-01 10:58

Re: Stuck with UART

Postby Arek » Sat 2017-02-04 21:18

Hello,

You wrote: "I connected cable's green wire (RX) to pin 38, and orange (TX) to 37"

Green wire is a handshake signal (RTS)! s. page 8, table 4 of FTDI datasheet.
Try with yellow cable. This one is RX. And hopefully 3,3V.

(Also make simple reset button - very useful).
and check "User instructions"
http://www.vlsi.fi/fileadmin/evaluation ... 05-BOB.txt

With a hope to help you
best regards
am

YuryShatz
User
Posts: 6
Joined: Sat 2016-11-05 19:36

Re: Stuck with UART

Postby YuryShatz » Sat 2017-02-04 21:44

Thank you Arek!

I looked at the image where green was across from RX, instead of the table. How stupid.

Your other comment is even more important. You are writing "hopefully RX is 3.3". This means I should not use these FTDI cables, as they use "RS232 levels" that are much higher. It probably won't work and may burn the chip.

VLSI cable has "logical-level signals for TX and RX" so I should get this.

Thanks a lot!

Arek
User
Posts: 7
Joined: Thu 2016-09-01 10:58

Re: Stuck with UART

Postby Arek » Sat 2017-02-04 22:53

Hello.

First, I suggest, check which cable you have. s. table 1.1 on page 2.
Perhaps the right one...

YuryShatz
User
Posts: 6
Joined: Sat 2016-11-05 19:36

Re: Stuck with UART

Postby YuryShatz » Sat 2017-02-04 23:11

Wrong one. I got USB-RS232-WE-1800. The right ones are TTL-232...

Thanks again. Already ordered the right one.

YuryShatz
User
Posts: 6
Joined: Sat 2016-11-05 19:36

Re: Stuck with UART

Postby YuryShatz » Sun 2017-02-19 21:42

For anyone interested - VLSI cable works like a charm. If you are getting FTDI instead, make sure it's logic-level, not RS-232-level.


Return to “VS1005 and VSOS Software”

Who is online

Users browsing this forum: No registered users