baudrate

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

baudrate

1,071 Views
syedhashmiraza
Contributor III

hello,  iam using mcxa153 mcu in this mcu what is the alternate of 

 (BRG; /**< Baud Rate Generator register. 16-bit integer baud rate divisor value)

this is not there in mcxa153 mcu  how i can implement BRG?

Labels (1)
0 Kudos
Reply
3 Replies

1,047 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @syedhashmiraza 

In MCXA153, the division rate for the baud rate generator register is SBR, as described in 39.6.6 Baud Rate (BAUD). Please note that there may be a difference between SBR and BRG. In MCXA153, the baud rate is calculated as baud clock ÷ ((OSR + 1) × SBR). There is no need to add 1 to SBR. For details, please refer to the User Manual (UM).

Alice_Yang_0-1735809759840.png

 

Hope it helps you.

BR

Alice

0 Kudos
Reply

1,033 Views
syedhashmiraza
Contributor III

hello, how can i write in this method?

void ISO7816_SetETU(uint16_t etu) {
currentETU = etu;
USART1->BRG = (CARD_CLK_DIV * etu) / 16 - 1;
 
}
0 Kudos
Reply

1,015 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @syedhashmiraza 

For MCXA153, the formula for the Uart baud rate is as follows:

baud rate = baud clock ÷ ((OSR + 1) × SBR)

I don't know the meaning about "CARD_CLK_DIV * etu" in your formula.

 

BR

Alice

0 Kudos
Reply