1 Introduction This document describes the software examples for the CC1111, CC2511 and CC2531 RF USB dongles. The Human Interface Device (HID) applic

Similar documents
DE1-SoC Board

ISP and CodeVisionAVR C Compiler.hwp

H3050(aap)

Microsoft Word - Armjtag_문서1.doc

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

(SW3704) Gingerbread Source Build & Working Guide

Chapter 1

chapter4

step 1-1

Microsoft Word _whitepaper_latency_throughput_v1.0.1_for_

APOGEE Insight_KR_Base_3P11

°í¼®ÁÖ Ãâ·Â

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

강의10

Remote UI Guide

CD-RW_Advanced.PDF

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

Microsoft PowerPoint Android-SDK설치.HelloAndroid(1.0h).pptx

MAX+plus II Getting Started - 무작정따라하기

Network Security - Wired Sniffing 실습 ICNS Lab. Kyung Hee University

untitled

목차 1. 개요 USB 드라이버 설치 (FTDI DRIVER) FTDI DRIVER 실행파일 USB 드라이버 확인방법 DEVICE-PROGRAMMER 설치 DEVICE-PROGRAMMER

Install stm32cubemx and st-link utility

K7VT2_QIG_v3

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh

C. KHU-EE xmega Board 에서는 Button 을 2 개만사용하기때문에 GPIO_PUSH_BUTTON_2 과 GPIO_PUSH_BUTTON_3 define 을 Comment 처리 한다. D. AT45DBX 도사용하지않기때문에 Comment 처리한다. E.

Something that can be seen, touched or otherwise sensed

- 2 -

Page 2 of 5 아니다 means to not be, and is therefore the opposite of 이다. While English simply turns words like to be or to exist negative by adding not,

<BFA9BAD02DB0A1BBF3B1A4B0ED28C0CCBCF6B9FC2920B3BBC1F62E706466>

목차 윈도우드라이버 1. 매뉴얼안내 운영체제 (OS) 환경 윈도우드라이버준비 윈도우드라이버설치 Windows XP/Server 2003 에서설치 Serial 또는 Parallel 포트의경우.

Microsoft PowerPoint - ch03ysk2012.ppt [호환 모드]

MR-3000A-MAN.hwp

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Solaris Express Developer Edition

SRC PLUS 제어기 MANUAL

Microsoft Word - ASG AT90CAN128 모듈.doc

- 이 문서는 삼성전자의 기술 자산으로 승인자만이 사용할 수 있습니다 Part Picture Description 5. R emove the memory by pushing the fixed-tap out and Remove the WLAN Antenna. 6. INS

API 매뉴얼

#Ȳ¿ë¼®

Microsoft PowerPoint - 06-IPAddress [호환 모드]

슬라이드 제목 없음

hd1300_k_v1r2_Final_.PDF

슬라이드 1


ARMBOOT 1

歯1.PDF

10X56_NWG_KOR.indd

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

이도경, 최덕재 Dokyeong Lee, Deokjai Choi 1. 서론

슬라이드 제목 없음

<31325FB1E8B0E6BCBA2E687770>

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

Journal of Educational Innovation Research 2018, Vol. 28, No. 3, pp DOI: NCS : * A Study on

1217 WebTrafMon II

슬라이드 1

06_ÀÌÀçÈÆ¿Ü0926

04-다시_고속철도61~80p

MPLAB C18 C

00 SPH-V6900_....

05Àå

6자료집최종(6.8))

TTA Verified : HomeGateway :, : (NEtwork Testing Team)

PRO1_09E [읽기 전용]

Orcad Capture 9.x

Microsoft PowerPoint SDK설치.HelloAndroid(1.5h).pptx

PowerPoint 프레젠테이션

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

歯AG-MX70P한글매뉴얼.PDF

RVC Robot Vaccum Cleaner

0125_ 워크샵 발표자료_완성.key

T100MD+


<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

PCServerMgmt7

<B1E2C8B9BEC828BFCFBCBAC1F7C0FC29322E687770>

untitled

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자

solution map_....


Microsoft Word - Automap3

untitled

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

목차 1. 제품 소개 특징 개요 Function table 기능 소개 Copy Compare Copy & Compare Erase

6주차.key

Windows 8에서 BioStar 1 설치하기

¹Ìµå¹Ì3Â÷Àμâ

<31332DB9E9C6AEB7A2C7D8C5B72D3131C0E528BACEB7CF292E687770>

Mango220 Android How to compile and Transfer image to Target

<3130C0E5>

untitled

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

Nordic Chipset BLE Test Application Note

Å©·¹Àγ»Áö20p

歯3이화진

CAN-fly Quick Manual

Chap06(Interprocess Communication).PDF

11¹Ú´ö±Ô

Transcription:

1 Introduction This document describes the software examples for the CC1111, CC2511 and CC2531 RF USB dongles. The Human Interface Device (HID) application emulates mouse and keyboard using a SmartRF05EB or SmartRF04EB. The RF Modem example shows how the USB CDC class can be implemented to provide serial port emulation across USB (Virtual COM-port). Both examples use the MRFI protocol for radio communication. This document the software referred to in [5]. 이문서는 CC1111, CC2511 과 CC2531 RF 용의 USB dongles 의소프트웨어예제를설명합니다. 휴먼인터페이스장치 (HID) 응용프로그램은마우스와키보드가 SmartRF05EB 또는 SmartRF04EB 를사용하여흉내 ( 에뮬레이트 ) 를냅니다. RF 모뎀이예제에서는 USB CDC 클래스는 USB 를통해시리얼포트에뮬레이션 ( 가상 COM 포트 ) 을제공하기위해활용된보여줍니다. 두예제는라디오통신을위한 MRFI 프로토콜을사용합니다. 이문서는소프트웨어에 [5] 를참조.

2 About this Manual This manual covers the USB software examples and USB Firmware Library for the Texas Instruments Low-Power RF USB Dongles for the chipsets CC1111, CC2511 and CC2531. 이매뉴얼은칩셋 CC1111, CC2511 과 CC2531 에대한 TI 의전전력 RF USB 동글에대한소프트웨어예제와 USB 펌웨어자료실에대하여다루고있습니다. 3 Acronyms ACM - Abstract Control Model API - Application Programming Interface CCA - Clear Channel Available CDC - Communication Device Class DCE - Distributed Computing Environment DTE - Data Terminal Equipment FCS - Frame Check Sequence HAL - Hardware Abstraction Layer HID - Human Interface Device ICE - In Circuit Emulator IO - Input/Output PAN - Personal Area Network MRFI - Minimal RF Interface RF - Radio Frequency RSSI - Received Signal Strength Indicator SFD - Start of Frame Delimiter SoC - System on Chip USB - Universal Serial Bus 4 Getting Started 4.1 Preparations The USB firmware described in this document may be debugged using any of the following In-Circuit Emulators: USB 웨어는아래열거한어떤회로에뮬래이터를디버그에사용하는것을이문서에서설명죕니다. CC Debugger SmartRF05EB SmartRF04EB with SOC_DEM debug connector [1] Please install SmartRF Studio before connecting the ICE to a PC. SmartRF Studio is a PC application for Windows that helps you find and adjust the radio register settings. Please refer to [3] for instructions on how to download and install SmartRF Studio. Installing SmartRF Studio prior to connecting the debugger ensures that all the relevant Windows drivers are installed. ICE 를 PC 에연결하기전에 SmartRF Studio 를설치하여주십시오. SmartRF Studio 는라디오의레지스터설정하고찾아내고조정하는데도움을주는윈도우즈용 PC 응용프로그램입니다. 다운로드하는방법과 SmartRF Studio 설치에대한지침을 [3] 에서참조하십시오. SmarRF Studio 설치에앞서디버그연결을하기위한관련된모든운도우즈드라이버를설치를합니다. Please see the relevant USB Hardware User s Guide ([7] or [8]) for detailed instructions on how to interconnect the PC, the ICE debugger and the target dongle. When the drivers are installed and the debugger connected, the USB dongle can be programmed and debugged using IAR Embedded Workbench. Programming can also be done using the SmartRF Flash programmer [4]. PC 에상호연결에대한자세한지시, ICE 디버그와대상동글에관련 USB Hardware User's Guide([7], [8]) 을

참조하십시오. 드라이버가설치됐고디버그가연결됐으면, USB 동글은 IAR EW 를사용하여디버그된프로그램을프로그램할수있습니다. 프로그래밍은 SmartRF Flash 프로그래머 [4] 를사용하여되어될수도있습니다. 4.2 General Guidelines When writing and debugging USB firmware one should remember that when Windows (or another OS) detects a USB device it will assume that it works in accordance with the USB specification. During debugging this might not be the case. Breakpoints may stop the execution of code on the USB Dongle and firmware under development may not be completed or error free. This may lead to the PC disconnecting the USB device and turning off or toggling its power supply. In some cases Windows (or the OS in use) may crash or misbehave. Hence breakpoints should be used with caution. Obviously inserting and using breakpoints in the firmware during debugging will be extremely useful to pinpoint bugs and follow code execution. And they can and should be used. But they will also stop the code execution on the target and may cause the device to act in conflict with the USB specification. If the firmware contain bugs that make the PC disconnect the USB Dongle it may be necessary to disconnect the USB cable, and power the USB Dongle from the SmartRF04EB/SmartRF05EB in order to reprogram it. Please refer to the relevant USB Hardware User s Guide ([7] or [8]) for instructions on how to reprogram the dongle without it being powered by the PC. 쓰기와디버그때 USB 펌웨어는윈도우즈 ( 또는다른 OS) 는 USB 의사양에따른동작을가정하는 USB 장치를감지했을때하나를기억을해야합니다. 디버그하는동안이것은아닌경우일수도있습니다. 중단점은 USB 동글코드의실행이전지될수도있고개발중인펌웨어는완전하지않거나오류가없을구도있습니다. 이것은 USB 장치와 PC 에연결해지로될수도있고전원공급이토글 ( 겼다 / 껐다 ) 될수도있습니다. 윈도우즈 ( 또는사용중인 OS) 어떤경우에는충돌을하거나이상한짓을할수도있습니다. 그래서중단점은주의하여사용해야합니다. 펌웨어디버그하는경우중단점을명확하게삽입하면버그를정확히찾아내고코드를실행하는대단히유익할것입니다. 그리고그것이사용되어야하고사용될것입니다. 그렇지만대상에서코드실행이중지될수도있고장치가 USB 사양과충돌을유발할수도있습니다. 만약펌웨어가 USB 동글을 PC 분리하는버그를포함하는경우에는, 그리고 SmartRF04EB/SmartRF05EB 로부터 USB 동글파워를그것을다시프로그램하기위해서 USB 케이블을분리해야할필요가있습니다. 공급전원없이 PC 에의해서동글을다시프로그램하기위한방법에지침에관한관련된 USB Hardware User's Guide([7], [8]) 를참조하십시오. 4.3 Known Problems When using the debug interface through the level-converter on the SmartRF04EB it might become unstable. This problem is more likely to occur at low voltages or with crosstalk in the cable at high interface speed. Using the SOC_DEM instead of the P14 SoC Debug/Flash connector on SmartRF04EB is more stable when the voltage differs on the SmartRF04EB and the target board. If problems are still experienced when using SOC_DEM, make sure that the 10 pin flat cable used to connect the RF USB Dongle to the SmartRF04EB is as short as possible. Next, it might be necessary to reduce the debug interface speed in order to achieve stable operation. 디버그인터페이스를 SmartRF04EB 상에레벨변환기를통해사용할때그땐안정되지않을수도있습니다. 이문제는전입이낮을때나케이블에혼선이있는케이블에서고속인터페이스같은때있습니다. SmartRF04/EB 에서 SOC_DEM 대신에 SOC Degugger/Flash 커넥터 P14 의사용하는것은 SmartRF04/EB 에전압이차이나는대상보드때더욱안정됩니다. 만약문제가 SOC_DEM 을사용해도여전히나타나면, RF USB 동글을 SmarttRF04EB 와연결하가위해사용된 10 핀프렛케이블을가능한한짧게하십시오. 다음으로, 안정된동작을달성하기위하여디버그인터페이스속도를줄여하할필요가있습니다. In the IAR workbench do the following: Highlight the project name by clicking on it in the Files window (see Figure 1). Go to Project > Options Select the Category Texas Instruments Click on the Target tab.

Check the "Reduce interface speed " option (see Figure 2). 5 USB Application Examples This section describes the application examples available for the USB dongles. These application examples focus on how to use the USB part of the respective device. The examples are available both as source code and ready-to-upload.hex files from [5].

이섹션은응용프로그램예제의 USB dongles 에대해설명합니다. 이러한응용프로그램예제는해당장치의 USB 부분을사용하는방법에초점을맞춥니다. 예제프로그램들은소스코드와바로파일로부터업로드하여사용할수있는.hex 양쪽이다가능합니다. There are two USB application examples. Working together with the USB examples are peer applications running on CC1110EM, CC2510EM and CC2530EM respectively. The CC1110EM and CC2510EM must be plugged into a SmartRF04EB. The CC2530EM must be plugged into a SmartRF05EB. USB 예제와함께작업하는 CC1110 뜨에실행하는응용프로그램, CC2510EM 과 CC2530EM 에제각의동료가있습니다. CC1110EM 과 CC2510EM 은반드시 SmartRF04 에접속해야합니다. CC2530EM 은바드시 SmartRF05EB 에접속해야합니다. 5.1 Building and Running the Examples First of all make sure that the dongle is connected to the ICE as described the Programming section of the relevant USB Dongle User s Guide (please see [7] for programming the CC1111/CC2511), or [8] for programming the CC2531). When building the examples from source with IAR EW8051, make sure you select the project corresponding to the target you are developing your software for. Please see Figure 5 for an overview of the projects found the in the USB application example package. The IAR workspace is located in the sub-folder ide just below the root of the installation. The file is named usb_app_ex.eww (Figure 3). 무엇보다앞서연관된동글은 USB Dongle User Guide 의프로그래밍섹션에서설명된것처럼 ICE 에연결되는것을확실히하십시오. IAR EW8051 과함께원본으로부터예제를만들때, 당신이개발하는소프트웨어가대상목표에부합하는프로젝트선택을확실하게해야합니다. 그림 5 참조하십시오, 프로젝트에대한개요를찾을수있는 USB 응용프로그램예제패키지입니다. IAR 작업영역은하위폴더 ' 설치의루트바로아래에 IDE 가 ' 에위치해있습니다. 파일은 usb_app_ex.eww" 이름으로되어있습니다 ( 르림 3).

After opening the IAR workspace all the examples can be built in one operation by hitting the F8 key. Downloading to the target can be done using the keyboard shortcut 'CTRL+D ', alternatively 'Project->Debug ' as shown in Figure 4. IAR 작업공간을연후에모든예제프로그램을 F8 키를누름으로한번의동작으로만들어집니다. 대상으로다운로드하기위해키보드단축키로 "CTRL + D", "Preject -> Debug" 그림 4 에보인것처럼양자택일할수있습니다.

Alternatively the generated HEX-file can be downloaded to the target using the SmartRF Flash programmer. 생성된 hex- 파일은 SmartRF Flash programming 을사용하여대상으로다운로드할수있습니다. 5.2 RF Protocol Both examples use MRFI as the basic protocol for RF communication. On top of MRFI there is a minimal network layer which adds retransmission and acknowledge. The application layer uses two frame types: DATA and ACK. The latter is used to indicate to the sender that the receiver is busy. The RF channel is fixed to MRFI logical channel 0, defined as shown in Table 2. Please refer to the document SimpliciTI Channel Table Information.pdf contained in the SimpliciTI installer for details on the channel allocation [21]. 두예제의 RF 통신을위한기본프로토콜로 MRFI 를사용합니다. MRFI 의최우선에재전송과인정를추가하고최소한의네트워크계층입니다. 응용프로그램계층사용하는두가지프레임유형 : 데이터와 ACK 를사용합니다. 후자는보낸사람에게그수신기가바쁜상태를나타내는데사용됩니다. RF 채널 MRFI 논리채널로고정 '0 ', 표 2 와같이정의됩니다. 문서 SimpliciTI 채널테이블 Information.pdf 를채널할당에대한자세한내용 SimpliciTI 설치프로그램에포함된 [21] 을참조하십시오.

5.2.1 MRFI Frame Format The MRFI frame format is identical to SimpliciTI apart from the NWK payload which is this example has been replaced by a two-byte header and the application payload. The MRFI/SimpliciTI header varies slightly between IEEE 802.15.4 compliant devices (CC2531) and CC1111/CC2511, please refer to [11] for details. MRFI 프레임포맷은 SimplicTI 와 NWK 페이로드로를제외하고는동이하고여기에이예제프로그램은 2 바이트헤더와응용프로그램페이로드로대체되어있습니다. MRFI/SimpliciTI 헤더는 IEEE 802.15.4 를따르는장치들 (CC2531) 과 CC1111/CC2511 사이에약간의변화가있습니다. 자세한것은 [11] 을참고하십시오. 5.2.2 MRFI API MRFI is the lowest software layer of the SimpliciTI protocol and is used in these application examples without the rest of SimpliciTI. It implements a common API for all supported RF devices, hiding the implementation details from the application. It is a pure radio interface, not to be confused with a more generic HAL. This section is limited to a brief overview of the API, as this document focuses on the applications and the USB Firmware Library. Only the API calls which are used by the examples are mentioned here. For a complete overview of the MRFI API, please refer to the MRFI interface header, mrfi.h (located in source/components/simpliciti/mrfi) and the various implementations found in mrfi_radio.c (source/components/simpliciti/mrfi/radios/familyxx). The relevant sub-folders are family6 (CC2530/31) and family2 (CC1110/1111/2510/2511). All references to MRFI are contained in a single source file which is common to both examples (source/apps/common/mrfi_link.c). MRFI 은 SimpliciTI 프로토콜의가장낮은계층의소프트웨어이며, 이러한응용프로그램예제에서 SimpliciTI 의나머지부분없이사용됩니다. 그것은지원되는모든 RF 장치, 응용프로그램에서구현세부정보를숨기는공통 API 를구현합니다. 그것은순수한라디오인터페이스이고, 일반적인 HAL 보다더혼동하지않습니다. 이섹션은 API 의간단한대략적인내용으로제한되고있습니다, 이문서는응용프로그램과 USB 소프트웨어자료실에초점을맞추었습니다. 단지여기서호출하는 API 는이예제프로그램에언급되고있는사용된것입니다. MRFI API 의전체개요에대한것은 MRFI 인터페이스헤더 mrfi.h ( 원문참조 ) 와다양한활용을찾을있는 mrfi_radio.c( 원문참조 ) 를참조하십시오. 관련된하위폴더는페미리 6 과페미리 2 에있습니다. MRFI 에모든참고자료는하나의소스파일에담겨있습니다, 그것은양쪽예제에공통입니다 ( 원문암조 ). void MRFI_Init(void); This function must be called before any other MRFI calls. uint8_t MRFI_Transmit(mrfiPacket_t *, uint8_t); This call supplies a pointer to a mrfipacket_t object whose frame element has been populated with the payload. The implementation populating the payload portion of the frame should use the MRFI macro (MRFI_P_PAYLOAD(p) defined in mrfi.h) to obtain a pointer to the place in the frame in which the payload information should be written. This allows MRFI to protect the preamble portion of the frame into which MRFI itself populates radio-specific information. This implies that the mrfipacket_t pointer must point to a valid object even if there is no payload at all. 이호출은프레임요소를페이로드로채워진 mrfipacket 개체의포인터로공급됩니다. 프레임페이로드부분으로채워진활용에서 MRFI 메크로 ( 원문참조 ) 는프레임에위치포인터를획득하기위해페이로든정보를써넣어야합니다. 이것은 MRFI 를프로젝트의프레임서문 ( 프리엠블 ) 부분을 MRFI 의라디오특정정보가자체에거주하는것을허용합니다. 이것은 mrfipacket_t 포인터는비록페이로드가전연없다해도반드시유효한대상을가르처야하는것을의합니다.

The txtype parameter specifies whether transmit should occur immediately and unconditionally or CCA should be applied. txtype 매개변수가있는지여부를즉시발생해야하며무조건또는 CCA 가적용되어야전송을지정합니다. Valid values are: MRFI_TX_TYPE_FORCED MRFI_TX_TYPE_CCA The address fields and the length field must also be set before the transmit call is invoked. These fields are not strictly part of the network layer encapsulation but it is that layer s responsibility to populate those fields. MRFI supplies 3 macros to populate these fields and they should be used. The p formal parameter is ( mrfipacket_t *). The x parameter is the length to be set in when using that macro. 주소필드와길이필드는전송을호출하기전에설정해야합니다. 이들필드들은네트워크계층켑슐의엄격한부분은아니지만레이어는그필드를채워야하는책임이있습니다. MRFI 는이들필드를채우기위하고사용되어야하는 3 매크로를공급합니다. p' 정식매개변수는 (mrfipacket_t *) 입니다. x' 매개변수는매크로를사용할때설정해야하는길이입니다. MRFI_P_SRC_ADDR(p) MRFI_P_DST_ADDR(p) MRFI_SET_PAYLOAD_LEN(p,x) This routine returns a value indicating status of the transmit attempt. 이루틴은전송시도의ㅅㅇ태를나타내는값을돌려줍니다. MRFI_TX_RESULT_SUCCESS MRFI_TX_RESULT_FAILED Transmit may fail if CCA is requested and the channel is not clear after a number of retries. All symbols referenced here are defined in mrfi.h. 전송은 CCA 가요청됐고채널의재시도후의숫자가삭제되지않으면실패할수도있습니다. 여기참조된모든심벌들은 mrfi.h 에정의되어있습니다. void MRFI_Receive(mrfiPacket_t *); This function copies a received frame into user space from the MRFI layer. The parameter is a pointer to an area in user space into which the frame can be copied. This routine should be called as a result of having MRFI_RxCompleteISR() invoked. At that time there is guaranteed to be a valid frame available. The MRFI payload may be maximum 53 bytes for the CC1111/CC2511 and maximum 117 bytes with the CC2531. 이함수는 MRFI 계층의사용자공간으로수신한프레임을복사합니다. 매개변수는복사되어지는프레임안에하나의사용자공간영역의포인터입니다. 이루틴은 MRFI_RxComleteISR() 가가지고있는내용의결과로서호출되어집니다. 그때거기에는유용한프레임이있는것을보증합니다. MRFI 페이로드는 CC1111/CC2511 그리고최대 117 바이트로 CC2531 될수있습니다. void MRFI_RxCompleteISR(void); User code must implement this method. When MRFI has obtained a frame from the radio and validated it MRFI will invoke this function. This is done within the receive ISR context. At the very least the function should invoke MRFI_Receive() so that the new, valid frame is copied into user space and queued for processing. If the ISR thread is released before this copy is done it is possible that a second frame can be received and the first will be lost. 사용자코드는이방법을구현해야만합니다. MRFI 가라디오로부터하나의프레임을획득했을때그리고 MRFI 가그것이인증됐으면이함수를호출하게됩니다. 이것은수신 ISR 문맥내에서되어집니다. 최소한이함수는 MI_Recovery() 를적용하여새로운것으로유효한프레임을사용자공간으로복사되고그리고처리를위해

대기를합니다. 만약 ISR 줄기가이복사가끝나기전에 2 번째프레임이수신되고첫번째프레임은잃게됩가능성이있습니다. void MRFI_RxOn(void); This function sets the radio to receive mode. Currently it is used only at startup by the mrfi_link layer. When the radio wakes up it is in the state IDLE. This call puts it in the RECEIVE state. 이함수는수신모드로라디오를설정합니다. 현재그것은 mrfi_link 계층의의한시작에만사용됩니다. 라디오가깨어나서는아이들상태에있습니다. 이호출은 RECEIVE 상태로둡니다. void MRFI_SetLogicalChannel (uint8_t); This function sets the logical channel to the value specified as the argument. MRFI keeps a table of actual values to be written to the radio to accomplish the actual channel change. The argument is not the channel value itself but a logical channel number that is mapped to a tabled value actually sent to the radio. This table is instantiated at build time. The maximum allowed logical channel can be determined by subtracting one from the number of logical channels. 이함수는값을인자로지정된논리채널을숫자값으로설정합니다. MRFI 은라디오의실제채널변경을달성하기위해작성해야실제가치의테이블을유지합니다. 인자는그자체가채널값이아니지만라디오로보낸테이블화된실제값으로매핑된논리적채널번호입니다. 이테이블은빌드시에예를들어설명되고있습니다. 논리채널로허락된최대값은노리채널을수로부터 1 을뺌으로결정되어집니다. This is available from the following definition in mrfi.h : MRFI_NUM_LOGICAL_CHANS The discipline to accomplish the channel change, such as perhaps changing the radio through the correct state transitions, is owned by MRFI and is not a concern of the caller. 채널변경을성취하기위한훈련은, 아마도이러한올바를상태전환을통해라디오를변화로 MRFI 에의한소유를하고호출자에대한고려는하지않습니다. uint8_t MRFI_SetRxAddrFilter(uint8_t *); This function sets the address to be used as a filter value. Depending on the radio not all the bytes may be used as part of the native hardware filtering capabilities. Some of the actual filtering implementation may be in software. MRFI hides this partition and the caller does not know how the actual filtering is accomplished. 이함수는필터값으로사용되어질주소를설정합니다. 라디오에따라원래의하드웨어필터링능력의부분으로모든바이트가사용되어질수없습니다. 약간의실제필터링수행은소프트웨어네있습니다. MRFI 는이분활을숨기고어떻게실제필터링이성취되었는지를알지못합니다. void MRFI_EnableRxAddrFilter(void); When this call is made MRFI will subsequently filter out all received packets that do not match the address previously set. Broadcast packets are always received regardless of filter setting. 이호출이 MRFI 를만들면그다음에먼저설정된주소와일치하지않는수신된모든패킷은걸러냅니다. 방송패킷은필터설정에무관하게언제나수신됩니다. void MRFI_Sleep(void);

This call puts the radio into the sleep state. The call is synchronous in the sense that when it returns the radio in SLEEP state. To ensure reliable operation, this function must never be called from interrupt context. 이호출은라디오를수면상태로합니다. 호출은 SLEEP 상태에있는라디오가복귀할때감지에동기를합니다. 동작의신뢰성을보장하기위해이함수는인터럽트문맥으로부터절대로호출하지말아야합니다. void MRFI_WakeUp(void); This call takes the radio out of SLEEP state into IDLE state. The call is synchronous in the sense that when it returns the radio in IDLE state. 이호출은라디오를수면밖으로 IDLE 상태로취합니다. 호출은라디오가 IDEL 상태로복귀할때의미상으로동기입니다. 5.2.3 Packet Sniffer Capture The Texas Instruments Packet Sniffer is an indispensable tool when developing RF based applications. Using it for sniffing on IEEE 802.15.4 compliant devices like the CC2531 is straightforward as no configuration file is required. Simply select Channel 15 (0xF) and start. Sniffing on the CC1111 and CC2511 can be done by selecting the SimpliciTI protocol and selecting logical channel 0. TI 의패킷스니퍼는 RF 에기초한응용프로그램개발시절대필요한도구입니다. IEEE 802.15.4 를준수하는 CC2531 과같은장치탐지를위한사용은파일에요구되는구성없이바로진행합니다. 간단히채널 15(0xf) 선택하고시작합니다. CC1111 과 CC2511 에서탐색은 SimpliciTI 프로토콜과논리적인채널 0 을선택에의해서되어질수있습니다. 5.3 USB HID Example ( simple_hid ) This application demonstrates the use of the USB Dongle as a USB composite HID (Human Interface Device), with both keyboard and mouse. This application example uses the USB framework found in the USB firmware library [5] to configure the USB part of the device and to handle all USB standard requests. In addition, the Class requests required by the HID device class are implemented in a separate file. The radio communication between SmartRF board/em and the dongle is carried out using MRFI. Please see [9] or more information about the HID class. 이응용프로그램은하나의 USB 합성 HID( 휴먼인터페이스장치 ) 와함께키보드와마우스동글을사용하여보여줍니다. 이응용프로그램예제는장치의 USB 부분의구성과모든 USB 표준이요구하는 USB 프레임워크를 USB 펌웨어자료실 [5] 에서찾는데사용합니다. 추가로, 클래스요청은 HID 장치에의해요구된클래스는별도의파일에구현됩니다. SmartRF board/em 과동글사이에라디오통신은 MRFI 사용하여수행합니다. [9] 또는 HID 클래스에관한정보를참조하십시오.

5.3.1 Software Components The executables for the applications are located as follows: simple_hid_dongle.hex The file is located in ide\rfusb_cc1111\iar, ide\rfusb_cc2511\iar or ide\rfusb_cc2531\iar depending on the target device. simple_hid_eb.hex The file is located in ide\srf04_cc1110\iar, ide\srf04_cc2511\iar or ide\srf05_cc2531\iar depending on the target device. 5.3.2 Installing the Application, CC1111/CC2511 Attach the CC1110EM/CC2510EM to the SmartRF04EB and program it with the flash image simple_hid_eb.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). Connect the CC1111/CC2511 USB dongle to the other SmartRF04EB through the SOC_DEM and program it with the flash image simple_hid_dongle.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). 5.3.3 Installing the Application, CC2531 Attach the CC2530EM to the SmartRF05EB and program it with the flash image simple_hid_eb.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). Connect the the CC2531 USB dongle to the other SmartRF05EB and program it with the flash image simple_hid_dongle.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). It is also possible to use the CC Debugger for this purpose. 5.3.4 Running the Application Insert USB Dongle into a free USB port. The firmware will identify the USB Dongle as a composite HID with a keyboard and mouse. On most operating systems no extra driver is necessary; the OS will automatically load a standard driver for HID devices. Select the operating mode Mouse or Keyboard by operating the joystick left/right and confirm the selection using the S1 button, see Figure 7. USB 동글을 USB 포트에넣습니다. 펌웨어는 USB 동글을키보드와마우스와함께하나의합성 HID 로인식하게됩니다. 대부분의 OS 에서추가적인장치가필요하지않습니다 : OS 는 HID 장치에대한표준드라이버를자동으로로드하게됩니다. 동작모드를마우스도는키보드로선택을조이스틱조작을좌 / 우로그리고확인선택을 S1 버튼을사용하여선택합니다. 그림 7 을참조하십시오. Mouse Mode In mouse mode the joystick on the SmartRF04EB/SmartRF05EB can be used as a mouse. Push the joystick up/down/left/right to emulate mouse movement. The button "S1 " emulates the right mouse button, pushing the joystick emulates the left mouse button. SmartRF04EB/SmartRF05EB 에조이스틱을마우스모드로마우스처럼사용되어질수있습니다. 마우스동작처럼흉내내기위해조이스틱상 / 하 / 좌 / 우 fh 누릅니다. 버튼 S1 은마우스오른버튼처럼흉내냅니다, 조이스틱을눌러마우스왼쪽버튼처럼흉내냅니다.

Keyboard Mode In keyboard mode, the joystick operations and button hits transmit characters to the PC according to Table 4. 키보드모드에서, 조이스틱조작과버튼히트는문자를 PC 로테이블 4 에따라전송합니다. In order to observe the output from the HID example in keyboard mode it is recommended to open an editor like Notepad and make sure that the editor window has focus. Please observe that when pressing the joystick or S1 button, the letter will be transmitted as the button/joystick is released. 키보드모드에있는 HID 예제로부터출력을살피기위해노트패드같은에디터를오픈하는것을권장합니다그리고에디터윈도우가초점을가지는지를확인합니다. 조이스틱이나 S1 버튼을누를때관찰을합니다, 버튼 / 조이스틱을놓을때문자가전송되는지를. 5.3.5 Packet Sniffer Capture Figure 8 shows the radio traffic when operating the joystick left in mouse mode. The first byte of the MAC payload is the sequence number. The second byte is the frame type, where 7E identifies a data frame and 7F an ACK frame. The third byte is the in this case single byte payload. Frame 1 and 3 in the figure are data packets with the payload 45 and 42 respectively, i.e. the letters E and B. The source address of the EB is 25EB and the source address of the dongle is 25DE. 마우스모드에조이스틱좌측조작을했을때라디오통신을그림 8 에보여줍니다. 맥페이로드의첫번째바이트는순서번호입니다. 두번째바이트는프레임유형으로 7E 는데이터프레임을식별하고 7F 는 ACK 프레임입니다. 새번째바이트는이경우에단일페이로드바이트입니다. 프레임 1 과 3 그림에는데이터패킷페이로드각기 45 와 42 입니다, 즉문자 E 와 B 입니다. EB 의원본주소는 25EB 이고동글의원본주소는 25DE 입니다.

The mouse mode payload is decoded as shown in Table 5. Figure 8 gives an example of a mouse frame. Byte 4 of the MAC payload is decoded as 0xFF (-1) which means mouse left movement. Byte 2 identifies the frame as a mouse packet. There is no button activity (byte 3), and no activity on the Y (byte 5) and Z (byte 6) axis. The frames with 2-byte payloads are application ACK frames. 마우스모드페이로드는테이블 5 에보인것처럼풀이된다. 그림 8 은마우스프레임의실례를입니다. 맥페이로드의바이트 4 는 0xFF(-1) 와같이풀이되어마우스왼쪽움직임을뜻합니다. 바이트 2 는마우스패킷과같이프레임을인식합니다. 거기에아무버튼활동이없으면 ( 바이트 3), 그리고 Y( 바이트 5) 그리고 Z( 바이트 6) 축에아무활동이없습니다. 2 바이트페이로드프레임은응용프로그램 ACK 프레임입니다. The keyboard mode payload is decoded as shown in Table 6. An example of a keyboard frame is shown in Figure 9. Byte 4 of the MAC payload has the value 0x02 which means that the "SHIFT LEFT " button is pressed. This is hard-coded in the application for the purpose of this example. Byte 6 is 0x18 which corresponds to the letter 'u '. The capitalization is achieved through the key modifier, bit 1. 키보드모드페이로드는테이블 6 에보인것처럼풀이합니다. 키보드의한실례에서프레임은그림 9 에보여줍니다. 맥페이로드의바이트 4 는 0x02 값을가지고있고이 SHIFT LEFT" 버튼이눌러진것을의미합니다. 이것은응용프로그램에이예제의목적을위해서데이터를쉽게변경할수없습니다. 바이트 6 은 0x18 로문자 'u' 에일치하고있습니다. 대문자는키수정자를통해달성됩니다, 비트 1. 5.4 USB RF Modem Example ( rf_modem ) This application example is a wireless USB to serial port (RS232) converter. It creates a virtual serial port on the host operating system. Data sent to this virtual serial port will be transferred to the USB device over the PC s USB hub, then over the air to the CC1110/CC2510/CC2530EM and finally to a PC serial port via the SmartRF04EB/SmartRF05EB. 이응용예제는무선 USB 를직렬포트로변환하는것입니다. 그것은호스트 OS 시스템에가상직렬포트를생성합니다. 데이터를이가상직렬포트에 USB 장치를 PC 의 USB 허브를통해전송되며, 다음에최종적으로 PC 를 CC1110/CC2510/CC2530EM 의공기와시리얼포트를통해 SmartRF04EB/SmartRF05EB 를통해보냈습니다.

Hardware flow control for RTS is implemented. CTS is not supported directly by the CDC driver but is indirectly implemented by stopping the processing of USB requests when the RF modem is busy with processing the RF traffic. The radio link has CRC check and automatic retransmission for error free operation. RTS 위한하드웨어흐름제어가구현됩니다. CTS 직접 CDC 에서드라이버에의해지원되지않습니다, 그러나간접적으로의 USB 요청의처리를중지하여구현됩니다의 RF 모뎀은바쁜때는 RF 트래픽을처리합니다. 라디오링크는 CRC 를검사하고오류에대한자동재전송으로오류없는동작을합니다. This application example uses the USB framework found in the USB firmware library to configure the USB Dongle and to handle all USB standard requests. In addition, the class requests required by the CDC device class are implemented in a separate file. The radio communication between CC2530EM and the USB Dongle is done using the MRFI protocol Please see [10] for more information about the CDC class. 이응용예제프로그램은 USB 동글을구성하기위하여 USB 자료실에서 USB 펌웨어를찾아내고모든 USB 표준요청을처리하는데사용합니다. 추가로, 클래스요청은 CDC 장치클래스에의해요구된별도의파일에구현됩니다. CC2530EM 과 USB 동글사이에라디오통신은 MRFI 사용하여완료되고 CDC 클래스에관한자세한정보는 [10] 을참고하십시오. 5.4.1 Software Components The executables for the applications are located as follows: rf_modem.hex The file is located in ide\rfusb_cc1111\iar, ide\rfusb_cc2511\iar, ide\rfusb_cc2531\iar, ide\srf04_cc1110\iar, ide\srf04_cc2511\iar or ide\srf05_cc2531\iar depending on the intended target device. In addition, a setup information file (usb_cdc_driver_ccxxxx.inf) will be needed on Windows operating systems to associate the device with the operating system s driver for USB CDC-ACM class (usbser.sys). There are three files, one per USB dongle, located in the.\driver folder.

파일은 in ide\rfusb_cc1111\iar, ide\rfusb_cc2511\iar, ide\rfusb_cc2531\iar, ide\srf04_cc1110\iar, ide\srf04_cc2511\iar or ide\srf05_cc2531\iar 에의도하는대상에따릅니다. 또한, 정보설정파일 (usb_cdc_driver_ccxxxx.inf) 은 USB CDC-ACM 클래스 (asbser.sys) 를위한운영시스템과함께장치를연결하기위해윈도우즈 OS 에필요하게됩니다. 거기에는 3 개의파일이있습니다, 하나는 USB 동글,.\driver 폴더에있습니다. 5.4.2 Installing the Application, CC1111/CC2511 Attach the CC1110EM/CC2510EM to the SmartRF04EB and program it with the flash image rf_modem.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). SmartRF04EB 에 CC1110EM/CC2510 그리고플래시이미지 rf_modem.hex 으로프로그램합니다으로프로그램합니다, IAR EW 또는 SmartRF 플래시프로그래머를사용. ( 더맣은정보는 [1] 을참조하십시오 ). Connect the USB Dongle to the other SmartRF04EB through the SOC_DEM and program it with the flash image rf_modem.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). USB 동글을다른 SmartRF04EB 에 SOC_DEM 을통해연결하고플래시ㅣ미지 rf_modern.hex 으로프로그램합니다, IAR EW 또는 SmartRF 플래시프로그래머를사용. ( 위와동 ) 5.4.3 Installing the Application, CC2531 Attach CC2531EM to the SmartRF05EB and program it with the flash image rf_modem.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). SmartRF05EB 에 CC2531 그리고플래시이미지 rf_modem.hex 으로프로그램합니다으로프로그램합니다, IAR EW 또는 SmartRF 플래시프로그래머를사용. ( 더맣은정보는 [1] 을참조하십시오 ). Connect the CC2531 USB Dongle to the other SmartRF05EB and program it with the flash image rf_modem.hex, using IAR Embedded Workbench or the SmartRF Flash Programmer. (See [1] for more information). CC2531 USB 동글을다른 SmartRF05EB 에연결하고플래시이미지 rf_modern.hex 를프로그램합니다, IAR EW 또는 SmartRF 플래시프로그래머를사용. ( 위와동 ) 5.4.4 Running the USB Application Disconnect the programmed USB Dongle from the SmartRFEB/Programmer and plug it into a free USB port on the PC. 프로그램된 USB 동글을 SmartRFEB/Programmer 로부터연결을해지하고그것을 PC 의빈 USB 포트에꽂습니다. If using Microsoft Windows, the operating system will ask for a driver. Point to the file.\driver folder containing the usb_cdc_driver_ccxxxx.inf setup information files. 마크로소프트윈도우즈를사용하다면, 오퍼래이팅시스템은드라이버에대하여물을것입니다..\driver" 에폴더가담고있는파일 usb_cdc_driver_ccxxxx.inf 설치정보파일을가르치게합니다. When the USB-dongle is plugged in first time it will appear in Windows XP as in Figure 10. USB 동글이처음으로꽂으면그림과같이윈도우즈에나타날것입니다.

The Windows installation Wizard will now start and guide the user through the driver installation procedure. Please select Install from a list or specific location as shown in Figure 11. 윈도우즈설치마법사는시작하게되고사용자를드라이버설치진행통해안내합니다. 아래그림에보인것처럼목록또는지정위치를선택하십시오. Click 'Next ' to advance to the next step. Select "Search for the best driver in these locations " as shown in Figure 12. Make sure that the wizard searches the driver directory one level below the installation root. It is also possible to install the driver manually. This is quicker but the user runs the risk of installing the wrong driver. 진행을다음단계로가기위해서다음을클릭합니다. 그림 -12 에보인것처럼이위치에서최적의드라이버찾기를선택합니다. 마법사는설치루트한레벨아래드라이버디랙토리에서찾기를합니다. 그것은또한드랑버설치를수동으로하는것이가능합니다. 이것은빠르기는하지만잘못된드라이버를설치하는위험이있습니다. Click Next to advance to the next step. Windows will now search for the driver which may take some time (see Figure 13). 다음단계진행을위해다음을클릭합니다. 윈도우즈는드라이버를검색하는데약간의시간이걸리수있습니다. ( 그림 13 참조 ).

You are now likely to encounter the warning dialog shown in Figure 14. If that s the case you can safely click 'Continue anyway ' and the driver installation will be complete. 당신은그림 -14 에보인경공대화상자를만날수도있습니다. 그런경우에당신은신중하게 Continue anyway" 를 클릭하면드라이버설치를끝까지완료하게됩니다. When Windows have finished installing the device, a new serial port will show in the device manager in Windows. See Figure 15. 인도우즈가드라이버설치를종료했을때, 윈도우즈의장치관리자에새로운직렬포트를보여줍니다. 그림 -15 참조

The Virtual COM-port is now ready and can be used as any standard serial port. Note that the control line CTS (Clear To Send) will not be visible in terminal emulators or analysis tools which shows the state of this line - the CDC class does not make use of this feature. The green LED on the dongle is lit only when the PC asserts the RTS signal, in HyperTerminal this is equivalent to connecting. 가상의콤 - 포트는준비됐고어느일반표준직렬포트처럼사용되어집니다. 주의할것은제어라인 CTS(Clear To Send) 터미널에뮬래터에보이지않거나라인의상태를보여주는분석도구 -- CDC 클래스는이기능의사용을 하지않습니다. 동글에록색 LED 는 PC 가 RTS 신호를주장할때켜집니다, 하이퍼터미널에서이것은동등한 연결입니다. 5.4.5 Running the EB Application Connect the CC2510/CC1100EM to the SmartRF04EB and power it OR connect the CC2530EM to a SmartRF05EB and apply power. Select Device 1 by pushing button S1 LCD will then display Device 1 ready. Connect an RS232 NULL-modem cable between a COM-port on the PC and the serial port on the SmartRF04B/SmartRF05EB. Connect one HyperTerminal window to the Virtual COM port, and another HyperTerminal window to the COM port connected to the evaluation board. The port settings should be 38400 baud, 8 bits, 1 stop bit, no parity. Hardware handshaking must be enabled. You should observe text written in one HyperTerminal window appearing in the other as shown in Figure 16 and Figure 17. CC2510/CC1110EM 을 SmartRF04EB 에연결하고전원을넣거나 CC2530EM 을 SmartRF05/EB 에연결하고전원을 넣습니다. 버튼 S1-LCD 을눌러장치를선택하면 "Device 1 ready" 를표시합니다. RS232 NULL-modem 케이블을 PC 의 COM-port 와 SmartRF04/EB/~05EB 의직렬포트사이에연결합니다. 가상 COM 포트에하이퍼터미널 윈도우를연결하고, 그리고다른항퍼터미널윈도우를흉내낼보드에연결된 COM 포트에연결합니다. 포트 설정은 38400 보드, 8 비트, 1 스톱비트, 패리티없음으로설정합니다. 하드웨어핸드쉐이킹을반드시활성화

합니다. 당신은하이퍼터미널창에나타나는그림 -16 과그림 -17 에보인것처럼쓰여진텍스트를관찰합니다 5.4.6 Packet Sniffer Capture When typing single characters in the HyperTerm window the slow input speed means that each packet will only contain one byte of payload. Figure 18 shows the radio traffic when typing the letters 'EB ' in the terminal window connected to COM1. The first byte of the MAC payload is the sequence number. The second byte is the frame type, where 7E identifies a data frame and 7F an ACK frame. The third byte is the in this case single byte payload. Frame 1 and 3 in the figure are data packets with the payload 45 and 42 respectively, i.e. the letters E and B. The source address of the EB is 25EB and the source address of the dongle is 25DE. 하이퍼터미널윈도우에하나의문자를저속입력하면각패킷은단지 1 바이트의페이로드만패킷에담게 된다는의입니다. 그림 -18 은 COM1 에연결된터미널윈도우에문자 EB" 를입력할때라디오트래픽을보여 줍니다. 맥페이로드의첫번째바이트는순서번호입니다. 두번째바이트는프레임유형이고여기에 7E 는 데이터프레임식별이고그리고 7F 는 ACK 프레임을뜻한다. 3 번째바이트는이경우에단일바이트 페이로드입니다. 그림에서프레임 1 과 3 은페이로드가 45 와 42 인데이터패킷입니다. 예를들면 : E 와 B. EB 의 소스주소는 25EB 와동글의소수주소 25DE 입니다.

5.5 USB Firmware Library 5.5.1 Structure Texas Instruments LPRF provides a USB Firmware Library which contains all the basic USB firmware needed for application development. The firmware library handles the interface to the USB chip, handles endpoints, traffic flow, descriptor parsing and configuration. It also performs USB standard request processing. The USB Firmware Library consists of firmware common to all the three USB supported USB devices as well as some device specific low-level code. The USB Firmware Library does NOT contain any USB class specific components. It supports both vendor-specified device classes and standardized device classes such as HID and USB audio, with any number of configurations, interfaces, and alternate settings. The following features are provided: TI LPRF 는 USB 펌웨어자료실에는응용프로그램개발에필요한모든기본 USB 펌웨어를담아서제공합니다. 펌웨어자료실은 USB 칩에인터페이스처리, 종단처리, 통신흐름, 설명자의구문분석과구성포함합니다. 그 것은또한 USB 의표준요청처리를실행합니다. USB 펌웨어자료실은공통펌웨어로이루어져있어모든 3 USB 장치를지원할뿐만아니라로 - 레벨코드로특정한장치까지도지원합니다. USB 펌웨어자료실은어떤 특정한구성품은포함하지않습니다. 그것은벤더가지정하는장치급과표준화된장치급이를태면 HID 와 USB 라디오, 어떤인터페이스번호와함께구성하고, 인터페이스그리고대체설정을지원합니다. 다음과같은기증이 제공됩니다. Initialization of the USB peripheral unit, and response to reset-signaling on the bus. USB 주변장치유니트의초기화, 그리고버스에리세트신호에응답. Automated response to almost all standard requests, based on data from the USB descriptor set (the SYNCH_FRAME and SET_DESCRIPTOR requests must be handled by the application). 거의모든표준화된요정에자동화된응답, USB 설명자설정으로부터데이터기반으로함요청 (SYNCH_FRAME 및 SET_DESCRIPTOR 요청은반드시응용프로그램에의해서처리해야함 ). Automated setup of endpoint control registers, depending on the selected configuration and interface alternate settings. 종단위치컨트롤레지스터자동화된설정, 선택된구성에따르는대체설정인터페이스. All endpoint types are supported: Setup, bulk, interrupt and isochronous. 모든종단전유형은지원됩니다. An interface for responding to class and vendor requests. Both automated and manual data transfer is supported. 클래스와벤더요청에응답하기위한인터페이스. 자동화그리고수동양쪽데이터전환은지원됩니다. Endpoint access via a simple set of macros and functions. 매크로와함수의간단한설정을통해종점에액세스할수있습니다. Support for suspend mode and remote wake-up. 일시중지모드및원격시에깨우는대한지원. A function hook- and event-based interface allows for the framework to run from main, the USB interrupt, or a combination of both. 후크합수와이벤트기반인터페이스는메인으로부터실행하는프레임워크에대한, USB 인터럽트, 또는양쪽 조합을허용합니다. The library is generic. However, it does require some knowledge of the USB specification, including the concepts of configurations, interfaces and endpoints, different endpoint types, standard, vendor and class requests, and USB descriptor sets. Figure 19 shows how the USB firmware library is organized. 자료실은일반적입니다. 그러나그것은 USB 특성의약간의지식을요구하고, 구성의개념을포함하고,

인터페이스와종단점, 다른종단점의유형, 표준, 벤더와클래스요청, 그리고 USB 설면자설정. 그림 -19 는 USB 퍼웨어자료실은조직화되어있습니다. As shown in Figure 19 the USB library is divided into five modules: The USB Firmware Library contains all USB status information and functions for initialization, device reset handling, and transfers on endpoint 0. It also contains basic macros and functions for endpoint control and FIFO access. Vendor and class requests are passed up to the application, and standard requests further down for internal processing. The USB Standard Requests (usbsr) module contains automated processing functions for almost all standard requests. The automated handling and endpoint configuration relies on the USB descriptor set and two look-up tables. Requests that are not supported (SYNCH_FRAME and SET_DESCRIPTOR) or requests that are class specific are passed up to the application. The application is also notified upon important events, such as change in endpoint status or interface alternate settings. 그림 -19 에보인 USB 자료실은 5 개의모듈로나누어져있습니다 : USB 펌웨어자료실은모든 USB 상태정보및 초기화함수, 장치의재설정처리, 및종단점 0 에전송을담고있습니다. 그것은또한종단점제어를위한기초 매크로및함수그리고 FIFO 이용을포함하고있습니다. 벤더및클래스요청은응용프로그램으로전달되고, 그리고내부처리를위해표준보다더욱아래로요청합니다. USB 표준요청 (usbsr) 모듈은거의대부분의표준 요청에대한자동화된처리함수를담고있습니다. 자동화된처리및종단점구성은 USB 설명자설정및 찾아보기테이블에의존합니다. 지원되지않는요청은 (SYNCH_FRAME 및 SET_DESCRIPTOR) 또는 응용프로그램에전달된특정클래스요청입니다. 응용프로그램은이벤트중요도에따라, 종단점상태의변경또는 대체설정인터페이스와같은것을통지를합니다. The USB Descriptor Parser (usbdp) module provides a mechanism for locating standard-formatted USB descriptors. The user must provide a USB descriptor set, and two simple lookup tables - one for locating other descriptor formats, and another for setting up endpoint double-buffering. The necessary constant and structure definitions, and guidelines for writing compatible descriptor sets, are found in the USB Descriptor module. The USB Suspend (usbsusp) module provides easy to use, fully automated support for USB suspend, USB resume, and USB remote wakeup functionality. To implement USB suspend and USB resume the user only need to add a short piece of code to the main loop. USB remote wakeup is performed by a single function call.\

의 USB 설명자구문분석기 (usbdp) 모듈은표준형식의 USB의위치를설명하기위한메커니즘을제공합니다. 사용자는 USB 설명자설정, 및 2개의간단한찾아보기테이블 - 하나는다른설명자형식의위치에대한, 그리고다른하나는종단점의이중버퍼링설정에과한제공을합니다. 필요한상수및구조정의, 그리고설명자설정호환쓰기에대한지침은 USB 설명자모듈에서찾을수있습니다. 의 USB 일시중단 (usbsusp) 모듈에사용이편리, USB는, 및 USB 원격웨이크업기능을일시중지이력서 USB 용완전자동화된지원을제공합니다. USB의일시중지및 USB 재개는사용자가필요하면메인루프에짧은코드를추가하여구현합니다. USB 원격깨우기는단일함수호출에의해서실현됩니다. 5.6 USB Source Code Organization Figure 20 shows how the source code of the USB firmware library is organized. The common code is kept in the library directory and the device dependent code is place in sub-folders, one for each device. Note that the code for the CC1111 and CC2511 is identical; the device dependent code is shared in the folder CCxx11. 그림 -20 은 USB 펌웨어자료실에어떻게소스코드가구조화되어있는지를보여줍니다. 공통코드는자료실 디랙토리안에보관되어있고그리고장치에의존적인코드는하부폴더에입습니다, 각장치는하나의폴더가 있습니다. 주의할것은 CC1111 과 CC2511 은은동일합니다 ; 장치의종속적인코드는 CCXX11 폴더에공유 됩니다. The complete documentation of USB Firmware Library is available as a compressed HTML file, usb_firmware_library.chm found in.\docs folder. USB 펌웨어자료실의전체문서는 HTML 파일로압축되어입습니다, usb_firmware_library.chm found in.\docs folder. 5.6.1 Adapting the USB Application Although the USB Firmware Library will work as is for most applications it may in some cases be desirable to reorganize the way interrupts/events are handled. In the default configuration handling USB standard requests, USB class requests and USB data transfer is done in the main loop to keep interrupt processing time as brief as possible. The interrupt handler simply schedules events and passes these on to the main loop for processing. 비록 USB 펌웨어라이브러리가작동되지만대부분의응용프로그램에그대로있습니다어떤경우는이벤트를 처리하는방법은인터럽트를재구성하는것이바람직하다수있습니다. 기본구성의 USB 클래스요청및 USB 데이터전송의 USB 표준요청을처리하는메인루프에서가능한간단한인터럽트처리시간을계속수행됩니다.

인터럽트핸들러는단순히일정이벤트및처리를위해메인루프에이들을전달합니다. Simple round-robin scheduling is thus implicitly determined by the order in which the event processing is done. For more sophisticated pre-emptive schemes the choice is either to do more of the processing in an interrupt context or devise a method for pre-emptive scheduling in the main loop - it is beyond the scope of this document to describe in detail how either can be achieved. However, this section will give a brief outline on how to achieve immediate processing of time-critical code sections. Note that there is no need to modify the USB Firmware Library; the desired effect is achieved by moving code from the main loop to the USB interrupt hook. 단순한라운드 - 로빈스케줄은이벤트처리가완료된순서에의해서암시적으로결정됩니다. 더욱정교한선재계획 선택은인터럽트문맥에서처리더많이하거나주루프에선제스케줄을위한고안을합니다 -- 그것은이 문서의범위를넘어선어떻게달성할수있는지를자세하게설명을합니다. 하지만, 이섹션은시간에중요한 코드부분의즉각적인처리를어떻게달성할지에대한간략한개용를제공합니다. 주의할것은 USB 자료실을 수정할필요가없습니다. : 설명된효과는 USB 인터럽트연결에주루프에서코드를옮김으로달성되는 것입니다. The USB Firmware Library requires the application to provide a hook, usbirqhookprocessevents(), for events which needs immediate processing in an interrupt context. The applications described in this document do all their USB processing in the main context, this in effect gives the radio traffic priority over the USB traffic. Hence usbirqhookprocessevents() is just a stub in both applications. However, it is straightforward to move code from the main loop to the interrupt hook. USB 펌웨어자료실은응용프로그램이연결을제공하는, usbirqhookprocessevent(), 인터럽트문맥에서즉시처리 요구하는이벤트가필요합니다. 응용프로그램은주문맥에서모든 USB 를처리, 이사실은 USB 통신을통한 라디오통신우선순위를제공하는것을이문서에서설명됩니다. 그런이유로 usbirqhookprocessevents() 는양쪽 응용프로그램에단지스터브입니다. 그럼에도불구하고, 그것은인터럽트후크로주루프로부터코드를간단히 이동합니다. In the HID example the main loop processing is found in the file usb/class_hid/usb_hid.c. All the processing in done in the main loop, i.e. standard requests, vendor requests, class requests and data transfer. For the HID example this makes perfect sense as the data rates are very low. The hooks found in usb/class_hid/usb_hid_hooks.c. These are just stubs for this application. The stubs must be declared as the USB firmware library assumes that they are present. 메인루프처리파일의 USB / class_hid / usb_hid.c 발견되는 HID 의예제에서. 메인루프, 즉표준요청, 벤더 요청, 클래스요청및데이터전송을수행의모든처리. 이것이딱들어맞는 HID 의예를들어데이터속도가매우 낮은만큼. 의 USB 에 / class_hid / usb_hid_hooks.c 발견후크. 이들은단지이응용프로그램에대한 명세서입니다. 스텁은 USB 펌웨어라이브러리로선언해야합니다그들이존재하는것으로가정합니다. 주루프가처리하는 HID 예제에서 usb/class_hid/usb_hid.c 파일에서찾을수있습니다. 주루프에서완료된모든 처리는, 즉 : 표준요청, 공급자요청, 클래스요청및데이터전송입니다. In the CDC example the main loop processing is found in the file usb/class_cdc/usb_cdc.c. All the processing is done in the main loop, i.e. standard requests, vendor requests, class requests and data transfer. The hooks are found in usb/class_cdc/usb_cdc_hooks.c. Most of these are stubs, only the hooks for setting and reading control lines and port settings are implemented. Note that these are still processed by the main loop, the reason for implementing this functionality as hooks is that it is application dependent. CDC 예제에서주처리루프는 adc/usb_cdc.c 파일찾을수있습니다. 모든처리는주루프에서즉 : 표준요청,

공급자요청, 클래스요청및데이터전송이완료되어집니다. 후크는 usb/class_cdc/usb_hooks.c 에서찾을수있습니다. 이들대부분은스터브, 단지설정을위한후크및컨트롤라인을읽는포트설정이수행된것입니다. 참고로이것들은아직주루프에의해처리된, 이기능을실현하기위한후크로응용프로그램에종속하고있습니다. 5.7 USB Descriptors One of the challenges when developing USB firmware is to understand and work with USB Descriptors. Details can be found in the help file usb_firmware_library.chm found in the docs directory of this software distribution [5]. The USB class definitions ([9] and [10]) contain further guidelines on writing USB descriptor. USB developers should also visit http://www.usb.org/developers for more resources. USB 펌웨어를개발할때하나의도전은 USB 설명자와함께이해하는것입니다. 자세한것은도움말파일을 sub_firmware_library.chm 를배포판 [5] 소프트웨어의문서디렉토리에서찾을수있습니다. USB 클래스정의 ([9] 와 [10]) 는 USB 설명자작성에전향적인지침을담고있습니다. USB 개발자는더많은소스를위해서 http://www.usb.org/developers 를방문하십시오. 6 References [1] CC1110-CC1111DK CC2510-CC2511DK Development Kit User Manual (swru134) [2] CC2530DK Development Kit User Manual (swru208) [3] Texas Instruments SmartRF Studio (swrc046) [4] Texas Instruments SmartRF Flash Programmer (swrc044) [5] CC USB Firmware Library and Examples (swrc088) [6] Texas Instruments Packet Sniffer (swrc045) [7] CC1111/CC2511 USB Hardware User s Manual (swrc082) [8] CC2531 USB Hardware User s Manual (swrc221) [9] Device Class Definition for HID 1.11, US-IF Inc., 2001 (http://www.usb.org/developers/devclass_docs/hid1_11.pdf) [10] USB Class Definitions for Communication Devices 1.1, USB-IF Inc., 1999 (http://www.usb.org/developers/devclass_docs/usbcdc11.pdf) [11] SimpliciTI Installer (simpliciti.html) 7 General Information 7.1 Document History