MPC5554 problem changing the eSCI baud while running

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

MPC5554 problem changing the eSCI baud while running

598 次查看
davidesalvetti
Contributor II

I have a problem with MPC5554.

 

I need to change the eSCI baud from 115200 to 2,000,000 while the program is running. when the program starts it works with 115200 but when I try to change the eSCI baud at 2,000,000 it seems to not understand my command and it continues to transmit data at 115200.

 

I'm trying to do this with the following lines:

 

#define ESCI_A_CR1_SBR_2MBPS 0x00040000    /* BR=sysclk/16/4 (2M baud) */

 

void BTSerialInit_2Mbps()
{

ESCI_A.CR2.R=0x2800;
ESCI_A.CR1.R=0x0000040c|ESCI_A_CR1_SBR_2MBPS; 

}

 

this function is called after a certain time is passed. Am I doing something wrong in the code? 

 

thankk you very much,

 

Davide

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

499 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, have you checked status register whether this change does not cause setting of certain error flag? I am not sure if it is correct to deactivate RX channel how you did in the first line.

 

On the whole I would say the better approach would be returning control registers to their default values in order to stop module operation, clear status register and re-initialize to new target values.

0 项奖励
回复