On RX651 and other RX family MCU's, there's a recommendation to use a special ADC workaround if certain pins are used as outputs..
This shows up when confuguring the various S12AD drivers in the E2Studio Smart Configurator:
Slightly more details exist on page 2510 in the RX651 User's Manual (Rev 2.40) (emphasis, formatting and colors are mine):
53.6.8 Pin Setting When Using the 12-bit A/D Converter
When using the 12-bit A/D converter unit 0, do not use the P40 to P47, P03, P05, and P07 pins as output pins. We also recommend not using the P00 to P02, P90 to P93, PD0 to PD7, and PE0 to PE7 pins as output pins.If any of the P00 to P02, P90 to P93, PD0 to PD7, and PE0 to PE7 pins is used for an output pin, perform A/D conversion several times, eliminate the maximum and minimum values, and obtain the average of the other results.
When using the 12-bit A/D converter unit 1, we recommend not using the P00 to P02, P90 to P93, PD0 to PD7, and PE0 to PE7 pins as output pins.If any of the P00 to P02, P90 to P93, PD0 to PD7, and PE0 to PE7 pins is used for an output pin, perform A/D conversion several times, eliminate the maximum and minimum values, and obtain the average of the other results.
Looking at the three Code Generator components available, Contineous, Group, and Single, Scan mode, I find no handles to perform the measurements the way suggested by the workaround, i,e, at least four times for each channel, before continuing to the next channel, And before the switch, remove the lowest value and the highest value, before averaging the rest.
The FIT module ADC Driver appear to be the only way forward.
The R01AN1666EJ0530 Rev.5.30 ADC Module Using Firmware Integration Technology, does describe how to use the module, but I find no mention of the recommendation or the workaround.
Finally the questions:
Are there an official implementation of the ADC workaround available?
If for the Code Generators, then how to enable/implement it, to adapt to the selected channels?
If for the ADC Driver FIT component, then how to automatically adapts to the input channels enabled in the r_s12ad_rx component configuration, as shown below: