Difference in ADC noise between BCTU Control Mode and Trigger Mode Hello, I am working on an application using the [S32k322] where I use the eMIOS timer to trigger the BCTU every 100 µs to read analog data. I am observing a strange behavior between the two BCTU modes: Control Mode: When the ADC CTU mode is set to Control Mode, the ADC conversions are completely stable. The data read via FreeMASTER is clean and free of noise or glitches. Trigger Mode: When I switch the ADC CTU mode to Trigger Mode (keeping the 100 µs eMIOS trigger identical), the sampled analog data becomes noisy and exhibits noticeable glitches in FreeMASTER. Are there specific architectural configurations, timing constraints, or register settings (such as trigger delays, FIFO configurations, or clock synchronization) required for Trigger Mode to prevent this noise? Thank you for your help. Output with ADC ctu mode : Trigger Mode output with ADC ctu mode : Control Mode Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi@Stark_
could you please share the test project and i will test it on myside. Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi @Senlent , Thanks for the response. My ADC clock is 160MHz, and I've attached my ADC configuration and register values below. Clock ADC Configuration Output with ADC ctu mode : Trigger Mode output with ADC ctu mode : Control Mode Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi@Stark_
Based on the configuration screenshot you provided, there are some configuration issues, specifically the division ratios for the module clock and calibration clock.
The ADC clock configuration must strictly follow the table below.
please change it and test again, Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi @Senlent I have attached test code. is it possible to work on BCTU and normal conversion for the some selected channels (ADC_Instance0 and ADC_Instance1)? Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi @Senlent " yes, it is possible to work on BCTU and normal conversion." is there any example code for reference? " Also, your program still doesn't modify the ADC module clock and calibration clock divider. Below are my test results; I connected the port externally to GND. You can see there isn't a significant difference. " could you please share the modified test project and i will test it on myside. Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi@Stark_
I don't have a demo like that; the attached file is a modified project. Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi@Stark_
yes, it is possible to work on BCTU and normal conversion.
I tested the program you provided and made some modifications. Your external clock is 25MHz, while mine is 16MHz.
Also, your program still doesn't modify the ADC module clock and calibration clock divider.
Below are my test results;
I connected the port externally to VDD(my typing error). You can see there isn't a significant difference.
Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi @Senlent Thank you for attaching the modified project. I have tested it, but it is currently not working for normal ADC conversions in my setup. However, my actual application requires a system clock of 25 MHz. The only change I made to your project was updating this clock frequency from 16 MHz to 25 MHz. After changing the clock to 25 MHz, and setting the Adc CTU mode in control Mode the Normal conversions is not working , while the BCTU conversions continue to function. when the Adc CTU mode is in Trigger mode, Normal conversions and the BCTU conversions continue to function. Is the project you attached designed to support both BCTU Trigger Mode and Normal conversions simultaneously at 25 MHz? If so, what additional clock dividers, prescalers, or sampling time configurations do I need to adjust to make it work at this higher frequency? Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi@Stark_
I've already show you of my test results, and you should have noticed that the fluctuations in my sampling results are perfectly normal.
My suggestion is that you could try increasing the sampling time, as I previously suggested.
Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi @Senlent I configured the ADC to use Trigger mode since conversions need to be driven by both the BCTU and Normal modes. However, when using Trigger mode, I noticed noise on the ADC data measured via the BCTU as mention previously. Re: Difference in ADC noise between BCTU Control Mode and Trigger Mode Hi@Stark_
if your ADC conversions are driven through BCTU , use BCTU Control mode .
If you want the ADC to accept normal/injected conversions or other trigger paths, use Trigger mode .
BCTU Control mode locks ADC start control to BCTU only; Trigger mode leaves the ADC open to normal/injected and other supported conversion triggers.
So your test results are in line with expectations.
記事全体を表示