MindMap Gallery GD32 processor knowledge map
GigaDevice innovative processor, GD32 processor is a high-performance, low-power consumption 32-bit microcontroller series with broad application prospects and strong development support.
Edited at 2024-11-30 07:30:42ルミ:精神的な目覚めの10次元。あなたが自分自身を探すのをやめるとき、あなたが探しているのはあなたを探しているので、あなたは宇宙全体を見つけるでしょう。あなたが毎日忍耐することは何でもあなたの精神の深みへの扉を開くことができます。沈黙の中で、私は秘密の領域に滑り込み、私は私の周りの魔法を観察するためにすべてを楽しんだが、何の騒ぎをしなかった。翼で生まれたときに、なぜcraいるのが好きですか?魂には独自の耳があり、心が理解できないことを聞くことができます。すべてへの答えを内向きに求めてください、宇宙のすべてがあなたの中にあります。恋人たちはどこかで会うことはなく、この世界には別れもありません。傷は光があなたの心に入るところです。
慢性心不全は、心拍数の速度の問題だけではありません!これは、心筋収縮と拡張期機能の減少によって引き起こされ、それが不十分な心拍出量につながり、肺循環の鬱血と全身循環のうっ血を引き起こします。原因、誘導、補償メカニズムまで、心不全の病態生理学的プロセスは複雑で多様です。浮腫を制御し、心臓の前面と後負荷を減らし、心臓の快適機能を改善し、基本的な原因を予防し、治療することにより、この課題に効果的に対応できます。心不全とマスタリング予防と治療戦略のメカニズムと臨床的症状を理解することによってのみ、心臓の健康をよりよく保護できます。
虚血再灌流損傷は、臓器や組織が血液供給を回復すると、細胞機能と代謝障害、構造的損傷が悪化する現象です。その主なメカニズムには、フリーラジカル生成の増加、カルシウム過負荷、および微小血管および白血球の役割が含まれます。心臓と脳は一般的な損傷した臓器であり、心筋の代謝と超微細構造の変化、心機能の低下などの変化として現れます。予防と制御の測定には、フリーラジカルの除去、カルシウム過負荷の減少、代謝の改善、低温、低温、低圧などの再灌流条件の制御が含まれます。これらのメカニズムを理解することは、効果的な治療オプションの開発に役立ち、虚血性損傷を軽減するのに役立ちます。
ルミ:精神的な目覚めの10次元。あなたが自分自身を探すのをやめるとき、あなたが探しているのはあなたを探しているので、あなたは宇宙全体を見つけるでしょう。あなたが毎日忍耐することは何でもあなたの精神の深みへの扉を開くことができます。沈黙の中で、私は秘密の領域に滑り込み、私は私の周りの魔法を観察するためにすべてを楽しんだが、何の騒ぎをしなかった。翼で生まれたときに、なぜcraいるのが好きですか?魂には独自の耳があり、心が理解できないことを聞くことができます。すべてへの答えを内向きに求めてください、宇宙のすべてがあなたの中にあります。恋人たちはどこかで会うことはなく、この世界には別れもありません。傷は光があなたの心に入るところです。
慢性心不全は、心拍数の速度の問題だけではありません!これは、心筋収縮と拡張期機能の減少によって引き起こされ、それが不十分な心拍出量につながり、肺循環の鬱血と全身循環のうっ血を引き起こします。原因、誘導、補償メカニズムまで、心不全の病態生理学的プロセスは複雑で多様です。浮腫を制御し、心臓の前面と後負荷を減らし、心臓の快適機能を改善し、基本的な原因を予防し、治療することにより、この課題に効果的に対応できます。心不全とマスタリング予防と治療戦略のメカニズムと臨床的症状を理解することによってのみ、心臓の健康をよりよく保護できます。
虚血再灌流損傷は、臓器や組織が血液供給を回復すると、細胞機能と代謝障害、構造的損傷が悪化する現象です。その主なメカニズムには、フリーラジカル生成の増加、カルシウム過負荷、および微小血管および白血球の役割が含まれます。心臓と脳は一般的な損傷した臓器であり、心筋の代謝と超微細構造の変化、心機能の低下などの変化として現れます。予防と制御の測定には、フリーラジカルの除去、カルシウム過負荷の減少、代謝の改善、低温、低温、低圧などの再灌流条件の制御が含まれます。これらのメカニズムを理解することは、効果的な治療オプションの開発に役立ち、虚血性損傷を軽減するのに役立ちます。
GD32
GD32F307C
Boot from SRAM
The address of Reset_Handler must be 0x200001e1
Check map file
Adjust vector tables in .s files
Add before __Vectors_End
The exact number depends on the situation
Adjust IROM1 IRAM1 in Target
Adjust Flash Download
Start by modifying the main function
nvic_vector_table_set(NVIC_VECTTAB_RAM, 0x00)
Configure the NVIC interrupt vector table base address
STM32
NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x00);
Note: STM32 has macro VECT_TAB_SRM control
SystemInit();
NVIC interrupt
Responsible for managing interrupt requests (IRQs)
Interrupt priority management
: NVIC supports up to 256 interrupt priority levels, but GD32F307C usually only uses 16 of them. Each interrupt can be assigned a priority level, with lower priority values indicating higher priority.
Interrupt vector table
: NVIC uses the interrupt vector table to store the address of the interrupt service routine (ISR). When an interrupt occurs, NVIC will obtain the corresponding ISR address from the vector table based on the interrupt number, and jump to this address to execute the ISR.
Break nesting
: NVIC supports interrupt nesting, that is, high-priority interrupts can interrupt low-priority interrupt processing.
Interrupt enable and disable
: NVIC allows the enable and disable status of each interrupt to be controlled through registers.
NVIC register
ISER (Interrupt Set-Enable Register): used to enable interrupts.
ICER (Interrupt Clear-Enable Register): used to disable interrupts.
ISPR (Interrupt Set-Pending Register): used to set interrupts to pending status.
ICPR (Interrupt Clear-Pending Register): used to clear the pending status of interrupts.
IPR (Interrupt Priority Register): used to set the priority of interrupts.
SysTick
24-bit down counter
Usually used to implement the operating system's clock tick or simple delay function
Features
Auto-reload: SysTick can be configured to automatically reload a preset value when the counter decrements to zero, thus enabling periodic interrupts.
Interrupt generation: When the SysTick counter decrements to zero, a SysTick interrupt can be triggered. This interrupt is usually used for task scheduling or time slice rotation of the operating system.
Simple and easy to use: SysTick is very simple to configure and use, usually only needing to set a few registers.
register
CTRL (Control and Status Register): used to control the working mode and status of SysTick.
LOAD (Reload Value Register): used to set the reload value of the SysTick counter.
VAL (Current Value Register): used to read the value of the current SysTick counter.
CALIB (Calibration Value Register): used to provide calibration information, usually used for the clock beat of the operating system.
Example
Polling to read characters
serial port
USART
Application scenarios
Suitable for situations where synchronous and asynchronous communication are required, such as clock-synchronized data transmission with external devices.
synchronous mode
asynchronous mode
Similar to UART
UART
Application scenarios
Simple point-to-point asynchronous communication, such as communicating with sensors, debugging tools, etc.
asynchronous mode
Only supports asynchronous communication mode
Compatible with M3
M4 without FP was compatible with M3
FreeRTOS
The port can use CM3 files
Transplantation process
1. Prepare
Download FreeRTOS LTS source code
FreeRTOSv202406.01-LTS
Keil Engineering
2. Copy the FreeRTOS Kernel code file to the corresponding directory of the project
1. The directory under the project is FreeRTOS
2. Crop, keep file
croutine.c
event_groups.c
list.c
queue.c
stream_buffer.c
tasks.c
timers.c
include directory
portable directory
MemMang Catalog
RVDS directory
ARM_CM3 directory
3. FreeRTOSConfig.h
Can be configured manually
You can also directly copy other reference routines
3. Modify code
gd32f30x_it.c
Annotation function void PendSV_Handler(void)
Annotation function void SVC_Handler(void)
Annotation function void SysTick_Handler(void)
Using the implementation in the FreeRTOS file port.c
4. Configure Keil project
(1) Options for Target
Inclusion Paths
..\FreeRTOS\include
..\FreeRTOS\portable\RVDS\ARM_CM3
(2) Manage Project Items
Project Items
Groups
Add group
FreeRTOS_Core
FreeRTOS_Port
5. Program reference FreeRTOS API
Example
xTimerCreate
xTaskCreate
Actual combat
Reference header file
#include "FreeRTOS.h"
other
project
keil5 opens the keil4 project
Directly modify the file name uproj -> uprojx
GD32 processor knowledge map
NVIC interrupt
Responsible for managing interrupt requests (IRQs)
Interrupt priority management
The NVIC supports up to 256 interrupt priority levels, but the GD32F307C typically only uses 16 of them. Each interrupt can be assigned a priority level, with lower priority values indicating higher priority.
Interrupt vector table
The NVIC uses an interrupt vector table to store the addresses of interrupt service routines (ISRs). When an interrupt occurs, NVIC will obtain the corresponding ISR address from the vector table based on the interrupt number, and jump to this address to execute the ISR.
Break nesting
NVIC supports interrupt nesting, that is, high-priority interrupts can interrupt low-priority interrupt processing.
Interrupt enable and disable
The NVIC allows the enable and disable status of each interrupt to be controlled through registers.
NVIC register
ISER (Interrupt Set-Enable Register): used to enable interrupts.
ICER (Interrupt Clear-Enable Register): used to disable interrupts.
ISPR (Interrupt Set-Pending Register): used to set interrupts to pending status.
ICPR (Interrupt Clear-Pending Register): used to clear the pending status of interrupts.
IPR (Interrupt Priority Register): used to set the priority of interrupts.
SysTick
24-bit down counter
Usually used to implement the operating system's clock tick or simple delay function
Features
Auto-reload: SysTick can be configured to automatically reload a preset value when the counter decrements to zero, thus enabling periodic interrupts.
Interrupt generation: When the SysTick counter decrements to zero, a SysTick interrupt can be triggered. This interrupt is usually used for task scheduling or time slice rotation of the operating system.
Simple and easy to use: SysTick is very simple to configure and use, usually only needing to set a few registers.
register
CTRL (Control and Status Register): used to control the working mode and status of SysTick.
LOAD (Reload Value Register): used to set the reload value of the SysTick counter.
VAL (Current Value Register): used to read the value of the current SysTick counter.
CALIB (Calibration Value Register): used to provide calibration information, usually used for the clock beat of the operating system.
Example
serial port
USART
Application scenarios
Suitable for situations where synchronous and asynchronous communication are required, such as clock-synchronized data transmission with external devices.
synchronous mode
asynchronous mode
Similar to UART
UART
Application scenarios
Simple point-to-point asynchronous communication, such as communicating with sensors, debugging tools, etc.
asynchronous mode
Only supports asynchronous communication mode