Cypress CY4672 manuel d'utilisation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

Aller à la page of

Un bon manuel d’utilisation

Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation Cypress CY4672. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel Cypress CY4672 ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.

Qu'est ce que le manuel d’utilisation?

Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation Cypress CY4672 décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.

Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.

Donc, ce qui devrait contenir le manuel parfait?

Tout d'abord, le manuel d’utilisation Cypress CY4672 devrait contenir:
- informations sur les caractéristiques techniques du dispositif Cypress CY4672
- nom du fabricant et année de fabrication Cypress CY4672
- instructions d'utilisation, de réglage et d’entretien de l'équipement Cypress CY4672
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes

Pourquoi nous ne lisons pas les manuels d’utilisation?

Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage Cypress CY4672 ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles Cypress CY4672 et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service Cypress en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées Cypress CY4672, comme c’est le cas pour la version papier.

Pourquoi lire le manuel d’utilisation?

Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif Cypress CY4672, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.

Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation Cypress CY4672. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.

Table des matières du manuel d’utilisation

  • Page 1

    CY4672 Reference Design Guide Document # 001-16968 Revision ** Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl): 408.943.2600 http://www .cypress.com [+] Feedback[...]

  • Page 2

    2 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Copyrights Copyright s © Cypress Semiconductor Corpo ration, 2007. The information co n tained herein is subject to ch ange wi thout noti ce. Cypress Semiconductor Corporation assumes no res ponsi bility for the use of any circuitry other than circui try embodied in a Cypress produc[...]

  • Page 3

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 3 Content s 1. Introduct ion 9 1.1 Scope ..... ................ ................ ................ ................ ................ ................ ................. .....9 1.2 Chapter Overviews ............... ... ... .... ................ ................ ... ................ ....[...]

  • Page 4

    4 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Contents 3. Mouse 33 3.1 Introduction ............ ................ ............. ................ ................ ................. ................ ...... 33 3.1.1 Design Features ............... ... ... ... .... ... ... ... .... ... ................ ................ ...........[...]

  • Page 5

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 5 Contents 3.3.8 Initialization ................ ................ ................ ................ ................ .................... 47 3.3.9 Wireless Protocol Data Payload ........ ............ ................. ................ ................ 47 3.3.9.1 Packet Format 1......[...]

  • Page 6

    6 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Contents 4.3.6.10 KEYBOARD_TX_TIMEO UT ............... ................................ ............. 64 4.3.6.11 TIMER_CAL ................ ................. ................ ................ ................ ... 64 4.3.6.12 ENCRYPT_TEA ....... ................ ................ ..[...]

  • Page 7

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 7 Contents 5.3.4.5 Master Protocol ......... ................ ................ ................ ................ ....... 83 5.3.5 Application Code ..................... ................ ................ ................ ................ ....... 83 5.3.5.1 Bridge Module ..............[...]

  • Page 8

    8 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Contents 7. Regulatory T esting Results 10 5 7.1 Introduction ............ ................ ............. ................ ................ ................. ................ .... 1 0 5 8. Power Conside rations 10 7 8.1 RDK Keyboard .......... ................ ................. ...[...]

  • Page 9

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 9 1. Introduction 1.1 Scope This document wa s wr itten for firm ware and h ardwa re develop ers that want to und erst and and make modifications to the PRoC™ LP KB M Reference D esign Kit (RDK) . This document provide s a description of the ha rdware alon g with architecture and c[...]

  • Page 10

    10 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Introduction 1.4 Conventions The following are easily identifiable conven ti ons used throughout this user guide. 1.4.1 Definitions The following are some definitions of wor ds found in this document. There may be other me anings to these definitio ns outsi de of this document. Br[...]

  • Page 11

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 1 1 Introduction RDK reference design ki t; it is pr oduced by Cypress Semiconducto r and used by third parties to produce off-the-shelf products. Everything required to take a product to production is included in the kit. This document is part of the CY4672 Keyboard/ Mouse RDK RSSI [...]

  • Page 12

    12 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Introduction [+] Feedback[...]

  • Page 13

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 13 2. WirelessUSB™ Protocol 2.2 2.1 General Overview The WirelessUSB™ protocol 2.2 is desig ned to address 2-way Human Interface Devices (HID) as well as general pur pose devices; it provides reliable 2-way com munication be tween a wirele ss device configured as 1:1 (one HID and[...]

  • Page 14

    14 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 accommodate hundreds o f WirelessUSB de vices in the same sp a ce. Each bridge /HID p a ir must use the same PN code and channel in order to communi cate with e ach other . 2.1.3 Chip Error Correction In the presence of interference (or near the limits [...]

  • Page 15

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 15 WirelessUSB™ Protocol 2.2 2.1.7 Channel Selection Algorithm The channel selection algorithm pr oduces a subset cont ai ning 13 of the possible 78 channels. The channel selection algorithm is based on the netwo r k ID, with each channel in the subset being six megahertz from the [...]

  • Page 16

    16 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 Figure 2-3. Protocol Slave 2.2.1 Ping Mode (Bridge Only) Ping mode is used by the bridge to find an ava ilabl e channel; channels ar e unavailable if they are being used by another n etwork with the same PN code , or if there is excessive no ise on the [...]

  • Page 17

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 17 WirelessUSB™ Protocol 2.2 2.2.2 Idle Mode (HID only) The HID enters this mode after a power on re set before it has had any communi cation with the RDK bridge. If the bridge’ s MID is stored in non-volatile memory the HID retri eves the bridge ’ s MID, calcu- late the networ[...]

  • Page 18

    18 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 2.2.5 Enhanced KISSBind™ KISSBind provides the ability to aut omatically bind out of the box without any intervention by the user other than installing the ba tteries. KISSBind essentially is a bind process while in the data mode. The br idge g oes th[...]

  • Page 19

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 19 WirelessUSB™ Protocol 2.2 Figure 2-4. KISSBind T ransaction Sequence Master Slave KISSBind Request Ch N, PN 1 KISSBind Response Connection Request Auto ACK Auto ACK R X KISSBind Request Ch N + 1, PN 1 Master i s i n the connected state on Ch N+2 PN 3 KISSBind Request Ch N, PN 3 [...]

  • Page 20

    20 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 2.2.6 Unbind An ‘unbind’ mechanism allows the bridge and HIDs to return to the ir default unbind mode as if they had never boun d to any system before. The bridge dedicates a bind fla g to each device type that it sup ports. A bind flag is a 1-bit f[...]

  • Page 21

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 21 WirelessUSB™ Protocol 2.2 Figure 2-5. Back Channel T ransaction Sequence Bridge Device 1 Device 2 BCD=1 Auto ACK Data CRC Seed = A,A CRC Seed = !A,A CRC Seed = A,A CRC Seed = !A,A BCD=1 CRC Seed = A,A CRC Seed = A,A CRC Seed = !A,A CRC Seed = A,A Device 1 and brid ge do no t res[...]

  • Page 22

    22 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 2.2.9 Dynamic Data Rate and Dynamic P A Dynamic data rate and dynamic P A provide the abilit y to improve the immunity to interference and reduce power consump tion. Dynamic dat a rate is device behavior ba sed and two dat a modes, GFSK and 8DR, are use[...]

  • Page 23

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 23 WirelessUSB™ Protocol 2.2 2.3 Packet S tructures The first byte of each packet is the Header byte . Some packet s may consist only of the header byte while other pa cket s may contain up to five bytes. T ype[7:4 ]: The following packet types ar e supporte d: BIND_REQ (HI D) = 0x[...]

  • Page 24

    24 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 2.3.2 Bind Response Packet (Bridge) Byte 1 Packet T ype: 0 for bind reques t, 0xD for KISSBind request Device T ype: This is a 2-bit field that specifies a vend or-defined device type. This allows the bridge to determine HID type. Currently the followin[...]

  • Page 25

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 25 WirelessUSB™ Protocol 2.2 2.3.5 Ping Packet (Bridge) Byte 1 Packet T ype: 3 Flag (F): This is a 1-bit field that specifies a pi ng or pin g response (0 = Ping, 1 = Ping Response). 2.3.6 Data Packet/Back Channel Dat a Packet (Bridge and HID) Data packets are sent from the HID to [...]

  • Page 26

    26 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 2.4 Bind and Reconnect Timing When the bind button on the bridg e is pressed, the brid ge goes into b ind mode. In b ind mode, the bridge uses the bind ID to communicate with any HI Ds that want to bind to the system (see section Button Bind Mode on p a[...]

  • Page 27

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 27 WirelessUSB™ Protocol 2.2 Figure 2-6. Bind T iming Diagram The bridge uses the RSSI to determin e the noise level on the channel. If th e channel has become noisy , the bridge moves to ping mod e to find a quieter channel in it s channel subset. When the HID loses connection wit[...]

  • Page 28

    28 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 Figure 2-7. Reconnect T iming Diagram 2.5 Signature Byte The PRoC LP RDK uses the Signat ur e byte to determine if the HID has ever bee n bound to any bridge bef ore. If the HID has never bound to a bridge, the non-vola tile memor y used to store the si[...]

  • Page 29

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 29 WirelessUSB™ Protocol 2.2 2.6 Encryption WirelessUSB PRoC LP RDK support s T iny Encryption Algorithm (TEA) and Advanced Encryption S tandard (AES) 128 to encrypt a pplication data. Dat a packet s may be encrypted for privacy . All encrypted dat a packet s must have a p ayload o[...]

  • Page 30

    30 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 Figure 2-8. TEA Encryption Key Management 2.6.2 AES Encryption AES_Encrypt requires the tw o variables tx_p acket and AES_Key to be set prior to the call. Each contains a 16 byte (128 bit) value. At the completi on of the function tx_p acket has been en[...]

  • Page 31

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 31 WirelessUSB™ Protocol 2.2 2.6.2.1 AES Key Management The encrypt key is stored on the keyb oard and the decrypt key is stored on th e bridge dur ing co mpil- ing time. There is no dynamic encrypt key exchange in the runn ing time. 2.6.3 Encryption and Power Consumption T rade Of[...]

  • Page 32

    32 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** WirelessUSB™ Protocol 2.2 [+] Feedback[...]

  • Page 33

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 33 3. Mouse 3.1 Introduction This section describes the design goa ls, architectu re, firmware source cod e modules and configura- tion options for the PRoC™ LP mouse. It does no t cover the details of the radio subsystem or the configuration options that go with it. 3.1.1 Design F[...]

  • Page 34

    34 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse Figure 3-1. Bottom View Bind Button and On-Off Swi tch Figure 3-1 shows the bottom of the mouse with the opt ics window , power switch, an d Bind button . There are two screw holes above th e label. The top of the mouse ca n be removed once these two screws on the bottom and[...]

  • Page 35

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 35 Mouse 3.2.2 Hardware Block Diagram Figure 3-3. Mouse Hardware Block Diagram 3.2.3 Schematics All schematics for the optical wireless mouse are located in the following directory: <installation directory>HardwareMouse . The schem atic is in Adobe Acrobat format with the let[...]

  • Page 36

    36 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse test mode that is compatible with the Cypress Ma nufacturing T est Kit, use a shorting bl ock an d short together pins 4 and 5 before power is applied. 3.2.4 Hardware Considerations The mouse design uses the SS12 schottky diode (D1) and CDH531 00LC inductor (L3) for it s boo[...]

  • Page 37

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 37 Mouse the Device E ditor showing the user modu le mapping. Fu rther descr iption of reso urces and use r modules follow the diagram. Figure 3-5. CYRF69103 Device Arch itecture [+] Feedback[...]

  • Page 38

    38 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse 3.3.2.1 Global Configuration Following is a description of the Global Resources that are con figured for the CYRF69 103 PRoC LP Programma ble Radio on Chip. Care must be t ake n when modifying these valu es as they affect the user m odules dis cussed below . 3.3.2.1.1 CPU Cl[...]

  • Page 39

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 39 Mouse rupt API to this module is not used. See th e SPI Module on p age 40 for how this module is used to implement communication with multiple devices on the SPI bus. 3.3.2.3 Programmable Interval Timer Use r Module The Programmab le Interval T imer User Module is c onfigure d to[...]

  • Page 40

    40 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse The mouse firmwa re is p artitione d into two logi cal group s. The Common group is a collection o f code modules that provide the u nderlying support fo r th e application. This group pr ovides services such as radio pr otocol, ra dio driver , timing, polling , flash access[...]

  • Page 41

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 41 Mouse In the PRoC RDK mouse design, the master SPI co mmunicates with both the ra dio and optical sen- sor . Because the optical sensor do es not supports 3-wire SPI mode, the 4- wire mode is employed. In order to save the GPIO pin, the IRQ pin fu nction is multiplexed on to the M[...]

  • Page 42

    42 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse since the microc ontroller sleep fe ature is used. Al so, when polling is enabled, it is performed as a background task during the millisecond delay . This module also adjust s the tick advancement based up on the sleep resolution. T urning off the timer provides for more po[...]

  • Page 43

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 43 Mouse which it returns to the idle state. If the mouse is unable to deliver a packet while in this st ate, it transi- tions to the disconnected st ate. In idle state the optical sensor is allo wed to tr ansition th rough it s various rest mode s to conserve power . In this state, [...]

  • Page 44

    44 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse observing p acket dat a on a Listener , a correlation can be made with a USB p rotocol analyzer . This is useful for debugging dat a loss since the test mode guar antees packet delive ry . Entry to this test mode can be changed by modifyin g the macro TESTMODE_BUTT ONS in th[...]

  • Page 45

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 45 Mouse When z-wheel motion is detected, the mouse module is notified for collection an d reporting of the data; see Mouse Module on page 42 . 3.3.5.7 Battery Module The battery monitor circuit i s implemented u sing the Low V oltage Interrupt (L VI) on the LP radio. Fol- lowing is [...]

  • Page 46

    46 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse 3.3.6.5 MOUSE_CONNECT_A TTEMPT_TIMES This value sets th e attempt times for the mo use trying to connect to the bridge be fore entering the Briefcase Mode. The default va lue is 20. 3.3.6.6 PLA TFORM_H This configuration value identifies the header file th at has the pla t f[...]

  • Page 47

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 47 Mouse 3.3.6.14 KISS_BIND This configuration defin ition is used to selectivel y compile in the Enhanced KissBin d feature. See Enhanced KISSBind™ on page 18 for a description of Enhanced KissBind. The mouse can be un-bound by ho lding the right a nd middle buttons, and pr essing[...]

  • Page 48

    48 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse 3.3.9.1 Packet Format 1 When there is only X, Y delta dat a, the transmitted pa cket is two bytes. 3.3.9.2 Packet Format 2 When there is either z-wheel data or button da ta, then the transmitted p acket is th ree bytes. In the case where there is no X, Y delt a dat a, but th[...]

  • Page 49

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 49 Mouse The second portion is th e time b etween the st art of the ISR and th e post of the even t flag. For exam- ple, the motion interrupt takes 23 CPU clock cycles for this portion. Theref ore, the Latency2 equals to 1.917 µs for the 12 MHz CPU. Consequen tly , the total latency[...]

  • Page 50

    50 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Mouse 3.4.2 T ips and T ricks A couple of ways for working with the kit are th e following. 3.4.2.1 M8C Sleep When using the ICE-Cube, define the macr o PSOC_ICE so that busy wait s are used instead of the sleep instruction. Using the slee p instruction with the ICE-Cube gener ate[...]

  • Page 51

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 51 4. Keyboard 4.1 Introduction This section cover s the design goals, arch itectu re , firmware source code modu les and configuration options for the PRoC™ L P keyboard. It does not co ve r the details of the radio su bsystem or the con- figuration options that go with it. 4.1.1 [...]

  • Page 52

    52 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.2.1 RDK Keyboard Assembly Figure 4-1. Keyboard Plastic Figure 4-1 shows the RDK keyboard pla stic. Figure 4-2. Exploded Keyboard Figure 4-2 shows the keyboar d with the top removed. The radio/enCoRe II L V board (PDC-9265) is shown in the upper righ t hand corner . [+] [...]

  • Page 53

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 53 Keyboard Figure 4-3. Radio and PSoC Board (PDC-9265) Figure 4-3 shows the main co ntroller board with the en CoRe II L V and WirelessU SB™ LP Radio. All of the component s are on the top side of the board with the exception of the Bin d bu tton. Figure 4-4. Keyboard Battery Comp[...]

  • Page 54

    54 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard Figure 4-5. Bind Button Figure 4-5 shows the Bind button. 4.2.2 Schematic All schematics for the PRoC LP RDK keyboar d are located in the fo llowing directory: <installa- tion directory>HardwareKeyboard . The schematic is in Adob e Acrobat forma t with th e let- t[...]

  • Page 55

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 55 Keyboard 4.2.3 Keyboard Matrix The PRoC LP RDK keyboard matrix has 18 columns an d 8 rows. Key presses generate a GPIO interrupt when a column is connected (shorted ) to a r ow . The keyboa rd then scans th e matrix to determine which keys have been pressed. The RDK keyboard matri[...]

  • Page 56

    56 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.3 Firmware Architecture There are two archite ctural views of the keyboard. T he first is a microcontrolle r configuration view of user modules. This architecture and configur ation is best viewed in the PSoC Designer™ a pplication when the project is loaded. The seco[...]

  • Page 57

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 57 Keyboard Figure 4-6. Micr ocon troller Device Architecture [+] Feedback[...]

  • Page 58

    58 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.3.2.1 Global Configuration The following is a descri ption of the Global Resources that are configured fo r the CY7C60123-PVXC enCoRe II L V microc ontroller . Care must be take n when modifying these values as they affect the User Modules discus se d be low . CPU Clock[...]

  • Page 59

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 59 Keyboard V Reset This parameter is set to 2.6V . W atchdog Enable This par ame ter should be set to Enable, but may be set to Disabl e for debug purpose s. 4.3.2.2 SPI Master User Module The SPI Master User Module is used to communica te with the radio transceiver . The radio tran[...]

  • Page 60

    60 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.3.3 Model Figure 4-7. Firmware Ar chitecture Mo del The keyboard firmware is p artitioned into two logical group s. The Common group is a colle ction of code modules that provide the underlying support fo r the application. This group p rovides services such as, radio p[...]

  • Page 61

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 61 Keyboard 4.3.4.3 Protocol Module The protocol module defin es and implement s the laye r used to deliver packets from the devic e to the bridge. It manages the binding of devices to a bridge as well as the connection and interfer ence immunity by channel hopping. T his module has [...]

  • Page 62

    62 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard In idle st ate the MCU and radio go to sleep to save powe r , and the keyboard application remains waiting for input from the keys or Bind button. The timer is turn ed of f to conserve power . This sta te is maintained indefinitely un til a key str ok e or a but ton pre s[...]

  • Page 63

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 63 Keyboard The first test mode is initiated by holding down the left Ctrl, lef t Alt, right Alt, right Ctrl, and F1 keys at the same time. If P ANGRAM_TEST_MODE is define d, the test sends the key up/down scan codes for the test pangram: ”a quick brown fox jumps over the lazy dog.[...]

  • Page 64

    64 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.3.6.5 KEYBOARD_TEST_MODES This configuration definition is used to selectively compile code for keyboard test modes. If this value is defined, then test modes are comp iled into the ex ecutable image. If it is not defined, then the test mode code is omitte d. The test m[...]

  • Page 65

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 65 Keyboard manufacturing test code may be executed by holding the system sleep key and the Bin d button when the batteries are inserte d into the keyboard. 4.3.6.16 MFG_TX_MODES When the MFG_TEST_CODE is defined, the definitio n of this name adds in a carrier and ran dom data TX tes[...]

  • Page 66

    66 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard The keyboard scan matrix is defined in kdefs.h and may ne ed to be changed for dif f erent keyboa rds. Porting the code to another micropro cessor archit ecture requ ires modification or leve rage of the existing code for processor specific featur es, along with pin defin[...]

  • Page 67

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 67 Keyboard done to optimize th e packet size based on the fact that the most common rep ort has only one non- zero scan code withou t a modifier . The full S t an dard 101 Keys report fo rmat is shown in Ta b l e 4 - 5 . Example The following report s is sent if a user presses an ?[...]

  • Page 68

    68 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.3.9.1.2 Multimedia Keys (Hot keys) Report An Application Report He ader of 0xFF indicates tha t this report is a Mult imedia Keys report. The Multimedia Keys report format is shown in T able 4-10 . Example The following report s is sent if a user presses the ‘V olume [...]

  • Page 69

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 69 Keyboard Example The following re ports a re sent if a user pre sses the Suspen d/Sleep (Power Key 0 ) key on the key- board. The Suspend/Sleep down key p acket sent from the keyboa rd to the bridge is shown in Ta b l e 4 - 1 4 . The up key p acket sent from the ke yboard to the b[...]

  • Page 70

    70 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard Example of a Battery V oltage Leve l report with fully charged batter ies is shown in Ta b l e 4 - 1 8 . Example of a Battery V oltage Leve l report with low batteries is shown in Ta b l e 4 - 1 9 . 4.3.10 Ghost Key Detection Ghost keys are possible on the RDK keyboard be[...]

  • Page 71

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 71 Keyboard The interrupt latency includes two portions. The firs t portion is the time betwee n the assertion of an enabled interrupt an d the start of it s ISR, whic h can be calculated using the following equation: Latency1 = T ime fo r current instru ct ion to finish + T ime for [...]

  • Page 72

    72 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.4 Modifying the Keyboard Matrix or Adding New Keys The curren t keyboard ma trix with the USB scan codes are sho wn in T able 4-1 on page 55 . Custom- ers may modify the keyboard matrix o r they may add new keys to their keyboar d. The following sec- tions explain the p[...]

  • Page 73

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 73 Keyboard 4.5 Development Environment This section informs you about the tools y ou ma y need and present s ideas you can try . 4.5.1 T ools See the CY4672 Getting S tarted Guide for a list of tools r equired to build and debug the keyboard application. Figure 4-9. RDK Keyboard wit[...]

  • Page 74

    74 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Keyboard 4.5.3 Critical T est Point s Figure 4-10. RDK Keyboard T est Points CLKOUT PACTL MISO MOSI nSS SCK IRQ [+] Feedback[...]

  • Page 75

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 75 5. Bridge 5.1 Introduction This section cover s the design goals, arch itectu re , firmware source code modu les and configuration options for the PRoC™ LP bridge. It does not cover the det ails of the radio subsystem or the co nfig- uration options that go with it. 5.1.1 Design[...]

  • Page 76

    76 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge 5.2.1 Bridge Photographs Figure 5-1 shows the top sid e of the RDK bridg e board. Th e side button on the board is the Bind bu t- ton. Figure 5-1. RDK Bridge T op Figure 5-2 shows the bottom side of the RDK bridge bo ard. Figure 5-2. RDK Bridge Bottom 5.2.2 In-System Progra[...]

  • Page 77

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 77 Bridge Figure 5-4 shows the PRoC LP RDK bridge connected with a USB adapter bo ard to a PSoC Mini- Prog. Figure 5-4. RDK Bridge with USB Adapter and PSoC MiniPr og 5.2.3 Schematics The PRoC LP RDK bridge schematics an d Gerber files are located in the following directory: <inst[...]

  • Page 78

    78 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge 5.3 Firmware Architecture There are two architectura l views of the bridge. Th e first is a micro controller configuration view of User Modules inside th e controller . This architectu re and con figuration is best viewed in the PSoC Designer application when the pr oject i[...]

  • Page 79

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 79 Bridge Figure 5-5. CYRF69213 Device Arch itecture [+] Feedback[...]

  • Page 80

    80 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge 5.3.2.1 Global Configuration The following is a descriptio n of the Global Re sources that are con figured for the PRoC LP CYRF69213. Be very careful whe n modifying these valu es as they affect the User Modules dis- cussed below . CPU Clock This parameter is set to Interna[...]

  • Page 81

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 81 Bridge VReg This parameter is set to Disa ble, and the VReg will be enabl ed in the application code. V Keep-alive This parameter is set to Disable. W atchdog Enable This par ame ter should be set to Enable, but may be set to Disabl e for debug purpose s. 5.3.2.2 SPI Master User M[...]

  • Page 82

    82 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge 5.3.3 Model Figure 5-6. Firmware Ar chitecture Mo del The bridge firmware is p a rtitioned into two logica l gr oup s. The Commo n g roup is a collection of code modules that provide the u nderlying support fo r th e application. This group pr ovides services such as, radio[...]

  • Page 83

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 83 Bridge 5.3.4.1.2 USB HID Class Module ( USB_1_cls_hid. asm ) The additional user code provides sup port for the Battery Level and Link Quality software applica- tion. 5.3.4.1. 3 1 Millis econd In terval Timer Interrupt Module ( MSTIMER.asm ) The additional user code decrem ents ap[...]

  • Page 84

    84 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge duration elap ses with no change in report dat a (see the HID S pecification for more informa tion on this topic). The check_usb_idle() function also checks the timeout for down key and ‘keep alive’ p acket. A ‘keep alive’ packet is transm itted every 65 ms during t[...]

  • Page 85

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 85 Bridge 5.3.6 Configuration Options All configuration options for the application can be found in the config.h file, and some of them are defined in the Project > Setting > Compiler > Macro define s. Each optio n is explained below and can be changed to values that meet th[...]

  • Page 86

    86 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge 5.3.6.10 BACK_CHANNEL_SUPPOR T This configuration definition is us ed to selectively compile in the Ba ck Channel Dat a Suppo rt feature. See section Back Channel Dat a Support on page 20 for a description of Back Channel Data Sup- port. 5.3.6.1 1 MASTER_PROTOCOL This confi[...]

  • Page 87

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 87 Bridge 5.3.7 Platform and Architecture Port ability The bridge firmware was designed to use the hard ware features of the PRoC LP such as USB. Porting the co de to another m icroproce ssor archit ecture m ay require modificatio n of the existing code to support the dif ferent proc[...]

  • Page 88

    88 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge 5.3.12 Code Performance Analysis A keyboard rep ort process ing is used to an alyze the code performance. A typical keyboard report processing con tains the fo llow ing steps: ■ The bridge receive s the keyboard report packet and process the packet. This step takes 108 µ[...]

  • Page 89

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 89 Bridge 5.4.1.1 Device/Config De scriptors Figure 5-7. USB Device/Config Descrip tors 5.4.1.2 Keyboard HID Report Descriptor The keyboard HID report descripto r defines a Bo ot Protocol keyboard. This en ables a PRoC LP RDK keyboard with the PRoC LP RDK b ridge to wo rk on dif fere[...]

  • Page 90

    90 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge Figure 5-8. Keyboard HID Report Descr i ptor (Endpoi nt 1) 5.4.1.3 Mouse/Keyboard HID Report Descriptor The mouse/keyboard HID Report Descri ptor uses repo rt protocol form at with a unique report ID fo r each report. Mouse dat a uses Report ID 1. The mouse report include d[...]

  • Page 91

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 91 Bridge Figure 5-9. Mouse HID Report De sc riptor (Report ID 1 – End point 2) Keyboard multimedia keys use Repo rt ID 2. Figure 5-10. Keyboard’ s MM Keys HID Repo rt Descriptor (Report ID 2 – End point 2) [+] Feedback[...]

  • Page 92

    92 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge Keyboard pow er keys use Report ID 3. Figure 5-1 1. Keyboard’s Power Keys HID Report Descr iptor (Report ID 3 – End point 2) Report ID 4 is used to send the mous e battery leve l and link quality report. Figure 5-12. Mouse’ s Battery/Link Quality Report Descriptor (Re[...]

  • Page 93

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 93 Bridge Report ID 5 is used to send the keyboard ba tte ry level and link quality report. Figure 5-13. Keyboard’s Battery/Link Qualit y Report Descript or (Rep o rt ID 5–En dpoint 2) 5.4.2 Keyboard Report Format The keyboard stan dard keys information is sent to the h ost PC vi[...]

  • Page 94

    94 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge Figure 5-14. Keyboa rd Report Format Figure 5-15. Multimedia and Power Keys Re port Format Right GU I R ight Alt Right Ctrl Right Shif t Left Alt Left GU I Left Ctrl Left Shif t Re s e r v e d Standar d Key 1 Standar d Key 2 Standar d Key 3 Standar d Key 5 Standar d Key 4 S[...]

  • Page 95

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 95 Bridge 5.4.3 Mouse Report Format The mouse dat a is sent over the data endpoint 2 u s ing Report ID 1. The forma t of the mouse r eport is shown below: Figure 5-1 6. Mouse Report For mat 5.4.4 Battery Level and Link Quality Reports The PRoC LP bridge implemen ts a mechanism to rep[...]

  • Page 96

    96 CY4672 Reference Desig n Gui de, Document # 001-16968 Revision ** Bridge The RadioParams Report is 8 bytes long and has the 6 d ata fields listed in Ta b l e 5 - 4 . 5.4.4.1 Requesting a New Battery Reading When the B ridge receives a control endpoint req uest from the host with the following parameters, it returns an 8-byte RadioParams report o[...]

  • Page 97

    CY4672 Reference Design Guide, Docu me nt # 001-16968 Revision ** 97 Bridge 5.4.5 Example USB Bus Analyzer (CA TC) T races Figure 5-17 below shows the USB data transmissions between the bridge and the ho st PC captured with the USB CA TC Bus Analyzer . In this example, the Right Shift + ‘g’, ‘h’ keys were typed followed by the ‘V olume Up[...]

  • Page 98

    98 CY4672 Reference Desig n Guide, Document # 001-1696 8 Revision ** Bridge Figure 5-18 below shows the mo use data being tr ansferred between th e bridge and the host P C. The first part of th e tra ce shows the mouse da ta when the lef t button was pressed and held down as the mouse was moved, and then the lef t button wa s released. The secon d [...]

  • Page 99

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 99 Bridge Figure 5-19 shows the Sleep key being pr essed. Note the p ower key report s are sent via end point 2 and Report ID 3. Figure 5-19. Example Keyboard CA TC T race (Power Key) Figure 5-20 below shows the Get_Report request s used to retrieve the keyboard and mouse battery lev[...]

  • Page 100

    100 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Bridge 5.5 Development and Debug Environment Information on the tools require d and tips on using thos e tools are presented in this section. 5.5.1 T ools See the CY4672 Get ting S tarted Guide for a list of tools r equire d to b uild and d ebug the br idge appli- cation. Figure 5-[...]

  • Page 101

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 101 6. Manufacturing T est Support, MTK 6.1 Introduction The Manufacturing T est Kit (MTK) provides producti on line test suppor t in addition to pr oviding FCC certification tests. This section pr ovides a descriptio n of the T ester serial protocol, the RF protocol between the MTK [...]

  • Page 102

    102 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Manufacturing T est Support, MTK Every serial command issu ed by the PC is returned with a response onc e the command is comple te. The valid response s are shown in Ta b l e 6 - 2 . All serial commands must e nd in either a carr iage return or ca rriage return and line feed. All r[...]

  • Page 103

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 103 Manufacturing T est Support, MTK 6.4 MTK RF Protocol Command packe ts received by the Device-Under-T est (DUT) are ‘ech oed’ with the addition of an added byte that cont ains the count of invalid bits for the received p acket. Extra bytes in packet s that are larger than what[...]

  • Page 104

    104 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Manufacturing T est Support, MTK [+] Feedback[...]

  • Page 105

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 105 7. Regulatory T esting Result s 7.1 Introduction The PRoC™ LP RDK leverages the r egulatory work do ne for the CY4636 RDK. The CY4 636 LP mouse was tested in a certified lab and meet s FCC p art 15, Subp art B, T itle 47 CFR–Unintentional radiators, FCC Part 15 Subp art C–I[...]

  • Page 106

    106 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Regulatory T esting Results [+] Feedback[...]

  • Page 107

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 107 8. Power Considerations 8.1 RDK Keyboard 8.1.1 Usage Model The following usage model are co nsidered for the RDK keyboard . ■ 4 hours per day of 6 keystrokes per second, 5 days per week. ■ 24 hours pe r day with no activity , 2 days pe r week. ■ A packet is transmitted on b[...]

  • Page 108

    108 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Power Considerations 8.1.3 Battery Life Calculations The following t able shows the times spent i n each state by the RDK keybo ard usage model. By sub- stituting the current measuremen ts in section Curr ent Measurement s on page 107 , the overall aver - age Icc for RDK keyboard c[...]

  • Page 109

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 109 Power Considerati ons 8.2.2 Current Measurements The following is the result s of RDK mouse current measurem ent: 8.2.3 Battery Life Calculations The following table show s th e tim es sp en t in ea ch state by the RDK mouse usage model. By substi- tuting the current me asurement[...]

  • Page 110

    1 10 CY4672 Reference Desig n Guide, Document # 001-1696 8 Revision ** Power Considerations [+] Feedback[...]

  • Page 111

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 1 1 1 9. Sof tware Guide 9.1 Introduction This sect ion descr ibes the softw are sour ce code mod ules used i n order t o communicat e with the PRoC™ LP bridge HID device to obtain the cu rrent radio p arameters for the att ached Wire- lessUS B™ LP dev ices. It does no t cover th[...]

  • Page 112

    1 12 CY4672 Reference Desig n Guide, Document # 001-1696 8 Revision ** Software Guide 9.2.1.1 CHidDevice Class Methods T able 9-1. CHidDeviceClass Methods Method Ty p e Description OpenHidDevice () Public This method sets appropriate access rights, attempts to open a han- dle to the HID device, obtains the top collection data, and makes a call to s[...]

  • Page 113

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 1 13 Software Guide 9.2.1.2 CHidManager Class Methods T able 9-2. CHidManagerClass Methods Method Ty p e Description Create() Public This method create s an invisible wind ow and uses t he returned win- dow handle to register f or HID device notifi cation events, then it cre- ates a [...]

  • Page 114

    1 14 CY4672 Reference Desig n Guide, Document # 001-1696 8 Revision ** Software Guide 9.2.2 System T ray Module The System T ray module defines the CCySysTray class which provides the interface to the system tray for the application. This module is not expe cted to require any modification, however all source code is pro vided for re ference. 9.2.2[...]

  • Page 115

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 1 15 Software Guide 9.2.3 WirelessUSB System T ray Application Module The WirelessUSB System Tr ay module is the main s ystem tray application. This module places the icon on the system tray bar , manages the HID devi ces, displays pop up messa ges, and c ontr ols th e WirelessUSB S [...]

  • Page 116

    1 16 CY4672 Reference Desig n Guide, Document # 001-1696 8 Revision ** Software Guide 9.2.3.2 CMainFrame Class Methods The CMainFram e class is the Vi sual C++ generated fi le that is a derived frame-window class for the system tray application's main frame window . This class has been modified to also perfor m the timer based polling of the P[...]

  • Page 117

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 1 17 Software Guide 9.2.3.3 CWirelessUSBS tatusPropertyPage Class Methods The CWirelessUSBS tatusPropertyPage class is th e Vi sual C++ generated file that impleme nts the WirelessUSB Device S tatus Property Page, a u nique property p age is create d for each WirelessUSB device enume[...]

  • Page 118

    1 18 CY4672 Reference Desig n Guide, Document # 001-1696 8 Revision ** Software Guide 9.2.3.5 CHidT rayDevice Class Methods The CHidT rayDevice class is derived from the CHid Device class and is the class used to interface with WirelessUSB devices. 9.2.3.6 CHidT rayManager Class Methods The CHidT rayManager class is derived fr om the CHidManager cl[...]

  • Page 119

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 1 19 Appendix A. References CY4672 Getting S tarted PSoC Designer™ version 4.3 document ation CY3631 Manufacturing T est Kit Device Class Definition for Human Interface Devices (HID) ( http://www .usb.org/developers/hidp age ) Avag o ADNS-3040 Low Power Optical mouse Sensor Dat a S[...]

  • Page 120

    120 CY4672 Reference Design Guide, Document # 001-16968 Revision ** [+] Feedback[...]

  • Page 121

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 121 Index Numerics 1 millisecond interva l timer user module 81 A acronyms 10 advanced encryption standard 29 decrypt key 31 encrypt key 31 AES See advanced encryp tion standard AES encryption 30 application code 83 architecture keyboard 51 AutoACK 14, 27 automatic acknowledgment 14 [...]

  • Page 122

    122 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Index firmware architecture model 82 flash security 81 H hardware bridge overview 75 keyboard overview 51 mouse overview 33 RDK keyboard assembly 52 HID See human int erface devices human interface d evices 13 I idle mode HID only 17 initialization of the PRoC LP chip 87 K keyboard[...]

  • Page 123

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 123 Index connect request 24 connect response packet (bridge) 24 ping packet (bridge) 25 ping mode bridge only 16 platform and architecture portability 87 PN code See pseudo noise codes power considerations RDK keyboard 107 RDK mouse 108 PRoC LP bridge architecture 75 PRoC LP keyboar[...]

  • Page 124

    124 CY4672 Reference Design Guide, Document # 001-16968 Revision ** Index [+] Feedback[...]

  • Page 125

    CY4672 Reference Design Guide, Do cument # 001-16968 Revi sion ** 125 Revision History Document Revision History Document Title: CY467 2 Re fer ence Design Kit Guide Document Number: Revision ECN# Issue Date Orig in of Change Description of Change 1.0 10/3/06 ARI New document. The Beta copy of th is manual was in Word. Convert ed to Framemaker temp[...]

  • Page 126

    126 CY4672 Reference Design Guide, Document # 001-16968 Revision ** [+] Feedback[...]