Page 1 of 2

Support STM32F446 where to start

Posted: Wed Dec 23, 2015 10:40 am
by tecnologic
Hi together,

my new hardware uses the STM32F446RE, due to the better shielding of the internal ADC compared to the STM32F405RC.

The peripherals seem to be the same as in the F405, but the definitions seem to be diffrent.

By looking around in the chibios code i found that stm32_registy.h does not support the STM32F446. This alone is no big deal i thought,
copy the section from the F405 and check the config with the Refmanual.

The hal_lld.h is no problem also. Same procedure as with the stm32_registry.h

But my real problem is a file like "stm32f446xx.h" which is needed. Where can i get a Chibios compatible file?

The version from the CubeHAL is crap. So i found the Version 1.6.1 of the stm32f4xx.h from the old ST Libs. Do i get it right, that the chibios cpu specific files like "stm32f405xx.h" are a seperation of the "stm32f4xx.h" by ST in which all F4 types are included and seperated by if defs ?

How is the general procedure to include a new derivate of an cpu line?

If i'am finished i can share the files here.

Regards

Tec

Re: Support STM32F446 where to start

Posted: Wed Dec 23, 2015 10:44 am
by Giovanni
Hi,

Updated header files have already been added in repository, the correct file should already be included, only the registry and hal_lld.h should be completed by adding an entry.

Giovanni

Re: Support STM32F446 where to start

Posted: Wed Dec 23, 2015 11:04 am
by tecnologic
Hi Giovanni,

i saw that u switched to the HAL Header files. Thanks for the info than i will pull from the master, currently i'm on the stable 3.0.4.

next i wil try to add the registy and hal.h

Regards

Tec

Re: Support STM32F446 where to start

Posted: Wed Dec 23, 2015 3:29 pm
by Giovanni
3.0 will not get the new headers, those brings a lot of incompatibilities. HAL 4.0 is not far away form release anyway.

Giovanni

Re: Support STM32F446 where to start

Posted: Fri Dec 25, 2015 9:08 pm
by tecnologic
Hi Giovanni,

i switched to the master branch in git repo. So i assume i'am on the HAL Version 4.0 already?

I attached the hal_lld.h and the stm32_registry.h with my "port". It is just checked against the RefMan of the f446 and it compiles. When my boards from china arrive next week i will give it a try.

Regards

Tec

Re: Support STM32F446 where to start

Posted: Fri Dec 25, 2015 9:16 pm
by Giovanni
Hi,

Thanks, I will merge it tomorrow. HAL will be numbered 4.0 in next release, many drivers received significant improvements.

Giovanni

Re: Support STM32F446 where to start

Posted: Fri Jan 01, 2016 10:45 am
by Giovanni
Files merged, thanks.

I had to make some adjustments:
1) TAB characters.
2) STM32F446 had both a dedicated section and extra #ifs in other sections in the registry, leftovers probably.

Giovanni

Re: Support STM32F446 where to start

Posted: Fri Jan 01, 2016 1:14 pm
by tecnologic
Hi Giovanni,

thanks, i was not sure, if i should use a dedicated section or integrate the f446 in some other section.

my boards are here and assambled, so i will give this a try in the next days.

regards

Tec

Re: Support STM32F446 where to start

Posted: Wed Jan 06, 2016 3:10 pm
by Faelenor
Hi! Thanks for this port. I'm wondering if you're planning to add support for the RCC->DCKCFGR2 register options. In order to get the maximum clock frequencies and use USB at the same time, I need to set the 48MHz USB clock source to PLLSAIP instead of PLLQ. Unless I missed another clock configuration, I think it's the only way to do so.

Thanks!

Re: Support STM32F446 where to start

Posted: Wed Jan 06, 2016 3:27 pm
by Giovanni
Hi,

I am taking a note about this, I was not aware of the problem.

Giovanni