Documentation error about RMT_symbol in esp-idf-5.2

profjmer
Posts: 3
Joined: Sun Mar 24, 2024 5:34 pm

Documentation error about RMT_symbol in esp-idf-5.2

Postby profjmer » Thu Apr 04, 2024 5:33 pm

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 1461 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 1461 times

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

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

Postby ESP_Sprite » Fri Apr 05, 2024 1:29 am

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.

Who is online

Users browsing this forum: No registered users and 150 guests