Page 1 of 1

Connect RMT TX out to MCPWM FAULT in

Posted: Sun Jan 03, 2021 11:50 am
by Wielebny
Hi,
Its possible to connect RMT TX to MCPWM FAULT via gpio matrix?

Im trying like this:

Code: Select all

	mcpwm_gpio_init(MCPWM_UNIT_0, MCPWM_FAULT_0, GPIO_NUM_15);
	rmt_set_pin(RMT_CHANNEL_0l, RMT_MODE_TX, GPIO_NUM_2);
	gpio_matrix_out(GPIO_NUM_15, SIG_IN_FUNC224_IDX, false, false);
	gpio_matrix_in(GPIO_NUM_2, SIG_IN_FUNC224_IDX, false);
Am I doing something wrong or is it impossible?

regards
Paweł

Re: Connect RMT TX out to MCPWM FAULT in

Posted: Mon Jan 04, 2021 1:42 am
by ESP_Sprite
What you're doing here is setting up MPWM and RMT to GPIO15 and GPOI2, then reconfigure GPIO15 and GPIO2 to use the FUNC224 signl instead. What you want to do is set up MPWM to use a certain input pin and then configure the RMT to use *the same pin* as an input pin. You may need to reconnect MPWM to that pin afterwards using a gpio_matrix_in command; it could be that the RMT removes that mapping when initializing the pin.

Re: Connect RMT TX out to MCPWM FAULT in

Posted: Mon Jan 04, 2021 11:15 pm
by Wielebny
Thank you for the right direction.

Code: Select all

	gpio_set_direction(GPIO_NUM_17, GPIO_MODE_INPUT_OUTPUT);
	gpio_matrix_out(GPIO_NUM_17, RMT_SIG_OUT0_IDX, 0, 0);
	gpio_matrix_in(GPIO_NUM_17, PWM0_F0_IN_IDX, 0);
regards
Paweł