Download presentation
Presentation is loading. Please wait.
1
RX111 Promotion Board (RPB) hands on
November 8, 2018 © 2013 Renesas Electronics Europe. All rights reserved.
2
RX111 RPB Software Hardware
After successful installation the RX111RPB software and manuals will be located at: All programmsRenesas Electronics ToolsYRPBRX111 Hardware © 2013 Renesas Electronics Europe. All rights reserved.
3
Documents Quickstart guide, Manual,
© 2013 Renesas Electronics Europe. All rights reserved.
4
Hands On 1. Power measurement GUI
Connect the USB cable to your PC and to the J-Link USB connector (CN8) on the reverse of the RPB. The green J-Link LED (LED4) will flash. A “Device driver software installed successfully” pop-up will appear in the Windows toolbar and installation will complete. The green J-Link LED (LED4) will illuminate. Launch the RX111 Demonstrator application by double-clicking the shortcut on the desktop. 8. Click the ‘Connect’ button on the ‘Home’ tab. After the connection is made you should be see the current firmware version and be able to synchronise the PC system clock with the RX111 real time clock using the ‘Sync’ button: Use the ‘Power Measurement’ tab to see a trace of RX111 current consumption. Use the ‘Low Power’ tab to switch the RX111 into the various low power and sleep modes: © 2013 Renesas Electronics Europe. All rights reserved.
5
RX111 Power consumption data
© 2013 Renesas Electronics Europe. All rights reserved.
6
Hands on 2. E2Studio with Applilet integration
e2Studio V2.1 and above has Applilet integrated for RL78 and RX100 Create the projectOpen e2Studio Set workspace path FileSwitch workspaceOther C:\Renesas\workspace\RPB\RX111 FileNewC project Project name: RPBRX111_handson2 Project type: Executable (Renesas) Sample project Toolchain: Renesas RXC toolchain Next © 2013 Renesas Electronics Europe. All rights reserved.
7
Hands on 2. E2Studio with Applilet integration
Set up the tool chain and debugger Select Toolchain version v1.02 Debug hardware: Segger Jlink Data Little endian Target device: R5F51115AxFM © 2013 Renesas Electronics Europe. All rights reserved.
8
Hands on 2. E2Studio with Applilet integration
Enable Applilet integration Select “use peripheral code generation” Click Next for the default options for: Select Additional CPU options Global Option settings Standard header files Stack area and supporting files © 2013 Renesas Electronics Europe. All rights reserved.
9
Hands on 2. E2Studio with Applilet integration
Configure peripherals From e2Studio project explorers Select RPBRX111_handson2 top level From e2Studio menu bar select: WindowShow ViewPeripheral functions Move the windows about to make it easy to see View menu (of peripherals) Generate report Generate code © 2013 Renesas Electronics Europe. All rights reserved.
10
Hands on 2. E2Studio with Applilet integration
Configure peripherals Independent Watchdog Unused © 2013 Renesas Electronics Europe. All rights reserved.
11
Hands on 2. E2Studio with Applilet integration
Configure peripherals PortsP05,P41,PB7 © 2013 Renesas Electronics Europe. All rights reserved.
12
Hands on 2. E2Studio with Applilet integration
Configure peripherals PortsPE4 enable power to the LED’s PortsP03 enable power to the potentiometer © 2013 Renesas Electronics Europe. All rights reserved.
13
Hands on 2. E2Studio with Applilet integration
Configure peripherals TimerUnused © 2013 Renesas Electronics Europe. All rights reserved.
14
Hands on 2. E2Studio with Applilet integration
Generate code © 2013 Renesas Electronics Europe. All rights reserved.
15
Hands on 2. E2Studio with Applilet integration
Edit code to start the timer.. file src\ r_cg_main.c Add after line 73 (right click on edge of source window to turn on line numbers) /* start user code */ R_CMT0_Start(); © 2013 Renesas Electronics Europe. All rights reserved.
16
Hands on 2. E2Studio with Applilet integration
Edit project to flash the LED Edit file src\ r_cg_cmt_user.c Add after line 68 /* start user code */ /* LED Output Pins */ #define LED PORT0.PODR.BIT.B5 #define LED PORT4.PODR.BIT.B1 #define LED PORTB.PODR.BIT.B7 LED0=~LED0; LED1=~LED1; LED2=~LED2; © 2012 Renesas Electronics Europe. All rights reserved.
17
Hands on 2. E2Studio with Applilet integration
Build code 1. hardware debug Fix any errors Launch debugger Debug configurations © 2013 Renesas Electronics Europe. All rights reserved.
18
Hands on 2. E2Studio with Applilet integration
Launch debugger Check Debug configuration © 2013 Renesas Electronics Europe. All rights reserved.
19
Hands on 2. E2Studio with Applilet integration
Run the code, the LED’s should flash at 1s interval Run Suspend execution terminate debug session © 2013 Renesas Electronics Europe. All rights reserved.
20
Hands on 2. E2Studio with Applilet integration
Your task Get the Red/Green and Amber LED’s to flash alternately at ½ second interval…. Hint: Modify “Applilet” Peripheral Function settings Port4.1 amber LED to startup “ON” Compare match timer interval value 250mS © 2013 Renesas Electronics Europe. All rights reserved.
21
Hands on 2. E2Studio with Applilet integration
Now lets make a variable LED flash rate. Enable the ADC in C/C++ perspective Continuous scan mode ANO00 channel Software trigger Data placement :Left alignment, so the data is in the 12 MSB’s of the 16 bit register. Disable interrupt © 2013 Renesas Electronics Europe. All rights reserved.
22
Hands on 2. E2Studio with Applilet integration
Now lets make a variable LED flash rate. Modify r_cgc_main.c to start the ADC, add these after line 76. /*Start ADC*/ R_S12ADb_Start(); Modify r_cmt_user.c to copy the ADC result for ANO00 to the CMT compare register, add these after line 75. /*copy ADC result to CMT compare register */ CMT0.CMCOR = S12AD.ADDR0; © 2013 Renesas Electronics Europe. All rights reserved.
23
Hands on 2. E2Studio with Applilet integration
Rebuild , debug and run.. The LED’s should change flash rate based on potentiometer setting ! See how much memory has been used. WindowShow ViewMemory Usage Percentage < 75% : Colour of bar is Green 75% <= Percentage <90% : Colour of bar is Orange Percentage >= 90% : Colour of bar is Red Hover feature for exact detail (used / available) © 2013 Renesas Electronics Europe. All rights reserved.
24
Hands on 2. E2Studio with Applilet integration
Now lets add a Visual Expression Gauge to see the ADC value graphically. Declare a variable in r_cg_main.c, line 55 volatile unsigned int adc_val; Make the variable equal to the ADC result in the main while loop. adc_val=S12AD.ADDR0 ; © 2013 Renesas Electronics Europe. All rights reserved.
25
Hands on 2. E2Studio with Applilet integration
add the Visual Expression Gauge to e2Studio WindowShow ViewVisual expression Drag Gauge to display window Right click and set the expression values Build, download and run the code. The dial should respond when the potentiometer is turned. © 2013 Renesas Electronics Europe. All rights reserved.
26
Hands on 3 USB Sample code projects are provided with the RPB installation © 2013 Renesas Electronics Europe. All rights reserved.
27
Hands on 3 USB HID (Human Interface Device)
This sample demonstrates the use of the RX111 as a USB Peripheral HID . It can be configured as a HID Keyboard, HID Mouse or in HID demo mode. Import sample code into e2Studio FileImportExisting Projects into Workspace © 2013 Renesas Electronics Europe. All rights reserved.
28
Hands on 3 USB HID (Human Interface Device)
Import sample code into e2Studio Browse to : C:\Renesas\workspace\RPB\RX111\Sample Projects\USB_PHID.zip © 2013 Renesas Electronics Europe. All rights reserved.
29
Hands on 3 USB HID (Human Interface Device)
Build the code 1.PERI (debug using hardware) Debug –>check configuration PERI\USB_HID.x Segger Jlink, Target device: R5F51115 © 2013 Renesas Electronics Europe. All rights reserved.
30
Hands on 3 USB HID (Human Interface Device)
Run the code ! Connect a mini-USB cable to CN1 and a Windows PC. The RPB will be detected and HID drivers installed. Launch the RSK_HID.exe application, which can be found in USB_PHID root project folder. C:\Renesas\workspace\RPB\RX111\USB_PHID Click the 'Connect'button and use VID = 0x0000 and PID = 0x0003. The application should display a message indicating a successful connection to the RPB. Use the 'ReadADC' and 'Toggle LED' buttons on the application to interact with the device. © 2013 Renesas Electronics Europe. All rights reserved.
31
Hands on 3 USB HID (Human Interface Device)
Run the code ! Click the 'Connect'button and use VID = 0x0000 and PID = 0x0003. The application should display a message indicating a successful connection to the RPB. Use the 'ReadADC' and 'Toggle LED' buttons on the application to interact with the device. © 2013 Renesas Electronics Europe. All rights reserved.
32
Hands on 3 USB HID (Human Interface Device)
Run the code ! Note that the 'Set LCD' functionality requires the Pmod connector to be fitted and an RSK Pmod Compatible display connected. Also need to add the build variable “USB_LCD_ENABLE” Select top level in Project Explorer, then click on “Alt t” or Renesas Tool settings icon © 2013 Renesas Electronics Europe. All rights reserved.
33
Hands on 4 USB Host This demo project to RX111 acting as a USB host and copying a file to a USB device whilst running from a superCap. Import sample code into e2Studio FileImportExisting Projects into Workspace © 2013 Renesas Electronics Europe. All rights reserved.
34
Hands on 4 USB Host Import sample code into e2Studio
Browse to : C:\Renesas\workspace\RPB\RX111\Sample Projects\LowPowerFileCopy.zip © 2013 Renesas Electronics Europe. All rights reserved.
35
Hands on 4 USB Host Build the code 1.HardwareDebug (debug onhardware)
Debug –>check configuration HardwareDebug/LowPowerFileCopy.x Segger Jlink, Target device: R5F51115 © 2013 Renesas Electronics Europe. All rights reserved.
36
Hands on 4 USB Host Run the demo !
Compile and download the sample code to the target, run, then disconnect the debugger. Connect a mini-USB cable to CN1 and a USB host. LED1 will illuminate and the supercapacitor will begin to charge. After several seconds LED1 will go out and LED0 will illuminate. The supercapacitor is now charged. Disconnect the USB cable. LED0 will blink periodically to show the board has power. Connect a blank FAT/FAT32 formatted USB stick to CN2. LED2 will light, as will the activity light on the USB stick (if present), then all LEDs will go out and the MCU will enter power save. Connect the USB stick to a PC, and observe the file RX111.pdf, containing a page of the MCU datasheet. To repeat the sample, reconnect to CN1, press the reset button to recharge the supercap. Go to step 3. © 2013 Renesas Electronics Europe. All rights reserved.
37
© 2013 Renesas Electronics Europe. All rights reserved.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.