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.

TDA4VM: How to use MCU domain TIMER in main domain

Part Number: TDA4VM

Tool/software:

I want to use MCU domain timer in main domain. Is it possible to use it in the following way?

  1. Set pinmux E22 as timer (MCU_TIMER_IO0)
  2. Use the following code in main domain:

    // Register definitions
    #define CTRLMMR_MCU_TIMER0_CTRL 0x40F04280
    #define MCU_TIMER0_CFG_BASE_ADDRESS (0x40400000U)
    #define MCU_TIMER0_TCLR_ADDRESS (MCU_TIMER0_CFG_BASE_ADDRESS+0x38)
    #define MCU_TIMER0_TCRR_ADDRESS (MCU_TIMER0_CFG_BASE_ADDRESS+0x3C)
    #define MCU_TIMER0_TLDR_ADDRESS (MCU_TIMER0_CFG_BASE_ADDRESS+0x40)
    #define MCU_TIMER0_TMAR_ADDRESS (MCU_TIMER0_CFG_BASE_ADDRESS+0x4C)

    // Configure MCU_TIMER0 to be driven by TMCU_TIMER0 output
    HW_WR_REG32(CTRLMMR_MCU_TIMER0_CTRL, 0x00000001);

    // Configure timer for 30Hz operation
    HW_WR_REG32(MCU_TIMER0_TLDR_ADDRESS, 0xfff63C00); // Load value
    HW_WR_REG32(MCU_TIMER0_TMAR_ADDRESS, 0xfffb0000); // Match value
    HW_WR_REG32(MCU_TIMER0_TCRR_ADDRESS, 0xfff63C00); // Counter value
    HW_WR_REG32(MCU_TIMER0_TCLR_ADDRESS, 0x00001843); // Timer control

BR,

liupt