cancel
Showing results for 
Search instead for 
Did you mean: 

USB audio stop enumerate after adding usart3

dimtass
Associate II
Posted on July 02, 2016 at 13:08

Hi all!

I'm trying to implement a usb audio sound card with stm32f4 discovery and then build an external DAC and headphone amp. I've found an excellent source code from tjaekel, which has everything I need to begin with here: http://www.tjaekel.com/DiscoveryUSB/index.html

I've downloaded the source code, compiled it in coocox and it's working perfectly. I've only changed the HSE_VALUE value to meet the external 8MHz crystal of the board.

Then I've tried to add a usart port (USART3) for debugging and also sending commands to the stm32 in order to change some future DSP params. The thing is that if add these files to project, even if I don't really use them; or make any reference to functions from these files in the existing code, the project compiles but the USB stops to enumerate... If I remove these files it works again fine. The new added files are usart3.h, usart3.c and printf.c.

This is very weird. Do you have any idea what the problem might be? I've also used different compilers and I still get the same issue.

The stm32f407 seems not to be hanging as I've used the orange led as heartbeat and also the usart prints out the strings without any problem. Therefore, the interrupts seems to be triggered and the processor operates. Only the USB enumeration stops.

I've uploaded the Coocox project here:

https://www.dropbox.com/s/xn8kekercj4pvpo/DiscoveryAudioUSB_with_uart.zip?dl=0

I appreciate any feedback. Thanks!

#stm32f4-discovery
1 REPLY 1
dimtass
Associate II
Posted on July 02, 2016 at 17:36

Well, this is really funny. I haven't seen that again. If I even add an empty .c file (eg. test.c) to the project in coocox, then compile the project and upload it, then USB stops working. If I just remove the empty file, it works again. This is really weird...