RoadTest: Enroll to Review the Renesas RX671 MCU Eval Kit
Author: meera_hussien
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: The other parts that i consider comparable to this product is none actually since the board is unique to have different functions. And also the GROVE and QWIIC port.
What were the biggest problems encountered?: There is no big problem in getting started since the getting started video is well written. The challenges that i encountered is on getting my code to work.
Detailed Review:
The Renesas RX671 MCU Eval Kit enables users to seamlessly evaluate the features of the RX671 MCU group and develop embedded systems applications using Firmware Integration Technology (FIT) and e2 Studio IDE. The users can utilize rich on-board features along with their choice of popular ecosystems add-ons to bring their big ideas to life.
The key features of the Renesas RX671 MCU Eval Kit are as shown below:
MCU Native Pin Access
• R5F5671EHDFB*1 MCU (referred to as RX MCU)
• 120 MHz, 32-bit RX CPU (RXv3)
• 2 MB ROM, 384 kB RAM
• 144 pins, LFQFP package
• Native pin access through 6 x 2-pin, 18 x 2-pin and 11 x 2-pin male headers
• MCU current measurement points for current consumption measurement
• Multiple clock sources - Providing 24.000 MHz and 32.768 kHz reference clock. Additional low-precision clocks are available internal to the RX MCU
• DIP switch to select RX MCU operating mode configuration, and signals from/to microSD card, external SDRAM and QSPI flash memory
Special Feature Access
• microSD card slot*2*3
• Audio interface
• 128 Mbit external SDRAM (16-bit data width) *3*4
• 64 Mbit external QSPI flash memory*3*4
• Touch interface with 2 touch buttons*4
System Control and Ecosystem Access
• Four +5 V input sources
- USB (USB DEBUG1, USB FULL SPEED, USB SERIAL)
- External power supply (using surface mount clamp test points and power input vias)
• Two Debug modes
- Debug on-board (E2 emulator On Board (referred to as E2 OB): FINE interface)
- Debug in (JTAG or FINE interface)
• User LEDs and switches
- Three User LEDs (red, blue, green)
- Power LED (white) indicating the availability of regulated power
- Debug LED (yellow) indicating the debug connection
- Two User switches
- One Reset switch
• Five most popular ecosystem expansions
- 2 Seeed Grove® system (I2C / Analog) connectors
- SparkFun® Qwiic® connector
- 2 Digilent PmodTM (UART / SPI / I2C) connectors
- Arduino® (Uno R3) connector
- MikroElektronika mikroBUSTM connector
• USB serial converter interface
• RX671 USB Full speed host and function
Connect the RX671 board to the PC as shown in the figure below. Make sure to set the DIP switch S4-2 is set to ON.
Once the board is connected to the PC now we can start to configure the software. Open the device manager and identify the port number.
And start TeraTerm and follow as per the video below
For this roadtest i plan to make a simple project to monitor the environment by using the SHT40 sensor and also SGP30 sensor. The sensor use the grove port and the QWIIC that is available on the RX-671.
The hardware used in this project is as below:
SHT40
The specification of the sensor is as shown below:
SGP30
The specification of the sensor is as shown below:
For the software, we will using the e2 studio. My plan is to modify the existing sample code. In order to understand how the code works, i run the demo code. Below is the demo of the code.
The first step of doing this is to read the i2C address of both the sensors. I inserted the code below and re-compile but somehow it is showing error. Below is the modified code
/***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2023 Renesas Electronics Corporation. All rights reserved.
***********************************************************************************************************************/
/***********************************************************************************************************************
* File Name : menu_main.c
* Version : 1.00
* Device(s) : R5F5671EHxFB
* Tool-Chain : CCRX
* H/W Platform : EK-RX671
* Description : This file implements menu function.
* Creation Date: 2023-01-31
***********************************************************************************************************************/
/***********************************************************************************************************************
Includes <System Includes> , "Project Includes"
***********************************************************************************************************************/
#include <stdio.h>
#include "platform.h"
#include "r_smc_entry.h"
#include "r_sci_rx_if.h"
#include "r_byteq_if.h"
#include "r_sci_rx_config.h"
#include "r_sci_rx_pinset.h"
#include "r_cg_userdefine.h"
#include "common_init.h"
#include "console.h"
#include "menu_kis.h"
#include "menu_ext.h"
#include "menu_ns.h"
#include "r_cmt_rx_if.h"
#include "Pin.h"
#include "r_irq_rx_pinset.h"
#include "common_init.h"
#include "ekrx671def.h"
/***********************************************************************************************************************
Macro definitions
***********************************************************************************************************************/
#define MODULE_NAME "\r\n\x1b[2m\x1b[37mWelcome to Quick Start Example Project for %s!\r\n"
#define SUB_OPTIONS "\r\n> Select from the options in the menu below:\r\n" \
"\r\nMENU"
#define EP_INFO "(2)"
#define TIMER_MAX_CH (8U)
#define TIMER_CH_FLG (0U)
#define TIMER_CH_COUNT (1U)
#define TIMER_CH_MAX_COUNT (2U)
typedef enum
{
MAINMENU_KIT_INFO = 0,
MAINMENU_QUAD_SPI = 1,
MAINMENU_NEXT_STEP = 2,
MAINMENU_MAX = 3
} main_menu_contents_t;
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
typedef struct menu_fn_tbl
{
char_t * p_name; /* Name of Test */
test_fn (* p_func)(void); /* Pointer to Test Function */
} st_menu_fn_tbl_t;
/***********************************************************************************************************************
Private global variables and functions
***********************************************************************************************************************/
int8_t g_selected_menu = 0;
char_t g_print_buffer[BUFFER_LINE_LENGTH] = "";
static int8_t main_display_menu (void);
static void user_init (void);
/* Table of menu functions */
static st_menu_fn_tbl_t s_menu_items[] =
{
/* p_name p_func */
{"Kit Information" , kis_display_menu},
{"Quad-SPI FLASH Write/Read" , ext_display_menu},
{"Next Steps" , ns_display_menu },
};
/***********************************************************************************************************************
Typedef definitions
***********************************************************************************************************************/
/***********************************************************************************************************************
Exported global variables (to be accessed by other files)
***********************************************************************************************************************/
/***********************************************************************************************************************
Private global variables and functions
***********************************************************************************************************************/
void main (void);
/***********************************************************************************************************************
* Function Name: main
* Description : This function implements main function.
* Arguments : None
* Return Value : None
***********************************************************************************************************************/
void main(void)
{
sci_cfg_t my_sci_config;
sci_err_t my_sci_err;
user_init();
/* Initialize the I/O port pins for communication on this SCI channel.
* This is specific to the MCU and ports chosen. For the RSKrx671 we will use the
* SCI channel connected to the USB serial port emulation. */
R_SCI_PinSet_SCI6();
/* Set up the configuration data structure for asynchronous (UART) operation. */
my_sci_config.async.baud_rate = 115200;
my_sci_config.async.clk_src = SCI_CLK_INT;
my_sci_config.async.data_size = SCI_DATA_8BIT;
my_sci_config.async.parity_en = SCI_PARITY_OFF;
my_sci_config.async.parity_type = SCI_EVEN_PARITY;
my_sci_config.async.stop_bits = SCI_STOPBITS_1;
my_sci_config.async.int_priority = 3; /* 1=lowest, 15=highest */
/* OPEN ASYNC CHANNEL
* Provide address of the config structure,
* the callback function to be assigned,
* and the location for the handle to be stored.*/
my_sci_err = R_SCI_Open(SCI_CH6, SCI_MODE_ASYNC, &my_sci_config, std_sci_callback, &g_my_sci_handle);
/* If there were an error this would demonstrate error detection of API calls. */
if (SCI_SUCCESS != my_sci_err)
{
R_BSP_NOP(); /* Your error handling code would go here. */
}
while (1)
{
main_display_menu();
}
}
static void i2c_read_example(void)
{
sci_err_t my_sci_err;
// I2C initialization
my_sci_err = R_I2C_Open(g_i2c0.p_ctrl, g_i2c0.p_cfg);
if (my_sci_err != SSP_SUCCESS)
{
// Handle error
return;
}
// Perform I2C read operation
uint8_t received_data;
my_sci_err = R_I2C_Read(g_i2c0.p_ctrl, I2C_DEVICE_ADDR, &I2C_REGISTER_ADDR, 1, &received_data, 1, false);
if (my_sci_err != SSP_SUCCESS)
{
// Handle error
return;
}
// Process the received data as needed
// Close I2C
my_sci_err = R_I2C_Close(g_i2c0.p_ctrl);
if (my_sci_err != SSP_SUCCESS)
{
// Handle error
return;
}
}
/***********************************************************************************************************************
* End of function main
***********************************************************************************************************************/
/***********************************************************************************************************************
* Function Name : main_display_menu
* Description : Switch press callback function. Sets g_adc_trigger flag.
* Argument : none
* Return value : The main menu controller.
***********************************************************************************************************************/
static int8_t main_display_menu(void)
{
int8_t cnt;
sprintf(g_print_buffer, "%s%s", gp_clear_screen, gp_cursor_home);
/* Casting for use as characters */
console_write((void*)g_print_buffer);
/* ignoring -Wpointer-sign is OK when treating signed char_t array as as unsigned */
sprintf(g_print_buffer, MODULE_NAME, FULL_NAME);
/* Casting for use as characters */
console_write((void*)g_print_buffer);
/* ignoring -Wpointer-sign is OK when treating signed char_t array as as unsigned */
sprintf(g_print_buffer, SUB_OPTIONS);
/* Casting for use as characters */
console_write((void*)g_print_buffer);
for (cnt = 0; cnt < MAINMENU_MAX; cnt++)
{
sprintf (g_print_buffer, "\r\n %d. %s", (cnt + 1), s_menu_items[cnt].p_name);
/* Casting for use as characters */
console_write((void*)g_print_buffer);
}
console_write("\r\n");
while (1)
{
uint8_t my_char;
sci_err_t my_sci_err;
/* ICU initialize */
icu_initialize();
/* Start the timers */
led_duty_cycle_update();
/* Read next character from the serial port receive queue.
* Repeat read if needed until data is available in the queue. */
do
{
my_sci_err = R_SCI_Receive(g_my_sci_handle, &my_char, 1);
}
while (SCI_ERR_INSUFFICIENT_DATA == my_sci_err);
if (('1' <= my_char) && ('3' >= my_char))
{
/* Cast, as calculation will be assumes to return int */
g_selected_menu = (int8_t)(my_char - '0');
s_menu_items[g_selected_menu - 1].p_func();
break;
}
}
return (true);
}
/***********************************************************************************************************************
* End of function main_display_menu
***********************************************************************************************************************/
/***********************************************************************************************************************
* Function Name : user_init
* Description : Initializes user system.
* Argument : -
* Return value : -
***********************************************************************************************************************/
static void user_init(void)
{
R_Pins_Create();
/* PinSet for IRQ */
R_ICU_PinSet();
common_init();
}
/***********************************************************************************************************************
* End of function user_init
***********************************************************************************************************************/
I need to troubleshoot the code before able to identify the i2C address an configure the sensors. Since the due date is very near, i would
One of the challenges that i found is to work around the IDE environment. I think it would be better if there is any guide on using the e2Studio. For this particular roadtest, i could not complete what i have proposed earlier due to inadequate experience using the e2Studio software. One that could be helpful is familiarization with the e2Studio as it would definitely be very useful in developing projects based on Renesas board.
In the nutshell i believe that the Renesas RX671 Eval Kit is a very interesting board to be explored. Even though i cant demonstrate what i have planned earlier, i will continue to work on this to solve the issue that i am facing and update it later in my blog.