baudrate

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

baudrate

1,076 次查看
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?

标签 (1)
0 项奖励
回复
3 回复数

1,052 次查看
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 项奖励
回复

1,038 次查看
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 项奖励
回复

1,020 次查看
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 项奖励
回复