Changeset d77ed25 in umon


Ignore:
Timestamp:
Jul 3, 2015, 5:54:50 PM (4 years ago)
Author:
Jarielle Catbagan <jcatbagan93@…>
Branches:
master
Children:
27db08e
Parents:
a5f94c8
git-author:
Jarielle Catbagan <jcatbagan93@…> (07/03/15 17:54:50)
git-committer:
Ed Sutter <edsutterjr@…> (07/05/15 01:12:17)
Message:

BBB: cpuio.*: Add UART0 initialization and set DEFAULT_BAUD_RATE to 115200

Location:
ports/beagleboneblack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ports/beagleboneblack/cpuio.c

    ra5f94c8 rd77ed25  
    66#include "warmstart.h"
    77#include "timer.h"
     8#include "am335x.h"
     9#include "uart16550.h"
    810
    911int
     
    133135}
    134136
     137void
     138pinMuxInit(void)
     139{
     140        // Set pin mux configuration for UART0 RX/TX pins
     141        CNTL_MODULE_REG(CONF_UART0_RXD) = SLEWSLOW | RX_ON |
     142                PULL_OFF | MUXMODE_0;
     143        CNTL_MODULE_REG(CONF_UART0_TXD) = SLEWSLOW | RX_OFF |
     144                PULL_OFF | MUXMODE_0;
     145}
     146
    135147/* If any CPU IO wasn't initialized in reset.S, do it here...
    136148 * This just provides a "C-level" IO init opportunity.
     
    140152{
    141153        ram_vector_install();
     154
     155        // Enable the control module:
     156        CM_WKUP_REG(CM_WKUP_CONTROL_CLKCTRL) |= 2;
     157
     158        // Enable clock for UART0:
     159        CM_WKUP_REG(CM_WKUP_UART0_CLKCTRL) |= 2;
     160
     161        pinMuxInit();
     162
     163        InitUART(DEFAULT_BAUD_RATE);
     164
     165        // Set UART0 mode to 16x
     166        UART0_REG(UART_MDR1) &= ~7;
    142167}
  • ports/beagleboneblack/cpuio.h

    ra5f94c8 rd77ed25  
    1 #define DEFAULT_BAUD_RATE 38400
     1#define DEFAULT_BAUD_RATE 115200
    22
    33#define MONARGV0 "umon"
Note: See TracChangeset for help on using the changeset viewer.