C
EK-RA8D1 套件
本主题提供了关于Renesas' EK-RA8D1主板的具体信息。
电路板特性
- R7FA8D1BHECBD 微控制器,搭载 ARM Cortex-M85 处理器、2 MB 闪存、1 MB SRAM
- 4.5 英寸 480x854 LCD 触摸屏
- 64 MB SDRAM
- 64 MB 外部 Octo-SPI 闪存
支持的色深
该板的参考端口支持 16bpp 色深。有关更多信息,请参阅QUL_COLOR_DEPTH 和“色深”部分。
使用预编译的Qt Quick Ultralite库构建应用程序
- 打开要构建的示例对应的 CMake 项目文件。
- 在“Configure Project ”窗口中:
- 选择您之前创建的套件。例如, Qt for MCUs 2.12.3 - Desktop 32bpp.
- 选择“Configure Project ”。

项目配置完成后,选择“Run ”,或按键盘上的Ctrl+r 键,以构建二进制文件并将其烧录到目标设备上。
读取调试信息
默认情况下,日志数据会被重定向到 JLink CDC UART 端口(USB COM 端口)。
端口设置
| 设置 | 值 |
|---|---|
| 每秒位数 | 115200 |
| 数据位 | 8 |
| 奇偶校验 | None |
| 停止位 | 1 |
| 流量控制 | None |
调试
Renesas e2studio
Renesas e2studio 允许您使用自定义配置来调试项目。
- 创建一个 EK-RA8D1 的“Bare Metal - Minimal”项目。
- 构建该项目。
- 将Qt Quick Ultralite的.elf文件复制到e2studio项目的Debug文件夹中。
- 复制原始的 .sbd 文件,并将其重命名为与Qt Quick Ultralite .elf 文件相同的名称。
- 从顶部菜单中选择“运行”。
- 选择“调试配置...”
- 选择“Renesas GDB 硬件调试”。
- 将Qt Quick Ultralite .elf文件设置为“C/C++应用程序:”。
- 选择“应用”并“关闭”。
- 选择以“调试”模式启动。
Renesas e2studio 中的默认 FSP 配置
您可以在platform/boards/renesas/ek-ra8d1-common/3rdparty/e2_project/configuration.xml 上找到用于生成以下配置的 FSP 配置 .xml 文件。
注意: 如果表格中未指定该属性,请使用 其默认值。
BSP
| 属性 | 值 |
|---|---|
| RA Common > Main stack size (bytes) | 65536 |
| RA Common > Heap size (bytes) | 262144 |
时钟
| Clock setting | 价值 |
|---|---|
| SCICLK Src | PLL1P |
| PLL2 Src | XTAL |
| PLL2 Mul | x40.0 |
| LCDCLK Src | PLL2P |
| OCTASPICLK Src | PLL2P |
注:SCICLK 应为 120MHz
注:LCDCLK 应为 200MHz
注意:OCTASPICLK 应为 100MHz
堆栈
添加以下堆栈并进行配置:
模拟 > ADC(r_adc )
| 属性 | 值 |
|---|---|
| Module > General > Name | g_adc0 |
| Module > Input > Channel Scan Mask > Channel 2 | Selected |
| Pins > AN02 | P006 |
连接性 > I2C 主设备 (r_iic_master)
| 属性 | 值 |
|---|---|
| Module > Name | g_i2c_touch |
| Module > Channel | 1 |
| Module > Rate | Standard |
| Module > Rise Time (ns) | 120 |
| Module > Fall Time (ns) | 120 |
| Module > Duty Cycle (%) | 50 |
| Module > Slave Address | 0x00 |
| Module > Address Mode | 7-bit |
| Module > Timeout Mode | Short Mode |
| Module > Callback | touch_i2c_callback |
| Module > Interrupt Priority Level | Priority 6 |
| Pins > SCL1 | P512 |
| Pins > SDA1 | P511 |
连接性 > UART (r_sci_b_uart)
| 属性 | 值 |
|---|---|
| Module > General > Name | g_uart0 |
| Module > General > Channel | 9 |
| Module > General > Data Bits | 8bits |
| Module > General > Parity | None |
| Module > General > Stop Bits | 1bit |
| Module > Interrupts > Callback | user_uart_callback |
| Pins > RXD9 | PA15 |
| Pins > TXD9 | PA14 |
图形 > D/AVE 2D 端口接口 (r_drw)
| 属性 | 值 |
|---|---|
| Common > Allow Indirect Mode | Enabled |
| Common > Memory Allocation | Custom |
| Module D/AVE 2D Port Interface (r_drw) > D2 Device Handle Name | d2_handle0 |
| Module D/AVE 2D Port Interface (r_drw) > DRW Interrupt Priority | Priority 2 |
图形 > 图形液晶显示器 (r_glcdc)
| 属性 | 值 |
|---|---|
| Module > General > Name | g_display0 |
| Module > Interrupts > Callback Function | glcdc_callback |
| Module > Interrupts > Line Detect Interrupt Priority | Priority 12 |
| Module > Input > Graphics Layer 1 > General > Horizontal size | 480 |
| Module > Input > Graphics Layer 1 > General > Vertical size | 854 |
| Module > Input > Graphics Layer 1 > Framebuffer > Number of framebuffers | 2 |
| Module > Input > Graphics Layer 1 > Framebuffer > Section for framebuffer allocation | .sdram |
| Module > Output > Timing > Horizontal total cycles | 559 |
| Module > Output > Timing > Horizontal active video cycles | 480 |
| Module > Output > Timing > Horizontal back porch cycles | 5 |
| Module > Output > Timing > Horizontal sync signal cycles | 2 |
| Module > Output > Timing > Horizontal sync signal polarity | Low active |
| Module > Output > Timing > Vertical total lines | 894 |
| Module > Output > Timing > Vertical active video lines | 954 |
| Module > Output > Timing > Vertical back porch lines | 20 |
| Module > Output > Timing > Vertical sync signal cycles | 3 |
| Module > Output > Timing > Vertical sync signal polarity | Low active |
| Module > Output > Timing > Data Enable Signal Polarity | High active |
| Module > Output > Timing > Sync edge | Falling edge |
| Module > Output > Format > Color format | 24bits RGB888 |
| Module > TCON > Hsync pin select | LCD_TCON1 |
| Module > TCON > Vsync pin select | LCD_TCON0 |
| Module > TCON > Panel clock division ratio | 1/8 |
MIPI 显示屏 (r_mipi_dsi)
| 属性 | 值 |
|---|---|
| Module > General > Name | g_display0 |
| Module > Low Power > Ultra Low Power State Wakeup Period | 290 |
MIPI 物理层(r_mipi_phy )
| 属性 | 值 |
|---|---|
| Module > DSI PLL Frequency | 560 |
输入 > 外部中断 (r_icu)
| 属性 | 值 |
|---|---|
| Module > Name | g_touch_irq |
| Module > Channel | 3 |
| Module > Trigger | Falling |
| Module > Digital Filtering | Enabled |
| Module > Digital Filtering Sample Clock | PCLK / 64 |
| Module > Callback | touch_irq_cb |
| Module > Pin Interrupt Priority | Priority 5 |
注意:请确保 引脚P510 的模式为Output mode (Initial Low) 。在 GT911 初始化过程中,该模式将更改为Input mode 。
存储 > OSPI 闪存 (r_ospi_b)
| 属性 | 值 |
|---|---|
| Common > Memory-mapping Support > Prefetch Function | Enable |
| Common > Memory-mapping Support > Combination Function | 64 Byte |
| Common > Memory-mapping Support > XiP Support | Disable |
| Common > DMAC Support | Enable |
| Common > Autocalibration Support | Enable |
| Common > DOTF Support | Disable |
| Module > General > Name | g_ospi_b |
| Module > General > Channel | 1 |
| Module > General > Initial Protocol Mode | SPI (1S-1S-1S) |
| Module > General > Initial Address Bytes | 4 |
| Module > General > Write Status Bit | 0 |
| Module > General > Write Enable Bit | 1 |
| Module > General > Sector Erase Size | 4096 |
| Module > General > Block Erase Size | 262144 |
| Module > General > Command Set Table | (empty) |
| Module > General > Command Set Table Length | 0 |
| Module > Defaults > Command Definitions > Page Program Command | 0x12 |
| Module > Defaults > Command Definitions > Read Command | 0x0B |
| Module > Defaults > Command Definitions > Write Enable Command | 0x06 |
| Module > Defaults > Command Definitions > Status Command | 0x05 |
| Module > Defaults > Erase Command Definitions > Sector Erase Command | 0x2121 |
| Module > Defaults > Erase Command Definitions > Block Erase Command | 0xDCDC |
| Module > Defaults > Erase Command Definitions > Chip Erase Command | 0x6060 |
| Module > Defaults > Dummy Cycles > Memory Read Dummy Cycles | 3 |
| Module > Defaults > Dummy Cycles > Status Read Dummy Cycles | 0 |
| Module > High-speed Mode > Auto-Calibration > Data latching delay | 0 |
| Module > High-speed Mode > Auto-Calibration > Auto-Calibration Address | 0x90002000 |
| Module > High-speed Mode > Command Definitions > Page Program Command | 0x1212 |
| Module > High-speed Mode > Command Definitions > Dual Read Command | 0xEEEE |
| Module > High-speed Mode > Command Definitions > Write Enable Command | 0x0606 |
| Module > High-speed Mode > Command Definitions > Status Command | 0x0505 |
| Module > High-speed Mode > Command Definitions > Sector Erase Command | 0x2121 |
| Module > High-speed Mode > Command Definitions > Block Erase Command | 0xDCDC |
| Module > High-speed Mode > Command Definitions > Chip Erase Command | 0x6060 |
| Module > High-speed Mode > Protocol | Dual data rate OPI (8D-8D-8D) |
| Module > High-speed Mode > Command Length Bytes | 2 |
| Module > High-speed Mode > Memory Read Dummy Cycles | 10 |
| Module > High-speed Mode > Status Read Dummy Cycles | 4 |
| Module > Chip Select Timing Setting > Command Interval | 2 |
| Module > Chip Select Timing Setting > Pull-up Timing | No Extension |
| Module > Chip Select Timing Setting > Pull-down Timing | No Extension |
| Pins > OM_CS1 | P104 |
| Pins > OM_DQS | P801 |
| Pins > OM_ECSINT1 | P105 |
| Pins > OM_RESET | P106 |
| Pins > OM_SCLK | P808 |
| Pins > OM_SIO0 | P100 |
| Pins > OM_SIO1 | P803 |
| Pins > OM_SIO2 | P103 |
| Pins > OM_SIO3 | P101 |
| Pins > OM_SIO4 | P102 |
| Pins > OM_SIO5 | P800 |
| Pins > OM_SIO6 | P802 |
| Pins > OM_SIO7 | P804 |
定时器 > 定时器,通用 PWM(r_gpt )
| 属性 | 值 |
|---|---|
| Common > Pin Output Support | Enabled |
| Module > General > Name | g_timer_for_qul_tick |
| Module > General > Channel | 0 |
| Module > General > Mode | Periodic |
| Module > General > Period | 1000 |
| Module > General > Period Unit | Microseconds |
| Module > Output > GTIOCA Output Enabled | False |
| Module > Output > GTIOCB Output Enabled | False |
| Module > Interrupts > Callback | qul_tick_interrupt_cb |
| Module > Interrupts > Overflow/Crest Interrupt Priority | Priority 2 |
| Module > Interrupts > Capture A Interrupt Priority | Disabled |
| Module > Interrupts > Capture B Interrupt Priority | Disabled |
| Module > Interrupts > Underflow/Trough Interrupt Priority | Disabled |
定时器 > 定时器,通用 PWM(r_gpt )
| 属性 | 值 |
|---|---|
| Common > Pin Output Support | Enabled |
| Module > General > Name | g_timer_PWM |
| Module > General > Channel | 7 |
| Module > General > Mode | Saw-wave PWM |
| Module > General > Period | 10 |
| Module > General > Period Unit | Milliseconds |
| Module > Output > Duty Cycle Percent | 75 |
| Module > Output > GTIOCB Output Enabled | True |
| Pins > GTIOCB | P404 |
注意: 设置GTIOCB 引脚时, 请确保GPT定时器的Operation Mode 为GTIOCA or GTIOCB ,且引脚P404 处于Peripheral mode 状态。
资源存储部分
默认情况下,应用程序的图像资源数据存储在内部闪存中。不过,您可以选择将资源数据存储在外部闪存中。在使用ImageFiles.files 向应用程序添加资源时,请将 QmlProject 的ImageFiles.MCU.resourceStorageSection属性配置为QulResourceDataInExternalFlash 。
同样地,字体资源数据默认也存储在内部闪存中。您可以通过将 QmlProject 属性MCU.Config.fontFilesStorageSection设置为QulFontResourceDataInExternalFlash ,选择将字体资源数据存储在外部闪存中。
在某些 Qt 许可下可用。
了解更多。