MPC8313RDB demo program UART baud rate

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

MPC8313RDB demo program UART baud rate

Jump to solution
1,423 Views
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

Labels (1)
1 Solution
1,038 Views
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

View solution in original post

2 Replies
1,038 Views
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,039 Views
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