Re: STM32F4: Correct translation from native to LL clock driver

Daniel Thompson <daniel.thompson@...>

On 17/05/17 13:19, Neil Armstrong wrote:
On 05/17/2017 11:39 AM, Daniel Thompson wrote:
On 15/05/17 17:37, Daniel Thompson wrote:
On 15/05/17 10:19, Erwan Gouriou wrote:
Hi Daniel,

I think I spotted the bug, which is indeed in the commit you pointed.
It appears with current code (stm32_clock_control_on), you can't activate AHB2 clock on F4.

I've pushed following commit to solve the case:

Please have a look and tell me if it solves the issue
I took a quick look at this. It didn't "just work" for me but I am pretty short of time today and a couple of other things didn't "just work" either (and they should have done).

I will get back to you as soon as I can!

It solves the problem in the sense that devices are now enumerating correctly! However I'm afraid that the code isn't really robust enough for me to contemplate a pull request at this point (even with ModemManager disabled I am only getting a couple of characters from samples/subsys/usb/console).

I'll try to keep a rebase branch working on my github for anyone interested (branch has Christer's patch, 96b_carbon support and modifications in samples/subsys/usb to allow some of the examples to build):
Hi Daniel,
Thanks for the branch, I'll eventually experiment it on the L4 boards aswell.
But, these STM32 SoCs embeds all the same Synopsys IP, except FS one uses a register to power up the internal PHY.
The STMF4/F7 now runs Linux using the classic DWC2 driver, so it could be the same on Zephyr.
Had someone already tried this ?
As it happens this is the other reason that I'm reluctant to make a pull request of the current code base.

I've not heard of anyone getting the existing DW driver working on STM32. I certainly agree that it would be good to experiment with the native driver.

However, at present my devices of interest are STM32F0x2 parts. These do not have a DWC2 controller but do share similar HAL interfaces with the F4 series. For that reason I won't be putting much priority on native-mode driver work for STM32F4.

Following question: What about Host support ?
AFAIK Zephyr does not currently have any USB host support.


Join to automatically receive all group messages.