typo3temp/GB/_4223dbddb0.jpg

Programming TCM 300 using EDK 300 - Video Transcription


Back

Video Snapshot Step & Description
1. Hi, welcome to the tutorial of writing a Hello World application for EnOcean Modules. Let us start with preparations.
2. In this example we will program a TCM 300 module. For this we need to connect it to an EVA Board that is connected through a programmer to your PC.
3. For this tutorial we need you to have DolphinStudio, DolphinAPI and the KEIL integrated development environment called micro Vision already installed.

KEILs micro vision is the recommended environment to develop source code for EnOcean modules. DolphinStudio provides an interface to create configuration schemes. It is recommended to connect these tools together. So let's do it.
a.)

b.)

c.)
4. In each Dolphin API example folder under profiles you can find DAT file that is used by DolphinStudio.
5. We customize the tool menu in KEIL and enter the given parameters.
6. Create a new tool menu entry.
7. Select the DolphinStudio executable. Enter the parameter that represents the project path. Check the Run Independent box and we are done.
8. Create the project in the DolphinAPI Examples folder.
9. With the DolphinAPI come many example projects that illustrate simple individual use cases. You are welcome to study them and use them. There is also a prepared template project, which can be copied and may serve as a template for every new project.
10. To create a new project, execute the copy template batch file.
11. Name the project
a.)

b.)
12. Now the new project is created. So let's see what the program is actually does.
13. In the standard template there is a simple source code that tog-gles the RSDADIO_3 PIN every half second and clears the watchdog timer. On the EVA board this PIN is connected to an LED so by toggling the PIN we should see the LED going on and off.
14. This source code can already be compiled, but first we select the right output target based on the modules radio frequency. Please select the one you are working with.
a.)

b.)
15. Now compile the code and download it to your module.
16. Congratulations your first program is running.
17. This was just downloading the existing template. Now let us add some value and add one more flashing led.

For the flashing led we can use the same command and toggle the ADIO_5 LED.
18. In DolphinStudio we can configure the Dolphin chip modules. For example the radio mod or the uart mod.
19. We want to change the direction of the ADIO_5 pin so let's go to the IO panel.
20. In the configuration file of your project set the ADIO_5 to output. Now your PIN has the right direction.
21. The configurations are saved in the DAT file. Save it!
22. DolphinStudio then generates the files we embed in our project and will configure the chip for us. Dolphin Studio generates the header file, the c file and assembler start up routine.
23. Save the configuration and switch back to KEIL.
24. The files are now up-to-date, let us see if we changed the direction.
a.)

b.)
25. Let's talk about the project workspace structure.

There are two main parts. Your application, where there are mainly all the application source codes, and the API part, where you can find the DolphinAPI and configurations file generated from DolphinStudio.
26. The radio settings file is module and frequency specific.
27. The postbuild.txt provides the information for the flash initializa-tion.
a.)

b.)
28. No compile the code and download it to your module.
29. Congratulations, you successfully toggled two LEDs.
30. This concludes this tutorial. Thank you for watching.

Back