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 |
stellarisware - UARTStdioInit() (4) | 2012.07.23 |
KEIL 프로그램의 stack 크기 증설을 위해 startup_rvmdk.S를 수정하기 (0) | 2012.06.30 |
LM3S 내장 온도센서 계산하기(internal temperature sensor) (0) | 2012.06.28 |
uart 인터럽트 / 폴링 충돌 (0) | 2012.06.18 |
댓글을 달아 주세요
분명 나도 개발자인데 하나도 모르겠고 ㅠㅠ
2012.07.23 14:46 [ ADDR : EDIT/ DEL : REPLY ]분야가 다를뿐이에요 ㅠ.ㅠ
2012.07.23 15:10 신고 [ ADDR : EDIT/ DEL ]임베디드 분야에 관심많은 대학생인데 이 블로그 도움이 많이 될거 같아요>_< 이런쪽으로 글쓰시는 분들이 너무 없는데ㅜㅜ 나도 좀 잘하면 이런저런 글 올리고싶네요ㅋ 잘보고 갑니다~
2013.03.29 21:39 [ ADDR : EDIT/ DEL : REPLY ]좋게 봐주시니 감사합니다 ^^
2013.03.30 18:50 신고 [ ADDR : EDIT/ DEL ]확실히 IT 블로거들이 대부분 리뷰에 가까운 형태라..
개발 블로거들이 부족한건 매우 아쉽습니다 ㅠ.ㅠ