Re: Re STM32F7xx Fixes

Uwe Bonnes <bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org> Tue, 19 Apr 2016 11:43:34 +0200
Newsgroups gmane.comp.hardware.microcontrollers.ethernut
Message-ID <[email protected]>
>>>>> "Holger" == Holger Mai <[email protected]> writes:

    Holger> OK i see that. In fact i let me irritate, that another tool from
    Holger> standard periphal drivers, RCC_GetClocksFreq(), brings out wrong
    Holger> values since clock management is reworked. This tool uses the
    Holger> real divider settings in the RCC configuration rergisters, and
    Holger> has an invalid prescaler table for this case. So this tool has
    Holger> to be updated instead stm32_clk.c.

What is wrong with NutClockGet()?
With mixing two libraries, you get the errors of both libraries.

    Holger>  But, on the other side, it
    Holger> looks for me, that the background of the HPRE organisation is,
    Holger> to switch between full and reduced AHB clock without loose the
    Holger> divider of reduced clock.  I dont can say, if other familys are
    Holger> affected by this effect. Therefore i think it can be better, to
    Holger> continue the HPRE setting in the "old" way: set HPRE to 0000 if
    Holger> no divider is used. That will be good for down compatibility
    Holger> with existing applications.

We could start searching the list with index 0 and so waste some cycles. But
is that really worth the effort? Some bootloader or part of the user program
may have set xPRE to a none-zero value for no division. So the library
must cope with any allowed value.

    Holger> The construct to define DSABLE/ENABLE only if not defined doesnt
    Holger> work. The preprocessor doesnt know DISABLE/ENABLE, because they
    Holger> are content of an enum (and so only visible for the
    Holger> compiler). So he defines they, and than the compiler finds this
    Holger> as error (because he has DISBALE as content of an enum):
    Holger> ...stm/stm32xxxx.h:487:18: error: expected identifier before
    Holger> numeric constant # define DISABLE 0 ^

I consider prepending NUT to the ENABLE/DISABLE keywords in the habit of
having NUT specific keyword. What other keywords collide with the ST
libraries?  That way all these keywords can be fixed in one changeset.

    Holger> An other way may be, to detect if the type of the enum,
    Holger> FunctionalState, is always defined. But that is not possible
    Holger> with C tools. If anyone knows a backdoor or a trick to do this
    Holger> nevertheless?

    Holger> How tom send patches? I have no repository access, and i dont
    Holger> want that.

Please consider. You can look at the history that way.

    Holger> And atttachments to discussion mails are forbidden.

Really? If it does not work, send in private mail.

Bye

-- 
Uwe Bonnes                bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion