cancel
Showing results for 
Search instead for 
Did you mean: 

USB Serial with STM324x9I-EVAL

markbanchy9
Associate II
Posted on May 29, 2015 at 15:33

I am trying to interface a pair of XBees with a pair of STM324x9I-EVAL boards to open up a wireless communication link. I'm considering using the microUSB breakout board to interface with the dev. board but am unsure what is required to properly interface on the micro-controller's end. I know that the breakout board uses the FTDI FT231X USB-to-serial converter and that the typical way this is used is to install the FTDI driver on the host device, recognize it as a VCP, and send data over the link serially. I'm wondering what's the best way to get the XBee communicating with these dev. boards. Is it possible to somehow get the FTDI driver to install on the micro and, if so, is it worth it? Or should I scratch the VCP driver and attempt to communicate directly using USB and, if so, is this difficult to program? I'm considering scratching the USB interface if it's too difficult and using the board's RS-232 if it proves to be too difficult/time-consuming.

Any information is helpful at this point. I will admit I have little experience with the STM32 micro-controllers and with communications interfaces/protocols so please be kind...

#stm32429i-eval-board #vcp-stm32-usb
3 REPLIES 3
Posted on May 29, 2015 at 18:08

You need to use USB here why?

Can't you just interface the radios using a CMOS USART interface? Not sure of the available pin/connectivity on the STM324x9I-EVAL, but there's usually access to at least one or two USARTs on the DISCO and NUCLEO boards. If not use the RS232 connector and a MAX3232 type level shifter.

Creating some USB Hosting for a VCP/FTDI on the STM32 is going to be a highly torturous route up the learning curve.

Do you have any other micro-controller/processor experience you can leverage here?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
markbanchy9
Associate II
Posted on June 01, 2015 at 16:12

There is access to the RS-232 USART but the drawback is that the XBee breakout board for RS-232 requires an external power supply whereas the USB does not. It would overall just be cleaner to use the USB interface if it's not much more work.

I guess part of my question is that I'm unsure of how exactly the breakout board (with the FTDI USB-Serial converter) will show up on the micro-controller's end. In essence, I'm trying to find out what exactly the FTDI chip enables. Can I just send data to that port as if it's a serial connection? I have example code from ST that implements this via CDC and I'm wondering if this is enough to establish a connection.

Thanks again for your reply.

Posted on June 01, 2015 at 17:35

No, it's just a USB device at the end of a cable, you'd have to read the descriptors, read/write to the end-points and implement a driver based on your understanding of the FTDI chip and the protocol it uses. You could review it's behaviour on a PC using a USB protocol analyzer, or look for Linux driver code, to get a feel for how involved it might be.

If you're looking for ''I read and write a register'', then the USART is the way to go. There are 5V and 3V rails exposed on the DISCO board header.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..