Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Can't change BAUD on DE1 UART

I am using the DE1_NIOS example and have implemented a simple nios program to transfer characters to and from hyperterminal. My problem is that when I change the baud rate in SOPC builder, nothing happens - it stays at 115,200. I have also tried to change the baud in software, but still, my terminal program only works at 115,200. The ptf file setting clearly show a baud of 9600, etc...

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Are you sure the pc end isn't autodetecting the baud rate?

    I don't trust hyperterminal to do anything sensible at all!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What's your SOPC builder setting for baudrate?

    Fixed or variable?

    If the latter, maybe your program or the HAL driver forces somewhere the divisor register for a 115200 rate.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have used a variety of terminal applications and also tried with both baud fixed and baud variable. I can't work out why it's happening. I'll try creating my own project from scratch rather than use the DE1_NIOS project.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The uart clock divisor is probably documented with the its register definitions (the sopc builder usually has links to these).

    So you could write your own driver instead of using the Altera HAL. But even using their HAL you can read/write the registers to find what has been set.