DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

AN664 View Datasheet(PDF) - Silicon Laboratories

Part Name
Description
Manufacturer
AN664 Datasheet PDF : 18 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
AN664
Each of the registers has a corresponding structure that defines the bit fields within that register. In addition,
registers that implement the clear and set addresses have 32-bit variables defined at the appropriate addresses.
Figure 6 shows the CONFIG register structure, which is declared as a part of the USART module structure.
Figure 6. Example USART CONFIG Register Structure
This CONFIG register structure has the TPARMD 2-bit field that controls the transmit parity. The U32 value
declared at the bottom of the structure is a union with the bit fields and is an entity that firmware can use to access
the entire register at one time.
The HAL Type.c functions and macros can access the entire USART0 CONFIG register:
SI32_USART_0->CONFIG.U32 = config;
The HAL can also read or write the TPARMD field in the USART0 CONFIG register:
parity = SI32_USART_0->CONFIG.TPARMD;
SI32_USART_0->CONFIG_SET = parity << SI32_USART_A_CONFIG_TPARMD_SHIFT;
Finally, the HAL can clear the TPARMD field:
SI32_USART_0->CONFIG_CLR = SI32_USART_A_CONFIG_TPARMD_MASK;
6
Rev. 0.2

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]