DA14585 uart.h versus datasheet

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
roland
Offline
Last seen:4 months 4 days ago
加入:2014-01-21 14:45
DA14585 uart.h versus datasheet

On page 370 of the DA14585 there is the mode register of the UART.

Using uart.h one can construct a config value for the register. So instead of using a vanilla "3" in the init code of DSPS I like to use UART_CHAR_FORMAT_8 instead.

甚至还在我的应用程序必须使用Parity so that would be something like setting the: (UART_CHAR_FORMAT_8 | (1<<3) | (1<<4) ) to get 8 bits data, even parity and 1 stopbit.
REGISTER "UART_LCR_REG"
UART_DLS bits [1..0]
UART_STOP bit [2]
UART_PEN [3] and
UART_EPS [4]
RESERVED [5]
UART_BC [6]
UART_DLAB [7]

There seems to be no correlation between the enum() in the uart.h and the description of the hardware register. One would expect that the UART_PARITYBIT_xxxx could be mapped directly on the UART_PEN/EPS bits. Now the values are also reversed UART_PARITYBIT_EVEN = 0 whereas the register in the datasheet defines it to be "1". The reserved bit [5] could fit nicely as the SPACE/MARK parity setting.

So is this all correct? Or is the datasheet wrong or the uart.h? Is the bit 5 actually a bit that can set parity mark space?

Device:
Device Number:
DA14585
PM_Dialog
Offline
Last seen:1 day 6 hours ago
Staff
加入:2018-02-08 11:03
Hi roland,

Hi roland,

Thanks for your information! Let me check your issue and I will get back to you as soon as possible.

Thanks, PM_DIalog