I am using S32 Design Studio 3.4 along with example projects from S32K3 RTD AUTOSAR 4.4.2.0.0 D2203. Specifically, I am working with the Adc_sar_Bctu_ip_example_s32k312 project.
I have configured the ADC channels, but I am encountering an issue where the ADC value ranges from 0 to 227 (min to max). I need the ADC value to range from 0 to 4096, which corresponds to the full 12-bit resolution.
I have attempted to change the configuration settings, but the problem persists. I will attach the configuration I have done in S32 Design Studio.
Could you please assist me in resolving this issue? I look forward to your prompt response.
I have attached the platform_io.c ,kindly check the line from 1026 to 1078.(ADC PART).
解決済! 解決策の投稿を見る。
 
					
				
		
 PetrS
		
			PetrS
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
you have some divider on inputs, so you do not get full scale assuming Vref is at 5V too.
However as I wrote, an issue could be you did not perform ADC calibration before conversion. Check behavior when you do it.
If have issue still, share simplified project so we can test on EVB, or refer to RTD demo example.
BR, Petr
 
					
				
		
 PetrS
		
			PetrS
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
the setting looks normal. For a code you would perform ADC calibration (Adc_Sar_Ip_DoCalibration) after ADC init and before conversion is initialized.
What do you have connected to precise channels, which are selected to be converted using normal chain? How are MCU pins configured?
Is a BCTU conversion also triggered? And what is a result from that?
BR, Petr
Hi,
I'm seeking a straightforward method to obtain a 12-bit ADC reading from the ADC pin, with the  BCTU conversion has been triggered in my code. I've provided a code reference and an image detailing the MCU pin configuration for your convenience.
 
					
				
		
 PetrS
		
			PetrS
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
please specify measured voltage on ADC_INx pins and obtained values in ADC_Result buffer.
BR, Petr
Hi Petrs,
The measured voltage at ADC_IN5, ADC_IN6, and ADC_IN7 is 5 volts, and the values in the ADC_Result buffer range from a minimum of 27 to a maximum of 168.
 
					
				
		
 PetrS
		
			PetrS
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
you have some divider on inputs, so you do not get full scale assuming Vref is at 5V too.
However as I wrote, an issue could be you did not perform ADC calibration before conversion. Check behavior when you do it.
If have issue still, share simplified project so we can test on EVB, or refer to RTD demo example.
BR, Petr
