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: Question about Wakeup F24 pin PWM

Part Number: TDA4VM

Tool/software:

My goal is to configure wakeup pin F24, specifically MCU_TIMER_IO6, to operate as a PWM output.

I've tried the procedure below, but the PWM waveform isn't appearing on pin F24.
I'd like to inquire if there are any further settings required, or if this indicates an error.

1. pin mux 설정
- pdk_j721s2_09_02_00_30/packages/ti/board/src/j721s2_evm/J721S2_pinmux_data.c


static pinmuxPerCfg_t gMcu_dmtimer0PinCfg[] =
{
/* MyMCU_DMTIMER1 -> MCU_TIMER_IO6 -> F24 */
{
PIN_WKUP_GPIO0_8, PIN_MODE(4) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
{PINMUX_END}
};

static pinmuxModuleCfg_t gMcu_dmtimerPinCfg[] =
{
{0, TRUE, gMcu_dmtimer0PinCfg},
{PINMUX_END}
};

pinmuxBoardCfg_t gJ721S2_WkupPinmuxData[] =
{
{0, gMcu_adcPinCfg},
{1, gMcu_cpsw2gPinCfg},
{2, gMcu_i2cPinCfg},
{3, gMcu_i3cPinCfg},
{4, gMcu_mcanPinCfg},
{5, gMcu_mdioPinCfg},
{6, gMcu_ospiPinCfg},
{7, gMcu_uartPinCfg},
{8, gWkup_gpioPinCfg},
{9, gWkup_i2cPinCfg},
{10, gWkup_uartPinCfg},
{11, gMcu_dmtimerPinCfg},
{PINMUX_END}
};

2. code 

#define CTRLMMR_MCU_TIMER6_CTRL 0x40F04218
#define MCU_TIMER6_CFG_BASE_ADDRESS (0x40460000U)
#define MCU_TIMER6_TCLR_ADDRESS (MCU_TIMER6_CFG_BASE_ADDRESS+0x38)
#define MCU_TIMER6_TCRR_ADDRESS (MCU_TIMER6_CFG_BASE_ADDRESS+0x3C)
#define MCU_TIMER6_TLDR_ADDRESS (MCU_TIMER6_CFG_BASE_ADDRESS+0x40)
#define MCU_TIMER6_TMAR_ADDRESS (MCU_TIMER6_CFG_BASE_ADDRESS+0x4C)
uint32_t regVal;
uint32_t rvalue = 0;
uint32_t value = 0;

regVal =
(
(1 << 29U) | //WKUP_EN
(1 << 16U) | // Pullup / Pulldown disabled
(1 << 2U) // mux mode 4
);
issLogPrintf("READ J721S2_CTRLMMR_WKUP_PADCONFIG56 add value : 0x%8x\n",J721S2_CTRLMMR_WKUP_PADCONFIG56);
issLogPrintf("WRITE J721S2_CTRLMMR_WKUP_PADCONFIG56 reg value : 0x%8x\n",regVal);

HW_WR_REG32(J721S2_CTRLMMR_WKUP_PADCONFIG56,regVal );
regVal = HW_RD_REG32(J721S2_CTRLMMR_WKUP_PADCONFIG56);
issLogPrintf("READ J721S2_CTRLMMR_WKUP_PADCONFIG56 reg value : 0x%8x\n",regVal);

// Configure MCU_TIMER6 to be driven by TMCU_TIMER6 output
HW_WR_REG32(CTRLMMR_MCU_TIMER6_CTRL, 0x00000110);

// Configure timer for 30Hz operation
HW_WR_REG32(MCU_TIMER6_TLDR_ADDRESS, 0xfff63C00); // Load value
HW_WR_REG32(MCU_TIMER6_TMAR_ADDRESS, 0xfffb0000); // Match value
HW_WR_REG32(MCU_TIMER6_TCRR_ADDRESS, 0xfff63C00); // Counter value
value =
(
(0 << 14u) | // PWM OUTPUT
(1 << 12U) | // Toggle modulation.
(1 << 11U) | // Event on MATCH and OVERFLOW
(0 << 10U) | // Event on MATCH and OVERFLOW
(0 << 7U) | // Default value at PWM pin is high
(1 << 6U) | // disable Compare Feature
(0 << 5U) | // Disable Prescaler
(1 << 1U) | // Auto Reload mode
(1 << 0U) // timer start
);
HW_WR_REG32(MCU_TIMER6_TCLR_ADDRESS, value); // Timer control

regVal = HW_RD_REG32(MCU_TIMER6_TCLR_ADDRESS);
issLogPrintf("READ MCU_TIMER6_TCLR_ADDRESS reg value : 0x%8x\n",regVal);
I look forward to your detailed response.