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

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Dec 21 15:19:25 UTC 2023


Hello Pavel,

On 21.12.23 16:13, Pavel Pisa wrote:
> 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.

thanks for the hint. I will have at look how the pin initialization is 
done and maybe add a comment to this function.

Best wishes and Merry Christmas,
	
	Sebastian

-- 
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list