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 baudrate bug #10

Open
itzandroidtab opened this issue May 24, 2018 · 4 comments
Open

UART baudrate bug #10

itzandroidtab opened this issue May 24, 2018 · 4 comments

Comments

@itzandroidtab
Copy link
Contributor

The uart ouput seems to have a strange bug where if you start using the uart to quick it goes on a different baud rate

Compiled program

#include "hwlib.hpp"

int main( void ){
    // kill the watchdog (ATSAM3X8E specific)
    WDT->WDT_MR = WDT_MR_WDDIS;    
    
    hwlib::wait_ms(1); // This looks like it fixes the behaviour of the uart output
    
    for(int i = 0; i < 100; i++){
        hwlib::target::uart_putc('A');
    }
}

Without the wait and CONSOLE_BAUDRATE set to 115200 baud
Not working uart

With the wait and CONSOLE_BAUDRATE set to 115200 baud
Working uart

@wovo
Copy link
Owner

wovo commented May 24, 2018 via email

@itzandroidtab
Copy link
Contributor Author

itzandroidtab commented May 24, 2018

De console duurt inderdaad even voordat hij opgestart is maar dit is zonder de computer/console. Als je de pinnnen direct op een logic analyser aansluit en je niet wacht krijg je dit resultaat.

Ik kon namelijk geen voorbeelden vinden in de hwlib, v1oopc-practica, v1oopc-examples, bmptk repo's die de uart gebruiken. En bij de documentatie van de uart_putc kon ik geen informatie vinden dat er gewacht moest worden om de uart werkend te krijgen

@wovo
Copy link
Owner

wovo commented May 25, 2018 via email

@itzandroidtab
Copy link
Contributor Author

Ik denk dat je in de war bent met een andere student ik ben namelijk niet bezig met een robot arm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants