Code covered by the BSD License  

Highlights from
MPC555 Motor Control Function Blockset

MPC555 Motor Control Function Blockset

by

 

20 Mar 2006 (Updated )

Additional I/O blocks for MPC555 target - specifically targetting TPU functionality

mpc555_phytec_pins(search)
function pin = mpc555_phytec_pins(search)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PIN = mpc555_phytec_pins(search)
% 
% This returns the pin number and the connector array on which the
% searched for signal appears, for the Phytec MPC555 prototype board
%
% Example:
%       PIN = mpc555_phytec_pins('B_TPU0')

X2 = { ...
    'EXTCLK'        'CLKOUT'     'GND'    
    '/IRQ1'         '/IRQ3'      '/IRQ2'  
    '/IRQ0'         'GND'        '/CS2'   
    '/CS3'          '/CS1'       '/CS0'   
    'GND'           '/OE'        '/WE3'   
    'A31'           'A30'        'GND'    
    'A29'           'A28'        'A27'    
    'A26'           'GND'        'A25'    
    'A24'           'A23'        'A22'    
    'GND'           'A21'        'A20'    
    'A19'           'A18'        'GND'    
    'A17'           'A16'        'D31'    
    'D30'           'GND'        'D29'    
    'D28'           'D27'        'D26'    
    'GND'           'D25'        'D24'    
    'A15'           'A14'        'GND'    
    'A13'           'A12'        'A11'    
    'A10'           'GND'        'A9'     
    'A8'            'D23'        'D22'    
    'GND'           'D21'        'D20'    
    'D19'           'D18'        'GND'    
    'D17'           'D16'        '/WE2'   
    '/TA'           'GND'        '/TEA'   
    '/BG'           '/BB'        '/BR'    
    'GND'           'D15'        'D14'    
    'D13'           'D12'        'GND'    
    'D11'           'D10'        'D9'     
    'D8'            'GND'        'D7'     
    'D6'            'D5'         'D4'     
    'GND'           'D3'         'D20'    
    'D1'            'D0'         'GND'    
    '47B'           '48A'        '48B'    
    '49A'           'GND'        '50A'    
    '50B'           'TSIZ0'      'TSIZ1'  
    'GND'           '/WE1'       '/TS'    
    '/WE0'          'RDNWR'      'GND'    
    '/BDIP'         '/IRQ4'      '/BURST' 
    'MODCK1'        'GND'        'MODCK2' 
    '/BI / /STS'    'MODCK3'     '59A'    
    'GND'           'B_TPU15'    'B_TPU14'
    'B_TPU13'       'B_TPU12'    'GND'    
    'B_TPU10'       'B_TPU11'    'B_TPU8' 
    'B_TPU9'        'GND'        'B_TPU7' 
    'B_TPU6'        'B_TPU5'     'B_TPU4' 
    'GND'           'B_TPU2'     'B_TPU3' 
    'B_TPU0'        'B_TPU1'     'GND'    
    'B_T2CLK'       'A_T2CLK'    'A_TPU15'
    'A_TPU14'       'GND'        'A_TPU12'
    'A_TPU13'       'A_TPU10'    'A_TPU11'
    'GND'           'A_TPU9'     'A_TPU8' 
    'A_TPU7'        'A_TPU6'     'GND'    
    'A_TPU4'        'A_TPU5'     'A_TPU2' 
    'A_TPU3'        'GND'        'A_TPU1' 
    'A_TPU0'        'NC'         'NC' };

X3 = { ...
    '+3V3','+3V3','+3V3'
    'GND','GND','+3V3'
    '+5V','4D','+5V'
    'VPD','VBAT','5D'
    '+3V3GOOD','/PFI','GND'
    'GND','TEXP/RSTCNF','/SRESET'
    '/PORESET','/HRESIN','/HRESET'
    'MPIO12','GND','MPIO14'
    'MPIO13','MPIO10','MPIO15'
    'MPIO8','MPIO11','GND'
    'GND','RXD1_TTL','MPIO9'
    'B_CANL','B_CANH','TXD1_TTL'
    'ECK','GND','MPIO7'
    'A_CANH','RXD2','A_CANL'
    'TXD2','RXD1','GND'
    'GND','MPIO6','TXD1'
    'QGPIO3','QGPIO6','QGPIO5'
    'QGPIO2','GND','QGPIO4'
    'MPIO5','QGPIO0','QGPIO1'
    'SGPIOC7','MPIO4','GND'
    'GND','SGPIOc6','SCL'
    '/IRTC','DSDI','SDA'
    'DSCK','GND','/TRST'
    'VFLS0','TMS','DSDO'
    'MPIO3','VFLS1','GND'
    'GND','MPIO1','MPIO12'
    'MDA7','MPIO0','MDA9'
    'MDA6','GND','MDA8'
    'MDA3','MDA4','MDA5'
    'MDA2','MDA1','GND'
    'GND','MDA0','MPWM7'
    'MPWM4','MPWM5','MPWM6'
    'MPWM1','GND','MPWM3'
    'VDDGOOD','MPWM0','MPWM2'
    'RXD2_TTL','/VDDGOOD','GND'
    'GND','TXD2_TTL','EPEE'
    '/WAKEUP','B_CNTX0','/PWRON'
    'A_CNTX0','GND','B_CNRX0'
    'ETRIG1','A_CNRX0','ETRIG2'
    'B_AD15','B_AD14','GNDA'
    'GNDA','B_AD13','B_AD12'
    'B_AD9','B_AD10','B_AD11'
    'B_AD6','GNDA','B_AD8'
    'B_AD5','B_AD4','B_AD7'
    'B_AD2','B_AD3','GNDA'
    'GNDA','B_AD0','B_AD11'
    'A_AD12','A_AD15','A_AD14'
    'A_AD11','GNDA','A_AD13'
    'A_AD8','A_AD9','A_AD10'
    'A_AD7','A_AD6','GNDA'
    'GNDA','A_AD5','A_AD4'
    'A_AD1','A_AD2','A_AD3'
    'VDDA','GNDA','A_AD0'
    'NC','NC','VRH'};

positionsX2 = strmatch(search, X2);
positionsX3 = strmatch(search, X3);

pin = i_present_pins(positionsX2, 'X2', X2);
pin = [pin ; i_present_pins(positionsX3, 'X3', X3)];

end

function pin = i_present_pins(positions, name, X)
pin = {};
for a=1:length(positions)
   column(a) = ceil(positions(a)/54);
   row(a) = mod((positions(a) - 1), 54) + 1;
   pin{a,1} = ['(',name, '):  ',num2str(row(a)), dec2hex(column(a)+9), ' = ', X{row(a),column(a)}];
end
end

Contact us