In the last post, we started to examine the module guides by using the AGT module guide as an example. We saw that each module guides provides developers with important information such as:
This basic information helps a developer to understand the module and the pieces necessary to make it work. While this is important, the module guide also provides developers with an example application project one that can be used as a starting point for a new design. This is what we will be examining in this post.
Once a developer gets to section 7, it’s time for them to get their hands dirty. It’s time to import the application project that is provided with every module guide. Each application project is packaged with the import application note so this is the best place to start if you don’t know how to import a Synergy project. For now, I’ll assume you are able to import a project into the environment.
Section 7 is critical to understanding the application example. It starts out by providing an overview on what the application is going to do. This can be seen below in Figure 1.
Figure 1 – The Application Project Overview
Each application project is going to have its own requirements for the software and hardware that is necessary to run the application project. This information follows the overview and an example can be seen in Figure 2. Not all resources are required to run the project. For example, Figure 2 shows both e2 Studio and IAR EW for Synergy. A developer can choose which of these they want to use.
Figure 2 – Software and Hardware Resource Requirements
Once a developer understands the software and hardware that they need to run the example, section 7 provides them with an application flowchart so that they can easily follow along with the code. An example for the AGT module can be seen in Figure 3.
Figure 3 – AGT Application Flowchart
Getting a module to behave properly is dependent upon the configuration settings for the module. This information is also provided in section 7 and details the setting for each configuration item. Figure 4 shows how the agt_0 and agt_1 modules are configured.
Figure 4 – Application Module Configuration Values
Finally, section 7 finishes up with a description on how the pins are configured along with a code “walk through” that describes the key elements of the code, such as, initialization. API’s use and the application control flow. Typically, the reader would have the code open in the ISDE and follow along with the module guide description. This should provide the detailed knowledge the developer needs to create their own application using the illustrated capabilities. Thus, the application project serves more as an illustration of one implementation- something the reader can learn from and then apply to their own custom design. It would help set expectations and clarify the ‘use model’. This description, for the AGT application project, can be seen in Figure 5.
Figure 5 – Application Project Pin and Run-time Behavior Descriptions
Since nearly every embedded system has different requirements, section 8 addresses how a developer can go about customizing the application project to meet their own needs and objectives. Some modules are simple and not much needs to be discussed while other modules may have an extensive section on how to customize the module. Figure 6 shows an example from the AGT module guide.
Figure 6 – Customizing the AGT Module
Section 9 details how to run the application project and what a developer can expect to see when the project runs. It is highly recommended that a developer first run the application project as is out-of-the-box before making any customization or adjustments. By doing this, a developer can get a baseline understanding for how the application project behaves.
The final sections in the module guides are concluding sections. Section 10 provides a developer with a quick summary on what was covered in the guide. Section 11 provides some recommended next actions that a developer can take. Section 12 concludes the module guides by providing links to reference information that can help a developer further explore the module and ask their questions on the Renesas knowledge base.
Now that you are an expert on how to use a module guide, pick a module that you need to learn more about, such as the GPIO, Timer or UART modules, and download the module guide and application project and start becoming an expert.
In the next post, I’ll show you how you can take an application stack that you customized in an application project and import it into your own application code.
Until next time,
Live long and profit!
Hot Tip of the Week
Make sure you keep this list of Synergy Support Resources handy as you implement your Synergy project. These resources augment the Module Guides by providing additional background and details on key Synergy features, capabilities, techniques and short-cuts.
Synergy Resources List