not seeing USB device with DISCOVERY demo

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

chibby
Posts: 66
Joined: Wed Oct 22, 2014 11:20 am

not seeing USB device with DISCOVERY demo

Post by chibby »

Hi,

I have a new stm32f4 discovery board.
http://uk.farnell.com/stmicroelectronic ... dp/2009276

Using arm-none-eabi-gcc on linux, I built the demo code from Chibios_2.6.5:
~/ChibiOS_2.6.5/demos/ARMCM4-STM32F407-DISCOVERY-MEMS

This compiled and flashed without any problems and the board is flashing a sequence of three LEDs, so it seems to be running.

I have both the micro USB and the mini USB connected but I only see the STlink device on the PC.

The hardware and the PC are working since I had already run this test demo and got output down from a second device created on the OTG.
http://vedder.se/2012/07/usb-serial-on-stm32f4/

That causes linux to create /dev/ttyACM0 for the OTG line.

I was expecting a second device to appear on OTG connector with the Chibios demo but there is only one USB device found by linux and minicom does now show anything coming from it and it does respond if I type mem or test.

Code: Select all

  /*
   * Initializes a serial-over-USB CDC driver.
   */
  sduObjectInit(&SDU1);
  sduStart(&SDU1, &serusbcfg);



Is this the correct demo for the board? What have I misunderstood?

Thanks.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: not seeing USB device with DISCOVERY demo

Post by Giovanni »

The board is right and it should work. However it is not the first time I hear of problems using a Linux host, could you try if a windows host recognizes the board?

Giovanni
chibby
Posts: 66
Joined: Wed Oct 22, 2014 11:20 am

Re: not seeing USB device with DISCOVERY demo

Post by chibby »

Thanks for the reply.

I edited some extra detail above you may have missed. This board does work with the two linux distros I have installed.

Using another simple ( non chibios ) demo that uses the ST libs, I linked above, I do get the expected devices showing up and working communications. I get /dev/ttyACM0 and two way comms work.

Also note that STlink is getting a device created, it's just the OTG that does not show.

I have just reflashed the other other firmware and confirmed it is still working as previously seen.

thx

( I don't have any windows machines but that seems unnecessary in view of the other demo software working. )
Last edited by chibby on Wed Oct 22, 2014 1:30 pm, edited 1 time in total.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: not seeing USB device with DISCOVERY demo

Post by Giovanni »

Knowing that the demos using ST libs work just tell me that the board is working.

I asked if the ChibiOS demo is recognized by a windows host because is a) It does not work with a Linux host and b) It works on a windows host then I know it is a Linux-host related problem and not something else. If both a) and b) do not work then probably the problem is with your tools.

Giovanni
chibby
Posts: 66
Joined: Wed Oct 22, 2014 11:20 am

Re: not seeing USB device with DISCOVERY demo

Post by chibby »

If the other software works, it tells us that the hardware is connected and working and that the linux software is correctly configured and will create devices. I would think that is one of the first things you need since you have no knowledge of my level of competence and possible state of the installation in question. I can see that a test on another OS would provide useful extra info.

I will see whether I can locate a windoze machine and install VCP driver, if the owner does not mind.

I have not used that system for about 10y and am not sure I'd even recognise the UI any more.

Thanks for taking a look.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: not seeing USB device with DISCOVERY demo

Post by Giovanni »

Thanks to you, apparently I have been unable to get the other Linux users that reported problems to do this specific test. Setting up a PC just for this would be complex for me.

Giovanni
chibby
Posts: 66
Joined: Wed Oct 22, 2014 11:20 am

Re: not seeing USB device with DISCOVERY demo

Post by chibby »

Code: Select all

arm-none-eabi-gcc --version
arm-none-eabi-gcc (crosstool-NG 1.18.0) 4.7.2


The toolchain was built locally using ctng.

Do you have a recommended arm gcc that I could try, if you suspect that may be the problem?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: not seeing USB device with DISCOVERY demo

Post by Giovanni »

Self built GCC toolchains are a common source of problems but I cannot tell if this is your case.

You may try this one: https://launchpad.net/gcc-arm-embedded

I recommend staying with 4.7.x because 4.8.x has a problem related to LTO.

Giovanni
chibby
Posts: 66
Joined: Wed Oct 22, 2014 11:20 am

Re: not seeing USB device with DISCOVERY demo

Post by chibby »

Thanks,

I used the current Fed 20 cross compiler for arm and it seems to work perfectly.

Code: Select all

arm-none-eabi-gcc --version
arm-none-eabi-gcc (Fedora 2013.11.24-2.fc20) 4.8.1


Code: Select all

ch> info
Kernel:       2.6.5
Compiler:     GCC 4.8.1
Architecture: ARMv7-ME
Core Variant: Cortex-M4
Port Info:    Advanced kernel mode
Platform:     STM32F407/F417 High Performance with DSP and FPU
Board:        STMicroelectronics STM32F4-Discovery
Build time:   Oct 23 2014 - 12:53:57


Very pleasing.

That would seem to be the q4 release, ie later than the q3 which was the last 4.7 you recommended. So far, so good.

I was aiming to use ChibiOS to control several stepper motors, with some real time data acquisition, and serve up the data as low priority task, possibly by TCP/IP .

Is that a reasonable application for ChibiOS ?

Thanks for the help.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: not seeing USB device with DISCOVERY demo

Post by Giovanni »

A reasonable task for ChibiOS, probably you will find more problems with lwIP, I don't know it much.

Giovanni
Post Reply