Questions regarding RMT memory size
Posted: Tue Nov 28, 2017 4:31 pm
I have some questions about the size of memory used by the RMT peripheral. (BTW, the RMT peripheral, as well as the LEDCPWM, MCPWM, and PCNT peripherals are AWESOME! I plan to use them for simultaneous servo, dc motor, and stepper motor control. I am astounded at the power contained in the ESP32 chip!)
The Technical Reference Manual says each of the eight RMT channels has a 64x32-bit block of memory. It also says users can extend the memory for a particular channel to use the blocks of subsequent channels. This implies that the maximum amount of memory a channel can have is 512x32-bit, and that only for channel 0.
The ESP-IDF Programming Guide also says the 8 channels share a 512x32-bit RAM block.
So apparently the maximum amount of memory allowed by a single channel is 512x32-bit, and that only for channel 0 and only if the other channels are not used.
However the Programming Guide also says the rmt_write_items function is able to send waveforms of any length. I LIKE THIS! But this seems to conflict with the earlier memory specifications. Which is correct?
Both documents indicate the memory is read over the APB bus. What is this bus? I haven't been able to find much documentation about it.
I have also examined the rmt_nec_tx_rx example which is located in the esp-idf/examples/periperals folder. This example uses a 3400x32-bit block of memory for channel 1. This is significantly larger than the 448x32-bit memory space allowed for channel 1. Yet the example works fine, confirming that the documentation for the rmt_write_items function is correct. I haven't yet tried to use more than one channel using this technique. I hope it works as I would like to use this technique to control up to eight stepper motors.
But why does this example work at all when it uses much more memory than what the documents say can be used? Does the rmt_write_items function use some other memory access method to eliminate the restrictive memory limitations of the APB bus (whatever that is)?
Clark
The Technical Reference Manual says each of the eight RMT channels has a 64x32-bit block of memory. It also says users can extend the memory for a particular channel to use the blocks of subsequent channels. This implies that the maximum amount of memory a channel can have is 512x32-bit, and that only for channel 0.
The ESP-IDF Programming Guide also says the 8 channels share a 512x32-bit RAM block.
So apparently the maximum amount of memory allowed by a single channel is 512x32-bit, and that only for channel 0 and only if the other channels are not used.
However the Programming Guide also says the rmt_write_items function is able to send waveforms of any length. I LIKE THIS! But this seems to conflict with the earlier memory specifications. Which is correct?
Both documents indicate the memory is read over the APB bus. What is this bus? I haven't been able to find much documentation about it.
I have also examined the rmt_nec_tx_rx example which is located in the esp-idf/examples/periperals folder. This example uses a 3400x32-bit block of memory for channel 1. This is significantly larger than the 448x32-bit memory space allowed for channel 1. Yet the example works fine, confirming that the documentation for the rmt_write_items function is correct. I haven't yet tried to use more than one channel using this technique. I hope it works as I would like to use this technique to control up to eight stepper motors.
But why does this example work at all when it uses much more memory than what the documents say can be used? Does the rmt_write_items function use some other memory access method to eliminate the restrictive memory limitations of the APB bus (whatever that is)?
Clark