Connect RMT TX out to MCPWM FAULT in

Wielebny
Posts: 5
Joined: Wed Mar 18, 2020 3:28 pm

Connect RMT TX out to MCPWM FAULT in

Postby Wielebny » Sun Jan 03, 2021 11:50 am

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ł

ESP_Sprite
Posts: 9739
Joined: Thu Nov 26, 2015 4:08 am

Re: Connect RMT TX out to MCPWM FAULT in

Postby ESP_Sprite » Mon Jan 04, 2021 1:42 am

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.

Wielebny
Posts: 5
Joined: Wed Mar 18, 2020 3:28 pm

Re: Connect RMT TX out to MCPWM FAULT in

Postby Wielebny » Mon Jan 04, 2021 11:15 pm

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ł

Who is online

Users browsing this forum: snutw_ and 66 guests