Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART baud rate appears to be off. #57

Closed
lennart-benschop opened this issue May 16, 2023 · 2 comments
Closed

UART baud rate appears to be off. #57

lennart-benschop opened this issue May 16, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@lennart-benschop
Copy link

In src/uart.h MASTERCLOCK is set to 20000000, which should be 18432000. The resulting UART baud rates are therefore 8% lower than specified. For the VDP link it makes no difference as the baud rate divisor in the eZ80 is rounded to 1 in any case.

@lennart-benschop
Copy link
Author

The function UART1open contains code like this, so thie wrong MASTERCLOCK appears to be used indeed.

UINT32	mc = MASTERCLOCK;										// UART baud rate calculation
UINT32	cb = CLOCK_DIVISOR_16 * pUART->baudRate;				// split to avoid eZ80 maths overflow error
UINT32	br = mc / cb;											// with larger baud rate values

@breakintoprogram
Copy link
Owner

Closing this as it is a duplicate of #58

@breakintoprogram breakintoprogram closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2023
@breakintoprogram breakintoprogram added the duplicate This issue or pull request already exists label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
Status: Won't Do
Development

No branches or pull requests

2 participants