MPC8313RDB demo program UART baud rate

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

MPC8313RDB demo program UART baud rate

跳至解决方案
2,075 次查看
anandmistry
Contributor II

Hello,

I am new to MPC world. I am trying to run a sample hello world program on my MPC8313RDBC. I've followed AN3830.pdf as a reference to run the auto-generated hello world program (the one that prints "Welcome to Codewarrior!" on the UART1).

According to the 8313_RDB_README.txt file, automatically included in the project, the supposed BAUD rate is as belows -

    Baud Rate: 57600

    Data Bits: 8

    Parity: None

    Stop Bits: 1

    Flow Control: None

But surprisingly i am getting the output at 28800 Baud rate. I am trying to understand where i was wrong. can anybody help me out?

And also do we have some good Document that can be referred for BSP porting on MPC8313(or its brothers) ? please suggest some links

Thanks and Regards

Anand Mistry

标签 (1)
1 解答
1,690 次查看
anandmistry
Contributor II

Hi Marius,

Thanks for your reply. I've gone through the README file. I came to know that it was actually the problem with the board revision. Newer boards are shipped with a 33MHz oscillator whereas the program was written for older boards that had 66MHz oscillator. I've made changes to the UART library according to the README file, recompiled the library. Now the sample program works at 56K baud rate.

This is what i did -

changed GetSystemClock() function in "C:\Program Files\Freescale\CodeWarrior PA V8.8\PowerPC_EABI_Tools\CodeWarriorTRK\Transport\processor\ppc\serial\8313_RDB_serial\duart_config.c" to make it 33MHz

Thanks,

Anand Mistry

在原帖中查看解决方案

2 回复数
1,690 次查看
marius_grigoras
NXP Employee
NXP Employee

Hi,

You can take a look here PowerPC_EABI_Tools\CodeWarriorTRK\Transport\processor\ppc\serial\8313_RDB_serial\duart_config.c to see the used formula for clockDivider. So, it seems that depends by both the configured baudRate and RCWLR[SPMF] - my first guest is that you're using a different/unexpected RCW in the NOR flash. Please take a look in the readme file to see which is the default RCW expected by Debugger.

Thank you,

Marius

1,691 次查看
anandmistry
Contributor II

Hi Marius,

Thanks for your reply. I've gone through the README file. I came to know that it was actually the problem with the board revision. Newer boards are shipped with a 33MHz oscillator whereas the program was written for older boards that had 66MHz oscillator. I've made changes to the UART library according to the README file, recompiled the library. Now the sample program works at 56K baud rate.

This is what i did -

changed GetSystemClock() function in "C:\Program Files\Freescale\CodeWarrior PA V8.8\PowerPC_EABI_Tools\CodeWarriorTRK\Transport\processor\ppc\serial\8313_RDB_serial\duart_config.c" to make it 33MHz

Thanks,

Anand Mistry