TDA4VM-Q1: How to using pwm in mcu2-0?

Part Number: TDA4VM-Q1

Tool/software:

Hi TI's experts,

We need to output a 30Hz PWM signal on the MCU 20 as the fsync signal for the surround view camera. Is there an example of using PWM on the mcu2-0?

Regards.

  • Hi jc,

    Unfortunately, no, there isn't any example of pwm running on rtos on mcu2_0.

    Regards,

    Brijesh

  • Hi Brijesh,

    What do you think would be a better way for us to implement this fsync signal? Is there any way to output PWM signals? Or use regular GPIO to simulate PWM?

    Regards.

  • Hi jc,

    What exact is required for the fsync signal? Is it just the transition in one direction (high to low or low to high) at every lets say 33ms, or small pulse at every 33ms? 

    Btw, typically it should be possible to generate fsync signal from deserializer, atleast in TI deserializer. Can you please check if your deserializer supports this feature? If yes, then it should best be done in the deserializer. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Is it just the transition in one direction (high to low or low to high) at every lets say 33ms, or small pulse at every 33ms? 

    The fsync signal what I need is small pulse at every 33ms.

    Is it just the transition in one direction (high to low or low to high) at every lets say 33ms, or small pulse at every 33ms? 

    Yes, as you say.I know the deserializer can generate fsync signal.However, based on the implementation of some schemes, we need to implement a scheme for external fsync signal input.

    Regards.

  • Hi jc,

    The fsync signal what I need is small pulse at every 33ms.

    Depending on the size of this pulse, it may not be possible to generate it using PWM module. This is why i would recommend to generate it in deserializer. 

    Regards,

    Brijesh

  • Hi Brijech,

    But I still have doubts because the DM manual states that this pin can be used as a PWM pin, and my colleagues who developed it on the MCU30 also told me to use SCI to configure the pin to output PWM pulse signals.I am not sure if the following code is feasible on the MCU20?

    PWM_CONFIG_DATA_SECTION CONST(struct Pwm_ConfigType_s, PWM_CONFIG_DATA)
         PwmChannelConfigSet =
    {
        .chCfg =
        {
            [0] =
            {
                .instanceClkHz = 19200000U,
               .dutyCycle =0x4000U,/* Dutycycle */
                .hwPeriod =19200000U,
                /* Number of HW Unit ticks value which sets initial period */
                .polarity = PWM_HIGH,/* Polarity */
               .channelClass = PWM_VARIABLE_PERIOD,
    			            .prescale = 0,/* prescale */
    #if (PWM_NOTIFICATION_SUPPORTED == STD_ON)
                .notificationHandler = (Pwm_NotifyFuncType) Pwm_Notification_Channel1,
                /*Notification Function*/
    			#endif
            }
        },
    };

    Regards.

  • Hi jc,

    Can we please get the size of the pulse that the sensor expecting? Our of 33ms of frame period, how much this signal should remain high? 

    Yes, this pin is PWM output and this register is pinmux register, which configures this pin to be used for PWM output, but we also need to configure PWM module output to get correct output signal. Lets first understand what's exactly requirement and then check for usage of PWM. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Our requirement is simple, which is to control the exposure of the sensor by outputting the fsync signal and recording the exposure time. If we use a PWM module to output the fsync signal, will we be unable to determine the timestamp of each pulse output of the PWM signal? Do we need to use GPIO to simulate PWM?

    Regards.

  • Hi jc,

    Yes, PWM signal will automatically output this signal and it will not be possible to determine the time in this case. 

    Regards,

    Brijesh