cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration differences STM32F401 to STM32F4?

flyer31
Senior
Posted on May 26, 2014 at 10:50

Hi,

I just try to get an STM32F401 running, but it somehow does not seem to work with the standard STM32F4 system-startup files (e. g. from STM32F4 discovery).

Is there some comparison PDF about necessary changes when going from e.g. STM32F405 to STM32F401? (especially concerning software modifications - I assume mainly concerning the RCC registers)?

Or anyone has any hints? Or should it run without changes?

PS: I just downloaded the STM32F401 Discovery software firmware pack. From the folder organisation, this seems to be more or less a copy of the STM32F4 Discovery stuff. It would be really very helpful to get some information, in which files there might be some possible differences.
9 REPLIES 9
os_kopernika
Associate II
Posted on May 26, 2014 at 12:36

''Does not seem to work'' sounds noobish.

uC fried? Power not applied? Did you solder it correctly? All pins? Is SP initialized? Reset routine pointer at 0x4? And the ....? etc.

ARMv7M has extensive debugging support just to avoid ''does not seem to work'' stories.

Tell us what went wrong, which line misbehaves.

The possible differences at startup codes look like related to memory layout/memories sizes. I think both are M4F, no difference in instruction set.

Posted on May 26, 2014 at 12:43

> The possible differences at startup codes look like related to memory layout/memories sizes.

... that (consequently stack placement), and clock setup - max.'401 clock is half of the '4x5/'4x7.

JW

os_kopernika
Associate II
Posted on May 26, 2014 at 15:10

''and clock setup - max.'401 clock is half of the '4x5/'4x7.''

That is in system init code, not in startup code OP reports. If we go that far then there are significant differences in overall resources available on those two micros. Perhaps even IO layout varies? I do not think STM guarantees that what is good for STM32F407 is tolerable for STM32F401 and vice versa.

Posted on May 26, 2014 at 15:34

> If we go that far then there are significant differences in overall resources available on those two micros.

>Perhaps even IO layout varies?

No. The '401 is simply a stripped-down '405 - no ETH and OTG_HS, cut-back memories, reduced max clock. The rest is the same. Have a look into st32f4xx.h.

[EDIT] There is a ''compatibility'' chapter in the datasheet, which says something similar.

JW

Posted on May 26, 2014 at 16:02

Slower, 84 MHz, with 21 and 42 MHz APB

One ADC

Less memory, no CCM

Consider using WinMerge, et al to look a source differences

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
flyer31
Senior
Posted on May 27, 2014 at 09:02

My problem is, that the program can be loaded / verified to my PCB without problems, but somehow the debugger does not start correctly (I use Keil 4.74 + ST-Link debugging through a STM32F4 discovery).

I ordered the 401 discovery board yesterday and will get it today hopefully - I hope then it will be easier to find the problem.

But after looking into the 401 discovery firmware, I also think that the 401 is just a stripped down 405/407 - but all the register addresses should be the same, also same STM32F4xx.H, so I currently do not understand the problem ... (but I must admit - it COULD be on the side of my PCB of course).

PS: If it is only stripped down version of STM32F405, I just do not understand why there is a separate Reference Manual for STM32F401 (whereas STM32F405/407/429/439 are all in one combined reference manual). It would be really very helpful to get a document, where the possible differences between these 2 reference manuals are listed.

Posted on May 27, 2014 at 15:57

Aren't there some power supply / pin differences also, just to make things fun?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 27, 2014 at 19:09

Yes, a minor but potentially important one. It again can be found under the ''compatibility'' chapter in the fine datasheet.

And PB11 is missing (replaced by said power pin).

JW

Posted on May 27, 2014 at 19:18

Well, that and the original VCAP1/2 pins disappearing and becoming supplies on the 64-pin, and PB11 being the new VCAP1. So basically not a drop in replacement for a F2 or F405/7 device, and required a do-over of the STM32F401C-DISCO board

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..