![IQRF DS-DPA-02 Скачать руководство пользователя страница 9](http://html1.mh-extra.com/html/iqrf/ds-dpa-02/ds-dpa-02_quick-start-manual_2089836009.webp)
QUICK START
C-programming
Programming in C language is needed:
•
When DPA is used and given ready-to-use hardware profile has to be extended by a user-specific Custom DPA handler.
•
When the application is written under IQRF OS, without DPA.
Programming in C language is not needed when DPA is used and some existing Custom handler is to be used or no
Custom handler is required at all.
If DPA is used, once the hardware profile is uploaded, it is not necessary to upload it any more when just the Custom
DPA handler is changed.
The Startup Package contains a demo Project, either for DPA (
HWP-demo
) or non-DPA (
E00-START
) approach and a
series of examples in the
Examples/
subdirectories to be utilized as needed:
1.
Using a ready-made example
(without modifications): Add a
.HEX
file to the Project and upload it into DCTR
module plugged in CK-USB-04A by the
F5
key (
Programming/Upload
). (This must be enabled in the Project
window.)
2.
Using an example with possible modification:
Add a source program (with the
.C
extension) to the Project,
make modifications by editing (if desired) and compile it from the C language to the
HEX
format by the
F10
key
(Project/Build Target).
Upload resulting .
HEX
file similarly as in the case 1 above.
3.
Creation of a new program:
Use the
CustomDpaHandler-Template.c
or
Template.c
empty source file
and continue similarly as in the case 2 above.
Refer to the IQRF IDE Help to learn about configuring the Project.
Design steps
1. Plug the TR into CK-USB-04A kit and run IQRF IDE.
2. Open a new Project (
Project/New Project
) and specify TR module type
(Project/Properties/TR Module).
3. If you do not intend to modify or display a source code but to upload an existing code only, add required
.IQRF
or
.
HEX
file to the Project
(Project/Add Existing Item)
and go to step 7.
4. Add required source file (one of examples, e.g.
CustomDpaHandler-Timer
,
E09-LINK.c
or empty template
CustomDpaHandler-Template.c
or
Template.c
to the Project
(Project/Add Existing Item)
.
5. Make possible modifications and save them then (in the text editor).
6. Compile the program by the
F10
key
(Project/Build Target)
. If any error is reported by the compiler, go to step 5 to
correct it. The result is a compiled code in the
.HEX
format stored in the Project.
7. Program the code into the module by the
F5
key
(Programming/Upload).
8. After uploading the application is just invoked. It is possible to debug it by the IQRF IDE. See chapter
Debug
below.
9. Then the transceiver can be carried e.g. to another development kit or to an end user equipment.
Typical repeated “loop” during development is:
Edit
,
Save
(Ctrl+S),
Compile
(F10),
Upload
(F5),
Debug
.
Refer to chapter
DPA
for detailed step by step instructions for DPA usage without programming..
Refer to the
IQRF Video tutorial set
and
IQRF IDE training video
.
Caution:
The TR module can be plugged / unplugged into / from the SIM connector while powered off only.
Tip:
In case of CK-USB-04A the SW2 pushbutton (the one closer to SIM connector) can be used for this. The TR
module is not powered while the SW2 pushbutton is held.
Note:
The IQRF IDE reports a state of the TR module at the bottom bar of the main IDE window. T he
SPI not active
message need not mean a missing or damaged TR. It is issued if SPI communication is not activated which depends
on the application running in the module. SPI communication can be forced by switching the TR module in the
programming mode by
F6
key
(Programming/Enter Programming Mode).
The application in the TR module is not
running in the programming mode.
© 2015 MICRORISC s.r.o.
www.iqrf.org
Quick_Start_Guide_IQRF_ 150805
Page 9