cancel
Showing results for 
Search instead for 
Did you mean: 

SMT32F4 Discovery - VCP+I2C problem

mavukovic
Associate
Posted on March 02, 2015 at 16:06

Hi, I'm using an STM32F4 Discovery board. I need to send some coefficients from a PC via putty to a digital audio processor (with which I communicate via I2C). 

I would like to use either one of the USB ports on the board. 

So, my questions are: 

Is it possible to virtualize a COM port using the mini USB connection (the one for programming)? 

I've made a virtual COM port using the other connection, and it works - however, when I use it in my project, the I2C isn't working. I'm using the I2C3, and its configuration works fine by itself. With VCP included, the digital audio processor I'm controlling stops sending ACK signals. 

Here is my main.c:

https://app.box.com/s/pa3ck5ou27536f1dfs0vkoelabherue0

For VCP, I'm using the libraries available here.

http://stm32f4-discovery.com/2014/08/library-24-virtual-com-port-vcp-stm32f4xx/

Any suggestions?

Thanks!
1 REPLY 1
mavukovic
Associate
Posted on March 04, 2015 at 21:53

OK, so, I took a look at the datasheet, it turns out that PA8 (which is the SCL for I2C3) also has an alternate function OTG_FS_SOF. As far as I can tell from googling, this is used with USB audio (since I'm using the USB CDC, this shouldn't make a difference?).

I tried initializing the I2C interface once more after the VCP, but no change.

Also, looking at the datasheet, I2C1 (on PB6 and PB7) doesn't have any common pins with USB, if SMBUS is not used. However, I2C1 also doesn't work in combination with VCP.

Has anyone had any experience with this?

Thanks.