MPC5554 problem changing the eSCI baud while running

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5554 problem changing the eSCI baud while running

623件の閲覧回数
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 返信

524件の閲覧回数
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 件の賞賛
返信