stellraisware의 UARTStudioInit()는 간단하게 UART를 초기화 해주는 함수이다.
UARTStudioInit()의 초기화 값은 0에서 2까지 가능하며 이 내용이 합당한 정의는 존재하지 않는듯.
그리고 baud rate 라던가 인터럽트 등은 초기화 해준다고 해도
포트 자체를 사용할지에 대한 초기화는 사용자가 해주어야 한다.
그리고 115200-N-8-1로 무조건 정의되니 주의!!
만약 주변장치 초기화를 하지 않으면, 당연히(!) 아무런 것도 출력되지 않는다.
[링크 : http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/45229/160748.aspx]
            
                    
                    
UARTStudioInit()의 초기화 값은 0에서 2까지 가능하며 이 내용이 합당한 정의는 존재하지 않는듯.
그리고 baud rate 라던가 인터럽트 등은 초기화 해준다고 해도
포트 자체를 사용할지에 대한 초기화는 사용자가 해주어야 한다.
그리고 115200-N-8-1로 무조건 정의되니 주의!!
만약 주변장치 초기화를 하지 않으면, 당연히(!) 아무런 것도 출력되지 않는다.
| SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1); 
GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1); 
UARTStdioInit(1);  | 
| //***************************************************************************** 
// 
//! Initializes the UART console. 
//! 
//! \param ulPortNum is the number of UART port to use for the serial console 
//! (0-2) 
//! 
//! This function will initialize the specified serial port to be used as a 
//! serial console.  The serial parameters will be set to 115200, 8-N-1. 
//! An application wishing to use a different baud rate may call 
//! UARTStdioInitExpClk() instead of this function. 
//! 
//! This function or UARTStdioInitExpClk() must be called prior to using any 
//! of the other UART console functions: UARTprintf() or UARTgets().  In order 
//! for this function to work correctly, SysCtlClockSet() must be called prior 
//! to calling this function. 
//! 
//! It is assumed that the caller has previously configured the relevant UART 
//! pins for operation as a UART rather than as GPIOs. 
//! 
//! \return None. 
// 
//***************************************************************************** 
void 
UARTStdioInit(unsigned long ulPortNum) 
{ 
    // 
    // Pass this call on to the version of the function allowing the baud rate 
    // to be specified. 
    // 
    UARTStdioInitExpClk(ulPortNum, 115200); 
}  | 
[링크 : http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/45229/160748.aspx]
'embeded > Cortex-M3 Ti' 카테고리의 다른 글
| LM3S - FlashProgram() (0) | 2012.11.06 | 
|---|---|
| TI Stellaris LM3S 시리즈 ICDI가 사라졌어요!!! (0) | 2012.09.22 | 
| KEIL 프로그램의 stack 크기 증설을 위해 startup_rvmdk.S를 수정하기 (0) | 2012.06.30 | 
| LM3S 내장 온도센서 계산하기(internal temperature sensor) (0) | 2012.06.28 | 
| uart 인터럽트 / 폴링 충돌 (0) | 2012.06.18 | 
