[PATCH 24/47] bsp/tms570: Remove double pin configuration

Pavel Pisa pisa at fel.cvut.cz
Thu Dec 21 15:13:41 UTC 2023


Hello Sebastian,

On Thursday 21 of December 2023 15:37:57 Sebastian Huber wrote:
> From: Tyler Miller <tyler.miller at airbusus.com>
>
> ---
>  bsps/arm/tms570/start/pinmux.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/bsps/arm/tms570/start/pinmux.c
> b/bsps/arm/tms570/start/pinmux.c index d9c52cd00d..9277a36431 100644
> --- a/bsps/arm/tms570/start/pinmux.c
> +++ b/bsps/arm/tms570/start/pinmux.c
> @@ -182,16 +182,6 @@ tms570_bsp_pinmmr_config(const uint32_t
> *pinmmr_values, int reg_start, int reg_c pval = pinmmr_values;
>    cnt = reg_count;
>
> -  do {
> -    *pinmmrx = *pinmmrx & *pval;
> -    pinmmrx++;
> -    pval++;
> -  } while( --cnt );
> -
> -  pinmmrx = (&TMS570_IOMM.PINMUX.PINMMR0) + reg_start;
> -  pval = pinmmr_values;
> -  cnt = reg_count;
> -
>    do {
>      *pinmmrx = *pval;
>      pinmmrx++;

there has been reason for this sequence.

If you use bootloader or if you want to start
RTEMS in SDRAM loaded by another RTEMS or system
in Flash then direct switching from one config
to another can lead to pin configuration collision.

So the logic has been meant such way, that
all configurations which should not be valid
after pin reconfiguration are disabled the first,
(i.e.) pins and internal signals are tristated
and in the second round the final values
are set.

It can have reason even if some peripheral is activated
at runtime according to application config.

May be, that double run is really abundant but I would
suggest to do the analysis again. I need to find some
time to refresh TMS570 knowledge because it is eight
years already when we build base TMS570L3137 support
with Premek...

But I am sure that this was the idea behind update
in two phases.

Best wishes,

                Pavel Pisa
    phone:      +420 603531357
    e-mail:     pisa at cmp.felk.cvut.cz
    Department of Control Engineering FEE CVUT
    Karlovo namesti 13, 121 35, Prague 2
    university: http://control.fel.cvut.cz/
    personal:   http://cmp.felk.cvut.cz/~pisa
    social:     https://social.kernel.org/ppisa
    projects:   https://www.openhub.net/accounts/ppisa
    CAN related:http://canbus.pages.fel.cvut.cz/
    RISC-V education: https://comparch.edu.cvut.cz/
    Open Technologies Research Education and Exchange Services
    https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home


More information about the devel mailing list