It is a possibility that this is triggered due to having a dirty throttle actuator. When the component of the actuator gets dirty it is unable to send correct data to the ECM and that can lead to erratic idle.
Try servicing the throttle actuator by cleaning it out.
Repair Safety Notice: This information is for general instructional purposes only. Vehicle repair can be dangerous. Verify all information, follow manufacturer service procedures, use proper tools and safety equipment, and consult a qualified repair shop when needed.