422 views|2 replies

39

Posts

0

Resources
The OP
 

[Renesas RA8D1 development board, graphics MCU evaluation based on M85 core] 1. Environment construction based on MDK, FreeRTOS mobile... [Copy link]

First of all, I would like to thank the forum for giving me the opportunity to evaluate the RA8D1. The Renesas RA8D1 MCU series is the industry's first 32-bit graphics microcontroller (MCU) based on the Arm Cortex -M85 (CM85) core. It can achieve breakthrough performance of more than 3000 CoreMark scores at 480 MHz and support high-resolution display and excellent graphics capabilities for visual AI applications. The evaluation board is also very beautiful and has rich IO interfaces. RA8D1 development supports two IDE platforms, e2studio and MDK. This time, the MDK environment was set up.
Download development resources, Renesas RA8D1 software package download git download address https://github.com/renesas/fsp/releases
The software packages required for the RA8D1 MDK development environment are as follows
The installation is relatively simple, the default installation is OK, and then the project construction test is carried out. The purpose of this experiment is to realize the LED lighting and serial port test based on FreeRTOS.
First open Renesas RA Smart Configurator 5.4.0 and select the chip
Click next
Choosing FreeRTOS
First, set the clock. From the schematic diagram, we know that the external crystal oscillator is 24MHz, and the project default is 20MHz. We need to change it.
Next, configure the LED interface and create an LED thread. From the schematic diagram, we can see that the LED pin is PA01.
The IO configuration is as follows
Create FreeRTOS thread, first add memory management heap4
Create led Thread and configure it as follows
Then click Create Project to generate the project as follows
Open the project and the generated directory is as follows
Compile it
First write a LED flashing, 2 times per second,
void led_thread_entry(void *pvParameters)
{
FSP_PARAMETER_NOT_USED(pvParameters);
/* TODO: add your own code here */
while (1)
{
R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_10_PIN_01, BSP_IO_LEVEL_LOW);
vTaskDelay(100);
R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_10_PIN_01, BSP_IO_LEVEL_HIGH);
vTaskDelay(400);
}
}

Configure the burning settings. First, add the download algorithm
There is a problem with the default download algorithm space, and the download will prompt an error
Modify the configuration
Modify as follows
The settings are completed and the lamp is turned on successfully.

Next, add a serial port thread and perform a printf redirection test. From the schematic diagram, we can see that serial port 3 is connected to the onboard JLink serial port.
Open the graphical configuration through MDK
Set the serial port clock
Configure serial port 3 pin
Add UART3_Thread
Configure Serial Port 3
Click Generate Code
Compile it and it will show an error.
This is caused by not adding a callback function. Now add a callback function and write a serial port loopback test first.
#include "uart3_thread.h"
/* uart3_thread entry function */
/* pvParameters contains TaskHandle_t */
void uart3_thread_entry(void *pvParameters)
{
FSP_PARAMETER_NOT_USED(pvParameters);
fsp_err_t err = FSP_SUCCESS;
err = R_SCI_B_UART_Open (&g_uart3_ctrl, &g_uart3_cfg);
assert(FSP_SUCCESS == err);
/* TODO: add your own code here */
while (1)
{
vTaskDelay(1000);
}
}
/* 发送完成标志 */
volatile bool uart_send_complete_flag = false;
/* 串口中断回调 */
void uart3_callback (uart_callback_args_t * p_args)
{
switch (p_args->event)
{
case UART_EVENT_RX_CHAR:
{
/* 把串口接收到的数据发送回去 */
R_SCI_B_UART_Write(&g_uart3_ctrl, (uint8_t *)&(p_args->data), 1);
break;
}
case UART_EVENT_TX_COMPLETE:
{
uart_send_complete_flag = true;
break;
}
default:
break;
}
}

Burn test

Printf redirection, printing test
int fputc(int ch, FILE *f)
{
(void)f;
R_SCI_B_UART_Write(&g_uart3_ctrl, (uint8_t *)&ch, 1);
while(uart_send_complete_flag == false);
uart_send_complete_flag = false;
return ch;
}

void uart3_thread_entry(void *pvParameters)
{
FSP_PARAMETER_NOT_USED(pvParameters);
fsp_err_t err = FSP_SUCCESS;
/* 初始化串口3 */
err = R_SCI_B_UART_Open (&g_uart3_ctrl, &g_uart3_cfg);
assert(FSP_SUCCESS == err);
/* TODO: add your own code here */
while (1)
{
printf("CPU : RA8D1BH, 主频: %dMHz\r\n", SystemCoreClock / 1000000);
vTaskDelay(1000);
}
}

At this point, the environment construction test is completed
Summary: Renesas' MDK environment is very simple to build, the graphical configuration is very convenient and easy to use, and the design of STACKS graphical configuration is more intuitive.
This post is from Renesas Electronics MCUs

Latest reply

Can MDK directly launch Renesas RA for configuration?   Details Published on 2024-7-9 07:17

6075

Posts

6

Resources
2
 

Can MDK directly launch Renesas RA for configuration?

This post is from Renesas Electronics MCUs

Comments

OK  Details Published on 2024-7-9 13:18
 
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 

39

Posts

0

Resources
3
 
Qintianqintian0303 posted on 2024-7-9 07:17 Can MDK directly start Renesas RA for configuration?

OK

This post is from Renesas Electronics MCUs
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
LCD TV schematic diagram

LCD TV schematic diagram

Microelectronics Dictionary

Abrupt junction Accelerated testing Acceptor Acceptor atom Accumulation Accumulating contact Accumulation region Accumul ...

Motor drive control essence summary post

Since the establishment of this board, many netizens have posted many very valuable posts here. Xiaoguan took advantage ...

DM8148 sends Frames stream from DSP side to A8 side program configuration

I have been debugging DM8148 recently. According to the requirements, the data obtained by the camera needs to be sent t ...

ssd1306 Chinese and picture display

This post was last edited by lemon1394 on 2021-8-17 23:19 I have found many Chinese displays of ssd1306 introduced on t ...

31 "Millions of Miles" Raspberry Pi Car——Ubuntu MATE System Installation

Next, I was going to start learning ROS, but it was particularly difficult to install it on the Raspberry Pi operating ...

Pre-registration for the live broadcast with prizes | New opportunities in the UWB market

UWB is regarded as a new function of the next generation of human-computer interaction due to its high precision and hig ...

[Mil MYD-YG2LX development board] Application in industrial control field - EtherCAT master station based on SOEM

Preface This article introduces the application of in the field of industrial control , implement EtherCAT master based ...

[Digi-Key Electronics Follow me Issue 2] + Preliminary Task Construction

This post was last edited by Shi Xiaojie on 2023-11-2 22:32 Task construction: This time, flow me is developed using ci ...

LicheePi 4A problem record and solution Manually mount npu driver

Environment: debian system image 20231023 The error information is as follows: ``` (ort) root@lpi4a:/home/sipeed/Desktop ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list