umanovskis / baremetal-arm

An ebook about bare-metal programming for ARM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong bit offset for word length selection

dublevskyi opened this issue · comments

According to the PrimeCell UART (PL011) TRM word length bits are [6:5], so I'm pretty sure the offset should be 5 instead of 6

#define LCRH_WLEN_5BITS (0u << 6u)
#define LCRH_WLEN_6BITS (1u << 6u)
#define LCRH_WLEN_7BITS (2u << 6u)
#define LCRH_WLEN_8BITS (3u << 6u)

You're right of course. Will fix shortly.

Commit 4ce7973 fixes the offset.