Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Motor Control ICs Forum Discussions

MikeG
Level 1
First reply posted First question asked Welcome!
Level 1

We are just starting to develop a controller based on the IMD111T controller. Our product can be interfaced to many different types of control systems. Therefore we need to use either the analog voltage speed control input or the PWM (Duty) speed control input. 

It looks like I can have a switch connected to a GPIO pin and use the scripting language to select the speed control input type. Generally the switch would be pre-set during our product assembly as required by our customer. This way we only need to program one configuration in all of our controllers. 

For example, if GPIO2 = 1 then I want analog speed control and if GPIO2 = 0 then I want PWM control. The example below assumes that in MCEWizard, the input control method set was analog voltage control to begin with. Therefore I only need to set or clear bit 1 of the APPControl register to change between analog speed control input or PWM speed control input. 

/*Task0 script function*/
Script_Task0()
{
    if(GPIO2_IN)
    {
     CLEAR_BIT(APPControl,1);
    }
    else
    {
    SET_BIT(APPControl,1);
    }
}

I just want to confirm it's this simple.

Thanks,

Mike

 

0 Likes
1 Solution
Krupashankar
Moderator
Moderator 250 replies posted 100 solutions authored 5 likes given
Moderator

Hi @MikeG,

Thanks for posting in the Infineon community.

Yes, You can read the GPIO, and based on it you can set APPConfig Register to select the control input between PWM duty and Analog input.

Krupashankar_0-1647405205523.png

You could also refer to section 3.2.1.5 APPConfig in iMOTION – MCE – Software Reference Manual v1.3 

 

 

Thanks,

Krupashankar

View solution in original post

0 Likes
1 Reply
Krupashankar
Moderator
Moderator 250 replies posted 100 solutions authored 5 likes given
Moderator

Hi @MikeG,

Thanks for posting in the Infineon community.

Yes, You can read the GPIO, and based on it you can set APPConfig Register to select the control input between PWM duty and Analog input.

Krupashankar_0-1647405205523.png

You could also refer to section 3.2.1.5 APPConfig in iMOTION – MCE – Software Reference Manual v1.3 

 

 

Thanks,

Krupashankar

0 Likes