Page 1 of 1

Documentation error about RMT_symbol in esp-idf-5.2

Posted: Thu Apr 04, 2024 5:33 pm
by profjmer
Documentation error about RMT_symbol
Drawing of bit levels should not be in lsb positions of words but in msb positions
rmt doc.png
rmt doc.png (43.3 KiB) Viewed 1363 times
According to rmt_types.h
It seems that level bits are msb and not lsb
/**
* @brief The layout of RMT symbol stored in memory, which is decided by the hardware design
*/
typedef union {
struct {
uint16_t duration0 : 15; /*!< Duration of level0 */
uint16_t level0 : 1; /*!< Level of the first part */
uint16_t duration1 : 15; /*!< Duration of level1 */
uint16_t level1 : 1; /*!< Level of the second part */
};
uint32_t val; /*!< Equivalent unsigned value for the RMT symbol */
} rmt_symbol_word_t;

According to esp32_technical_reference_manual_en
Level bits are msb bits
rmt ram.png
rmt ram.png (42.74 KiB) Viewed 1363 times

Re: Documentation error about RMT_symbol in esp-idf-5.2

Posted: Fri Apr 05, 2024 1:29 am
by ESP_Sprite
That diagram is technically correct (the best kind of correct), but it certainly is misleading. If you look at the numbers at the top, you can see that the bits are labeled with the LSB on the left rather than on the right; this deviates from the standard convention to describe hardware things. I'll see if we can change this around. Thanks for bringing this to our attention.