STM32F407 + USB + ULPI Interface
Moderator: RoccoMarco
Re: STM32F407 + USB + ULPI Interface
Giovanni,
That sounds great. I will work on this, and if I get it working in and in shape we can figure out how to get you some hardware.
cheers
adam
That sounds great. I will work on this, and if I get it working in and in shape we can figure out how to get you some hardware.
cheers
adam
Re: STM32F407 + USB + ULPI Interface
Hi Giovanni,
As I see in http://sourceforge.net/p/chibios/bugs/377/?limit=25&page=1#65c0 there is a movement around ULPI support in ChibiOS.
Can you point in what version support will be ready to try it?
What about examples published by Dave on https://github.com/dsigma/ChibiOS?
They are on quite old and unstable ChibiOS version so is there a process of porting them to version 3?
I am interested to test CDC/MS example on my HW using STM32-H405 & USB3300 boards.
Best regards
Chris
As I see in http://sourceforge.net/p/chibios/bugs/377/?limit=25&page=1#65c0 there is a movement around ULPI support in ChibiOS.
Can you point in what version support will be ready to try it?
What about examples published by Dave on https://github.com/dsigma/ChibiOS?
They are on quite old and unstable ChibiOS version so is there a process of porting them to version 3?
I am interested to test CDC/MS example on my HW using STM32-H405 & USB3300 boards.
Best regards
Chris
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32F407 + USB + ULPI Interface
Hi,
Yes, it has finally merged, I had to wait hardware with ULPI support.
The code is in the repository trunk and will be released in 3.1.0 (will not be backported to 3.0.x). It is also available in ChibiStudio as an alternate workspace.
The STM32F7xx USB demo uses the ULPI code, not tested on F4 so far but it should work as-is.
Giovanni
Yes, it has finally merged, I had to wait hardware with ULPI support.
The code is in the repository trunk and will be released in 3.1.0 (will not be backported to 3.0.x). It is also available in ChibiStudio as an alternate workspace.
The STM32F7xx USB demo uses the ULPI code, not tested on F4 so far but it should work as-is.
Giovanni
Re: STM32F407 + USB + ULPI Interface
Thanks Giovanni,
I will try to make some test on my HW.
Best regards
Chris
I will try to make some test on my HW.
Best regards
Chris
Re: STM32F407 + USB + ULPI Interface
Hi Giovanni,
While trying to port RT-STM32F746G-DISCOVERY-LWIP-FATFS-USB demo from SVN trunk to my HW I get some strange compilation result - bss become abnormally big.
For example compiling original project gives:
Even for main application reduced to blinking demo bss become more than 128kB and, of course, did not work at all.
I try with GNU Tools ARM Embedded ver 4.7 and 4.9 but result is similar.
At testing with ChbiOS ver. 3.0.3 compilation gives normal bss values but there are some functional incompatibilities.
Until now I made tens of projects even from scratch but always using releases.
Where could be the problem?
Best regards
Chris
While trying to port RT-STM32F746G-DISCOVERY-LWIP-FATFS-USB demo from SVN trunk to my HW I get some strange compilation result - bss become abnormally big.
For example compiling original project gives:
Code: Select all
text data bss dec hex filename
100956 740 298080 399776 619a0 build/ch.elf
Even for main application reduced to blinking demo bss become more than 128kB and, of course, did not work at all.
I try with GNU Tools ARM Embedded ver 4.7 and 4.9 but result is similar.
At testing with ChbiOS ver. 3.0.3 compilation gives normal bss values but there are some functional incompatibilities.
Until now I made tens of projects even from scratch but always using releases.
Where could be the problem?
Best regards
Chris
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32F407 + USB + ULPI Interface
Hi,
There are differences in the .ld files, now the unused space is grouped into a heap region so it looks like it is used. Look at the map file for real values.
It is unlikely this is the cause of your problems.
Giovanni
There are differences in the .ld files, now the unused space is grouped into a heap region so it looks like it is used. Look at the map file for real values.
It is unlikely this is the cause of your problems.
Giovanni
Re: STM32F407 + USB + ULPI Interface
Hi guys,
Finally, I succeeded to run on Olimex stm32-h405 board ChibiOS example with both USB cores: USB OTG FS and USB OTG HS with external HS ULPI PHY (USB3300). There are 3 shells running on both USB FS and HS CDC devices and USART1 while USART2 is used for debugging. The example is based on chibios-svn-8506-trunk and RT-STM32F746G-DISCOVERY-LWIP-FATFS-USB demo.
Abnormal bss size described in my previous post was not a problem. The main problem was with the board files generated with configuration tool. To overcome it I prepare manually written board files. Probably there is newer version of the configuration tool or some mistake made by me so the problem has to be fixed properly.
Unfortunately, I reach another problem - to use shells on both USB CDC devices simultaneously. While the shells on USB OTG HS and USART1 are always working the shell on USB OTG FS is running only when USB3300 module is disconnected from the MCU completely. CDC on USB OTG FS is even more strange because when connected to MAC OSX ChibiOS prompt is received but no command is accepted. Other strange situation is when trying to re-direct CDC device to Linux VM - VMWare reports that device is used by another program.
The same behavior was observed by me while testing ST STM32Cube SW on the same HW (stm32-h405 board and USB3300 module). The example tested is similar to one described above but FreeRTOS via CMSIS API is used instead.
Any ideas for searching and fixing the problem are greatly appreciated. I can share the example if somebody is interested to test it on the same or similar HW.
Best regards
Chris
Finally, I succeeded to run on Olimex stm32-h405 board ChibiOS example with both USB cores: USB OTG FS and USB OTG HS with external HS ULPI PHY (USB3300). There are 3 shells running on both USB FS and HS CDC devices and USART1 while USART2 is used for debugging. The example is based on chibios-svn-8506-trunk and RT-STM32F746G-DISCOVERY-LWIP-FATFS-USB demo.
Abnormal bss size described in my previous post was not a problem. The main problem was with the board files generated with configuration tool. To overcome it I prepare manually written board files. Probably there is newer version of the configuration tool or some mistake made by me so the problem has to be fixed properly.
Unfortunately, I reach another problem - to use shells on both USB CDC devices simultaneously. While the shells on USB OTG HS and USART1 are always working the shell on USB OTG FS is running only when USB3300 module is disconnected from the MCU completely. CDC on USB OTG FS is even more strange because when connected to MAC OSX ChibiOS prompt is received but no command is accepted. Other strange situation is when trying to re-direct CDC device to Linux VM - VMWare reports that device is used by another program.
The same behavior was observed by me while testing ST STM32Cube SW on the same HW (stm32-h405 board and USB3300 module). The example tested is similar to one described above but FreeRTOS via CMSIS API is used instead.
Any ideas for searching and fixing the problem are greatly appreciated. I can share the example if somebody is interested to test it on the same or similar HW.
Best regards
Chris
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM32F407 + USB + ULPI Interface
Hi,
Make sure to use the latest code from repository, also, which compiler are you using?
Giovanni
Make sure to use the latest code from repository, also, which compiler are you using?
Giovanni
Re: STM32F407 + USB + ULPI Interface
Hi Giovanni,
I use chibios-svn-8506-trunk (SVN snapshot of trunk from 18.11.2015).
For GNU Tools ARM Embedded I tested with:
The problem is more likely to be STM32 errata or none re-entrant code.
Best regards
Chris
I use chibios-svn-8506-trunk (SVN snapshot of trunk from 18.11.2015).
For GNU Tools ARM Embedded I tested with:
- gcc-arm-none-eabi-4_9-150626 (dated 26.06.2015)
gcc-arm-none-eabi-4_9-2015q3-20150921-win32 (dated 21.09.2015)
Code: Select all
ch> info
Kernel: 3.1.0
Compiler: GCC 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]
Architecture: ARMv7E-M
Core Variant: Cortex-M4
Port Info: Advanced kernel mode
Platform: STM32F405 High Performance with DSP and FPU
Board: STM32-H405 with USB3300
Build time: Nov 20 2015 - 11:33:32
ch> threads
addr stack prio refs state name
20001D30 20000774 64 1 SLEEPING main
20001DD0 20001E84 1 1 READY idle
200013D0 200014EC 2 1 SUSPENDED usb_lld_pump
200015B8 200016D4 2 1 SUSPENDED usb_lld_pump
20000CE0 20000DEC 64 1 SLEEPING blinker
200026F8 20002E94 67 1 CURRENT shell
20002FE8 200037D4 66 1 QUEUED shell
200038D8 200040C4 65 1 QUEUED shell
The problem is more likely to be STM32 errata or none re-entrant code.
Best regards
Chris
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times