This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VEN-Q1: Using timer on mcu20

Part Number: TDA4VEN-Q1
Other Parts Discussed in Thread: TDA4VM

Tool/software:

Dear TI's expert,

SDK Ver:SDK10.0

We are currently trying to implement the GPIO analog PWM function. We need to use a timer on the MCU20 to periodically flip the GPIO port. How can I use the timer?

Btw,I also asked the same question on TDA4VM. Is the method of using timers and interrupts the same for TDA4Ven and TDA4VM?

Regards.

  • Hi xie jc,

    Yes, its pretty much the same. but we need to understand the details like which timer, which gpio you are planning to use? 

    Regards,

    Brijesh

  • Hi Brijesh,

    I'm using main timer7 and gpio0_56(AB25).

    Can you help me check if my interrupt function is working? Because I found that the interrupt handling function was not executed.

    #define TIMER7_IRQ_NUM  159
    static int32_t DMTimer_IntrInit()
    {
        int32_t status = SystemP_SUCCESS;
        HwiP_Object hwiObj;
        HwiP_Params hwiPrms;
    
        /* Initialize with defaults */
        HwiP_Params_init(&hwiPrms);
    
        /* Populate the interrupt parameters */
        hwiPrms.args = (void *)OS_MAIN_TIMER7_CFG_BASE;
        hwiPrms.callback = &OsSysTimer_ISR;
        hwiPrms.eventId = 0; /* Event going in to CPU */
        hwiPrms.intNum = TIMER7_IRQ_NUM; /* Host Interrupt vector */
    
        /* Register interrupts */
        status = HwiP_construct(&hwiObj,&hwiPrms);
        DebugP_assert(status==SystemP_SUCCESS);
        return (0);
    }

    Regards.

  • hi xie jc,

    i am sorry, but what exactly do you require? Do you want to generate pwm signal on this pin based on timer?

    Regards,

    Brijesh