Renesas Synergy, a complete IoT ecosystem.
Renesas Synergy is a complete and qualified platform with fully integrated software, a scalable family of microcontrollers, and unified development tools to speed embedded system developers’ time to market as they innovate new products.
At the heart of the Synergy Platform is the Synergy Software Package (SSP), which is qualified, supported, warranted, and maintained by Renesas. The SSP consists of a proven real-time operating system (RTOS), stacks for USB and Ethernet, file systems, a graphic users interface (GUI), and more – all accessible through a robust Application Programming Interface (API) to free designers from struggling with lower-level details.
Based on the very popular and customisable Eclipse IDE, the Synergy IDE is very simple to understand and to get the graps of it.
“Hello World” using the UART Application Framework
We will explore the Renesas Synergy UART Application Framework and walk through the necessary steps to get it up and running on a PE-HMI1 starter kit and say “Hello World!”.
Starting from a new project configured by the Synergy wizard to be a Blinky project, a developer can open the Synergy configuration file and navigate to the threads tab. After selecting the blinky thread, a thread stack can be added by selecting add Framework -> Connectivity -> UART Driver.
Once the developer has added the UART Application Framework to the project, there are a few configuration items that need to be handled. First, within the SCI module properties, the Asynchronous Mode (r_sci_uart) needs to be enabled.The g_uart0 UART Driver on r_sci_uart module will still be colored red, indicating that further configuration is required. Clicking on the module, the four interrupts associated with SCI RXI, TXI, TEI and ERI all need to have their priorities set.
Saving the changes results in the configuration being accepted (the red coloring now becomes black) and our development environment will look similar to the image below.
By default, the UART Driver on r_sci_uart module is configured for 9600 bps, 8 bits, 1 stop bit which is pretty standard. Developers can change these defaults from the properties tab if necessary. Once the desired settings have been set, save all changes and then press the “Generate Project Content” button before rebuilding the project. The header for the UART Application Framework will now be added to the application.
At this point, the UART Application Framework is configured and ready to be utilized in the project. If a developer has never used the Synergy Software Package (SSP) before, they may be wondering how they can now use the framework that is included in the project. The trick for getting the API’s associated with the framework is to use the framework name instance, in this case g_uart0, and then examine its p_api member which in the IDE will reveal all available API calls. So in English, or computer code more accurately, typing g_uart0.p_api-> in the IDE will reveal the function available.
Writing the “Hello World” application using the UART Application Framework requires only four lines of code in the hal_entry.c, like below:
The execution of this example will now reveals the following output on the UART0:
The UART Application Framework is now properly configured on the development kit and communicating with the external world. Not only was this simple to achieve but scaling into far more complex applications is just as straightforward.