Edgi-Talk_M33_HyperRam Example Project
中文 | English
Introduction
This example project is based on the Edgi-Talk platform, demonstrating the HyperRam functionality running on the RT-Thread real-time operating system. Through this project, users can quickly verify HyperRam operation, providing a basic reference for subsequent hardware control and application development.
Software Description
The project is developed based on the Edgi-Talk platform.
Example features include:
The project structure is simple, making it easy to understand HyperRam control logic and hardware driver interfaces.
#include "rtthread.h"
#define DRV_DEBUG
#define LOG_TAG "drv_hyperam"
#include <drv_log.h>
#define PSRAM_ADDRESS (0x64800000)
#ifdef BSP_USING_HYPERAM
#ifdef RT_USING_MEMHEAP_AS_HEAP
struct rt_memheap system_heap;
#endif
static int hyperam_init(void)
{
LOG_D("hyperam init success, mapped at 0x%X, size is %d bytes, data width is %d", PSRAM_ADDRESS, BSP_USING_HYPERAM_SIZE, 16);
#ifdef RT_USING_MEMHEAP_AS_HEAP
/* If RT_USING_MEMHEAP_AS_HEAP is enabled, HYPERAM is initialized to the heap */
rt_memheap_init(&system_heap, "hyperam", (void *)PSRAM_ADDRESS, BSP_USING_HYPERAM_SIZE);
#endif
return RT_EOK;
}
INIT_BOARD_EXPORT(hyperam_init);
#endif
Usage
Build and Download
Open the project and compile it.
Connect the board’s USB interface to the PC using the onboard debugger (DAP).
Use the programming tool to flash the generated firmware to the development board.
Running Result
After flashing, power on the board to run the example project.
Notes
To modify the graphical configuration of the project, open the configuration file using the following tool:
tools/device-configurator/device-configurator.exe
libs/TARGET_APP_KIT_PSE84_EVAL_EPC2/config/design.modus
After modification, save the configuration and regenerate the code.
Startup Sequence
The system starts in the following order:
+------------------+
| Secure M33 |
| (Secure Core) |
+------------------+
|
v
+------------------+
| M33 |
| (Non-Secure Core)|
+------------------+
|
v
+-------------------+
| M55 |
| (Application Core)|
+-------------------+
⚠️ Please strictly follow the above flashing sequence; otherwise, the system may fail to run properly.
If the example does not run correctly, first compile and flash the Edgi-Talk_M33_S_Template project to ensure proper initialization and core startup, then run this example.
To enable the M55 core, enable the following configuration in the M33 project:
RT-Thread Settings --> Hardware --> select SOC Multi Core Mode --> Enable CM55 Core