This article introduces how to use Renesas R-T series chips to design motor engineering, applying the S&H function to achieve real-time and efficient AD sampling. Compared to traditional sequential phase AD sampling, this method can enhance control effectiveness, thereby improving overall system performance. Using the RA6T2 as an example, the results can be generalized to other chips in the Renesas T series (including RA/T, RX/T, and RZ/T series) and related fields.
In motor control applications, it is necessary to collect the three-phase current during each PWM control cycle to estimate the rotor magnetic field direction and determine the real-time control of the stator magnetic field direction, thus achieving control of the rotor’s rotation. As shown in the figure below, a simple schematic diagram of the relationship between the three-phase current and the current magnetic field direction at a certain moment:

From the above figure, we can see the relationship between the three-phase current of the motor (indicated by the red, blue, and green arrows) and the magnetic field direction (indicated in black) at a certain moment. Therefore, it is necessary to collect the values of the three-phase current simultaneously to accurately estimate the magnetic field direction, which is the basis for the effectiveness of this control strategy.
Generally speaking, due to limitations in the internal structure and cost of the MCU, although the MCU ADC module can provide many input interface resources, the actual number of internal conversion circuits is limited. Therefore, in practical applications, the AD signal sampling of many MCU chips is performed sequentially rather than simultaneously, as shown in the figure below:
Both AN002 and AN004 need to execute the sampling operation only after the previous ADC CHANNEL has completed conversion; since ADC conversion itself takes time, the resulting three-phase current values are not uniform at the same moment;

At this point, phase estimation may have errors, leading to a decline in system control performance, which may affect the stability of system operation or narrow the boundary conditions that the system can respond to.
The ADC module of Renesas R-T series chips provides the S&H (sample-and-hold) function, which allows the three-phase current ADC channels to sample and latch the signal at the same moment. Its working mode is shown in the figure below:

It can be seen that channels 0, 1, and 2 sample and hold the signal at the same moment, and then sequentially enter the conversion circuit. This way, the subsequent conversion results align more closely with the theoretical basis required by the motor algorithm.
Using the official sample project from Renesas, we will introduce how to set up and call the S&H function using FSP. The sample project is a senseless control sample scheme for the RA6T2, which can be downloaded from the Renesas official website. If needed, please click the link.(You can copy the link below into your browser or scan the QR code to view)
Sensorless Vector Control for Permanent Magnet Synchronous Motor (For MCK/MCB, RA Family) | Renesas
https://www.renesas.cn/zh/document/scd/sensorless-vector-control-permanent-magnet-synchronous-motor-mckmcb-ra-family?r=1542426

The current project environment and tools, the links are as follows:
1
IDE
Version:
e2 studio 2025-01
Version/Download Link:
e² studio | Renesas
https://www.renesas.cn/zh/software-tool/e-studio?queryID=94caf43d21152ecbd71b3e9ea8559986

2
Toolchain
Version:
13.2.1.arm-13-7
Version/Download Link:
Can be installed with e2 studio
3
FSP
Version:
5.6.0
Version/Download Link:
RA Expandable Configuration Software Package (FSP) | Renesas
https://www.renesas.cn/zh/software-tool/flexible-software-package-fsp?queryID=7812d9cdea81075e74b1e677e6c46e40

Open the project FSP settings interface, and you can see that in this project, the selected U, V, W three-phase current collection channels are AN004, AN002, AN000.

According to the data sheet, the purpose of this selection is to utilize the S&H function of the ADC module. As shown in the table below:

From the information in the table, it can be seen that because differential functionality is reserved, every two specific physical channels (as shown in the figure ANx and ANy) are connected to a set of S&H (SHIN) circuits. As shown in the figure below:

The design of the sample project selected three circuits with S&H functionality from ADC module unit 0, corresponding to input channels AN000, AN002, AN004.
In the FSP ADC module, it is necessary to enable the S&H function. In this scheme, the project actually only collected two-phase current, and the third-phase current was calculated by code. Therefore, only two-phase enabling is set in FSP, as shown below:

The Time here is the number of time units based on the AD clock. If there are no special requirements, the default settings can be used. If adjustments are needed, they should meet the electrical standards listed in “Table 46.34” of the RA6T2 hardware manual, which specifies the action time and counting standards required for AD functionality. Specific parameters should be debugged according to on-site usage, generally considering sampling speed and sampling accuracy to find the best balance strategy.
This article introduced that when designing motor engineering using R-T series chips, it is recommended to use the S&H function, which can improve the real-time effect of sampling moments, and demonstrated the key FSP setup steps. This can maximize the advantages of our chips and provide better solutions for customers.

Need Technical Support?
If you have any questions while using Renesas MCU/MPU products, you can scan the QR code below or copy the URL into your browser to enter the Renesas Technical Forum to find answers or get online technical support.

https://community-ja.renesas.com/zh/forums-groups/mcu-mpu/
1
END
1
Recommended Reading

South China Munich | Renesas introduces core technologies and products for industrial automation

Product Details | Renesas RZ/T2M MPU

Introduction to Renesas RZ/T2M products and TSN functionality support

