Search found 294 matches

by jcsbanks
Tue Mar 27, 2018 8:11 pm
Forum: Hardware
Topic: Is there a way to reset an RMT channel if the buffer has been filled?
Replies: 8
Views: 2437

Re: Is there a way to reset an RMT channel if the buffer has been filled?

periph_module_reset(PERIPH_RMT_MODULE);
rmt_config(&rmt_rx);
rmt_rx_start(rmt_rx.channel, 1);

Finally! This allows recovery from buffer full.

Somewhat brutal to restart the whole RMT module though as would affect other channels.
by jcsbanks
Tue Mar 27, 2018 7:12 pm
Forum: Hardware
Topic: Is there a way to reset an RMT channel if the buffer has been filled?
Replies: 8
Views: 2437

Re: Is there a way to reset an RMT channel if the buffer has been filled?

esp_restart() doesn't even recover it. Only a reset by button.

rmt_memory_rw_rst either alone or inside rmt_rx_start(rmt_rx.channel, 1); changes the error code.
by jcsbanks
Tue Mar 27, 2018 5:39 pm
Forum: Hardware
Topic: Is there a way to reset an RMT channel if the buffer has been filled?
Replies: 8
Views: 2437

Re: Is there a way to reset an RMT channel if the buffer has been filled?

Unable to transmit on channel 0 after receive has filled the buffer.
by jcsbanks
Tue Mar 27, 2018 5:18 pm
Forum: Hardware
Topic: Is there a way to reset an RMT channel if the buffer has been filled?
Replies: 8
Views: 2437

Re: Is there a way to reset an RMT channel if the buffer has been filled?

rmt_rx_stop(rmt_rx.channel);
rmt_config(&rmt_rx);
rmt_driver_install(rmt_rx.channel, 1000, 0);
rmt_driver_uninstall(rmt_rx.channel);
rmt_rx_start(rmt_rx.channel, 1);

This or variations of it do not work.
by jcsbanks
Tue Mar 27, 2018 4:05 pm
Forum: Hardware
Topic: Is there a way to reset an RMT channel if the buffer has been filled?
Replies: 8
Views: 2437

Re: Is there a way to reset an RMT channel if the buffer has been filled?

rmt_config(&rmt_rx);
rmt_rx_start(rmt_rx.channel, 1);

Also does not restart it. I might have to try silly things like configuring it as a transmitter, or stopping and starting the driver, then trying again.
by jcsbanks
Tue Mar 27, 2018 2:39 pm
Forum: Hardware
Topic: Is there a way to reset an RMT channel if the buffer has been filled?
Replies: 8
Views: 2437

Is there a way to reset an RMT channel if the buffer has been filled?

rmt_rx_start(rmt_rx.channel, 1); to restart if receiving ended because there was a timeout. In my case with a continuous pulse train this is an error. rmt_memory_rw_rst(rmt_rx.channel); to reset the buffer position after reading items. In my case I do this in a FreeRTOS task after reading the buffer...
by jcsbanks
Mon Mar 26, 2018 3:33 pm
Forum: Hardware
Topic: Making a pair of "super" analog pins - combining DAC and ADC pins
Replies: 0
Views: 877

Making a pair of "super" analog pins - combining DAC and ADC pins

Where I have limited connections to the outside world and want maximum software configuration/flexibility whilst being able to use WiFi (so no ADC2) and not have the hall sensor interfere (ADC1_0 and ADC1_3): Connect DAC_1 with ADC1_CH1 and DAC_2 with ADC1_CH2. This would give me ADC, DAC, GPIO in t...
by jcsbanks
Fri Mar 23, 2018 7:57 pm
Forum: ESP32 IDF
Topic: RMT - simplest receive example working, but idle_threshold problem
Replies: 13
Views: 3428

Re: RMT - simplest receive example working, but idle_threshold problem

This really quick and dirty example works to read periods and allows expected setting of idle_threshold. It does not use the ring buffer, but simply reads the first entry in the receive buffer and resets, so the task delay and frequency are entangled. #include "freertos/FreeRTOS.h" #include "freerto...
by jcsbanks
Fri Mar 23, 2018 6:19 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 173
Views: 105872

Re: About the CAN controller.

If I recall, you might need to add this as a global (outwith a function in your c file, substituting your desired values). I am not sure if the example was intended to pick up these from menuconfig but it looked like it didn't. CAN_device_t CAN_cfg = { .speed=CAN_SPEED_500KBPS, // CAN Node baudrade ...
by jcsbanks
Fri Mar 23, 2018 5:17 pm
Forum: ESP32 IDF
Topic: RMT - simplest receive example working, but idle_threshold problem
Replies: 13
Views: 3428

Re: RMT - simplest receive example working, but idle_threshold problem

Without a ring buffer enabled, there is no problem, but I need to do some work to get an example going to obtain the data without the ring buffer. It seems that a receive end interrupt with a zero period will not be suitable as that would be an error condition in my situation where I want to continu...

Go to advanced search