AnsweredAssumed Answered

Problems with combining I/O devices on stm32f4discovery

Question asked by achterop.sietse on Mar 12, 2014
Latest reply on Mar 14, 2014 by achterop.sietse
      Dear List,

I have several problems with the use of multiple I/O devices at the same time.
I have a number of stm32f4discovery boards to test.
The software I use is build upon STM32_USB-Host-Device_Lib_V2.1.0, that I found on
     http://stm32.eeelec.com/html/STM32F4%20resources.htm
The software created is directly derived from the examples found in the resources mentioned.
I made it as simple as possible, no dma or interrupts, apart from the ucb-vcp device.

I have an application that uses: dac, adc, pwm, quadrature encoder, serial port, usb-vcp port.
If I only use a single device everything works perfectly, but if I start combining more devices
together problems start to arise.
There are no conflicts in the devices and pins used as far as I can see.

A few examples. The order in which devices are initialized matter. For example first initializing
the dac/adc and then the pwm/encoders behaves differently then the other way around.
Only one of the two situations works ok.

Another example is using both usb and usart2. Only using usb works ok, but if I also send data over the
usart2 mixed with the usb data, after a second or so everything freezes.

Before I send the source code, I have few questions.
Are there things to consider when using multiple devices? Something about the order of initializing?
How can mixing usb and usart data get me in trouble when both work perfectly separately?
    Thanks in advance, Sietse

Outcomes