function Target = mcb_SetProcessorDetails(Board_type,PWM_frequency)
% File          :   Target HW Parameter File
% Description   :   Parameters for Targets supported by MCB

% Authors       :   A. Selvaraj, H. Gulhane, D. Pandit, S. Narayan

% Copyright 2020-2021 The MathWorks, Inc.

%%
% Get basic parameters
    switch Board_type 
        case {'F28379D','F28377S'}
            Target.model                = 'LAUNCHXL-F28379D';	% 		// Manufacturer Model Number
            Target.sn                   = '123456';          	% 		// Manufacturer Serial Number
            Target.CPU_frequency        = 200e6;    			%Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;   		%Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); % //PWM timer counts for up-down counter
            Target.ADC_Vref             = 3;					%V		// ADC voltage reference for LAUNCHXL-F28379D
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 12e6;                 %Hz     // Set baud rate for serial communication
            
        case {'F28069M','F28069'}
            Target.model                = 'LAUNCHXL-F28069M';	% 		// Manufacturer Model Number
            Target.sn                   = '123456';          	% 		// Manufacturer Serial Number
            Target.CPU_frequency        = 90e6;    				%Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;   		%Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); % //PWM timer counts for up-down counter
            Target.ADC_Vref             = 3.3;					%V		// ADC voltage reference
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 5.625e6;              %Hz     // Set baud rate for serial communication
         case {'F28035'}
            Target.model                = 'F28035';             %       // Manufacturer Model Number
            Target.sn                   = '123456';             %       // Manufacturer Serial Number
            Target.CPU_frequency        = 60e6;                 %Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;        %Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); %(PWM timer counts)
            Target.ADC_Vref             = 3.3;					%V		// ADC voltage reference
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 1.5e6;                %Hz     // Set baud rate for serial communication
        case {'F28027'}
            Target.model                = 'LAUNCHXL-F2802X';    %       // Manufacturer Model Number
            Target.sn                   = '123456';             %       // Manufacturer Serial Number
            Target.CPU_frequency        = 60e6;                 %Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;        %Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); %(PWM timer counts)
            Target.ADC_Vref             = 3.3;					%V		// ADC voltage reference
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 3.75e6;               %Hz     // Set baud rate for serial communication
        case {'F28M35X','F28M36X'}
            Target.model                = 'F28M35X/36X';        %       // Manufacturer Model Number
            Target.sn                   = '123456';             %       // Manufacturer Serial Number
            Target.CPU_frequency        = 150e6;                %Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;        %Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); %(PWM timer counts)
            Target.ADC_Vref             = 3.3;					%V		// ADC voltage reference
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 3.75e6;               %Hz     // Set baud rate for serial communication
        case {'F28335'}
            Target.model                = 'F28335';             %       // Manufacturer Model Number
            Target.sn                   = '123456';             %       // Manufacturer Serial Number
            Target.CPU_frequency        = 150e6;                %Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;        %Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); %(PWM timer counts)
            Target.ADC_Vref             = 3.3;					%V		// ADC voltage reference
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 3e6;                  %Hz     // Set baud rate for serial communication
         case {'F280049C'}
            Target.model                = 'LAUNCHXL-F280049C';  %       // Manufacturer Model Number
            Target.sn                   = '123456';             %       // Manufacturer Serial Number
            Target.CPU_frequency        = 100e6;                %Hz     // Clock frequency
            Target.PWM_frequency        = PWM_frequency;        %Hz     // PWM frequency
            Target.PWM_Counter_Period   = round(Target.CPU_frequency/Target.PWM_frequency/2); %(PWM timer counts)
            Target.ADC_Vref             = 3.3;					%V		// ADC voltage reference
            Target.ADC_MaxCount         = 4095;					%		// Max count for 12 bit ADC
			Target.SCI_baud_rate        = 6.25e6;               %Hz     // Set baud rate for serial communication
	    otherwise
            disp('Error: Invalid Target!');
    end
    
end