<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Embedded System &#8211; Welcome to Hang&#039;s Website!</title>
	<atom:link href="https://hangpersonal.com/category/embedded-system/feed/" rel="self" type="application/rss+xml" />
	<link>https://hangpersonal.com</link>
	<description>Embedded Systems</description>
	<lastBuildDate>Sun, 21 Jun 2026 02:50:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://hangpersonal.com/wp-content/uploads/2024/10/cropped-HC-32x32.jpg</url>
	<title>Embedded System &#8211; Welcome to Hang&#039;s Website!</title>
	<link>https://hangpersonal.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">252449636</site>	<item>
		<title>TI C2000: Communication &#8211; Serial Communication Interface (SCI)</title>
		<link>https://hangpersonal.com/2026/06/13/c2000-sci/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Sun, 14 Jun 2026 04:04:26 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=6546</guid>

					<description><![CDATA[TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication Please also see this post about the SCI/UART communication protocol. TMS320F28x7x Serial Communications Interface (SCI) TMS320F28x7x SCI Multiprocessor Wake-Up Modes TMS320F28x7x SCI Summary Serial Communications Interface (SCI) The SCI is a two-wire asynchronous serial port (also known as a UART) that supports communications between the processor and...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/ti-mcu/c2000-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
</a>
<br><br>

<a href="https://hangpersonal.com/2026/01/02/uart/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
Please also see this post about the SCI/UART communication protocol.
</a>



<ul style="margin-top:30px; margin-bottom:30px;">

<li style="margin-bottom:16px;">
<a href="#c28x_sci" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Serial Communications Interface (SCI)</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28_sci_wakeup" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x SCI Multiprocessor Wake-Up Modes
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28_sci_summary" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x SCI Summary</a>
</li> 

</ul>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_sci" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Serial Communications Interface (SCI)</b>

<p>
The SCI is a two-wire asynchronous serial port (also known as a UART) that supports communications between the processor and other asynchronous peripherals that use the standard non-return-to-zero (NRZ) format. A receiver and transmitter 16-level deep FIFO is used to reduce servicing overhead. The SCI transmit and receive registers are both double-buffered to prevent data collisions and allow for efficient CPU usage. In addition, the C28x SCI is a full duplex interface which provides for simultaneous data transmit and receive. Parity checking and
data formatting is also designed to be done by the port hardware, further reducing software
overhead.</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_pin_connections-1024x770.png" alt="" class="wp-image-6551" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_pin_connections-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_pin_connections-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_pin_connections-768x577.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_pin_connections-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_pin_connections.png 1201w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<p>
The basic unit of data is called a character and is 1 to 8 bits in length. Each character of data is formatted with a start bit, 1 or 2 stop bits, an optional parity bit, and an optional address/data bit. A character of data along with its formatting bits is called a frame. Frames are organized into groups called blocks. If more than two serial ports exist on the SCI bus, a block of data will usually begin with an address frame which specifies the destination port of the data as determined by the user’s protocol.</p>

<p>
The start bit is a low bit at the beginning of each frame which marks the beginning of a frame. The SCI uses a NRZ (Non-Return-to-Zero) format which means that in an inactive state the SCIRX and SCITX lines will be held high. Peripherals are expected to pull the SCIRX and SCITX lines to a high level when they are not receiving or transmitting on their respective lines.
</p>

<p>
When configuring the SCICCR, the SCI port should first be held in an inactive state. This is done using the SW RESET bit of the SCI Control Register 1 (SCICTL1.5). Writing a 0 to this bit initializes and holds the SCI state machines and operating flags at their reset condition. The SCICCR can then be configured. Afterwards, re-enable the SCI port by writing a 1 to the SW RESET bit. At system reset, the SW RESET bit equals 0.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_data_timing-1024x771.png" alt="" class="wp-image-6558" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_data_timing-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_data_timing-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_data_timing-768x579.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_data_timing-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_data_timing.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_sci_wakeup" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Multiprocessor Wake-Up Modes
</b>

<ul>

<li>
Allows numerous processors to be hooked up to the bus, but transmission occurs between only two of them
</li>

<li> Idle-line or Address-bit modes
</li>

<li>
Sequence of Operation

<ul>

<li>
Potential receivers set SLEEP = 1, which disables RXINT except when an address frame is received
</li>

<li> 
All transmissions begin with an address frame
</li>

<li> 
Incoming address frame temporarily wakes up all SCIs on bus
</li>

<li> 
CPUs compare incoming SCI address to their SCI address
</li>

<li> 
Process following data frames only if address matches
</li>

</ul>

</li>



</ul>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img decoding="async" width="1024" height="726" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_idle_line_wake_up_mode-1024x726.png" alt="" class="wp-image-6566" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_idle_line_wake_up_mode-1024x726.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_idle_line_wake_up_mode-300x213.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_idle_line_wake_up_mode-768x545.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_idle_line_wake_up_mode-850x603.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_idle_line_wake_up_mode.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="660" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_address_bit_wake_up_mode-1024x660.png" alt="" class="wp-image-6568" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_address_bit_wake_up_mode-1024x660.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_address_bit_wake_up_mode-300x194.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_address_bit_wake_up_mode-768x495.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_address_bit_wake_up_mode-850x548.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_sci_address_bit_wake_up_mode.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<p>
The SCI interrupt logic generates interrupt flags when it receives or transmits a complete character as determined by the SCI character length. This provides a convenient and efficient way of timing and controlling the operation of the SCI transmitter and receiver. The interrupt flag for the transmitter is TXRDY (SCICTL2.7), and for the receiver RXRDY (SCIRXST.6). TXRDY is set when a character is transferred to TXSHF and SCITXBUF is ready to receive the next character. In addition, when both the SCIBUF and TXSHF registers are empty, the TX EMPTY flag (SCICTL2.6) is set. When a new character has been received and shifted into SCIRXBUF, the RXRDY flag is set. In addition, the BRKDT flag is set if a break condition occurs. A break condition is where the SCIRXD line remains continuously low for at least ten bits, beginning after a missing stop bit. Each of the above flags can be polled by the CPU to control SCI operations, or interrupts associated with the flags can be enabled by setting the RX/BK INT ENA (SCICTL2.1) and/or the TX INT ENA (SCICTL2.0) bits active high.
</p>

<p>
Additional flag and interrupt capability exists for other receiver errors. The RX ERROR flag is the logical OR of the break detect (BRKDT), framing error (FE), receiver overrun (OE), and parity error (PE) bits. RX ERROR high indicates that at least one of these four errors has occurred during transmission. This will also send an interrupt request to the CPU if the RX ERR INT ENA (SCICTL1.6) bit is set.
</p>

</div>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_sci_summary" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
SCI Summary
</b>

<ul>

<li> Asynchronous communications format
</li>

<li> 65,000+ different programmable baud rates
</li>

<li> Two wake-up multiprocessor modes
<ul>
<li> Idle-line wake-up &#038; Address-bit wake-up
</li>
</ul>
</li>

<li> Programmable data word format
<ul>

<li> 1 to 8 bit data word length
</li>

<li> 1 or 2 stop bits
</li>

<li> even/odd/no parity
</li>

</ul>
</li>


<li> Error Detection Flags
<ul>
<li> Parity error; Framing error; Overrun error; Break detection
</li>
</ul>
</li>

<li> Transmit FIFO and receive FIFO
</li>

<li> Individual interrupts for transmit and receive
</li>

</ul>


</div>



<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6546</post-id>	</item>
		<item>
		<title>TI C2000: Control – enhanced Capture (eCAP)</title>
		<link>https://hangpersonal.com/2026/06/07/c2000-ecap/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Mon, 08 Jun 2026 04:06:28 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=6522</guid>

					<description><![CDATA[TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication Capture Module (eCAP) Reference [1] TMS320F2837xD Microcontroller Workshop Back to top of the page]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/ti-mcu/c2000-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
</a>
<br><br>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
Capture Module (eCAP)
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap-1024x770.png" alt="" class="wp-image-6526" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap-300x225.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap-768x577.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_capture_mode-1024x771.png" alt="" class="wp-image-6527" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_capture_mode-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_capture_mode-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_capture_mode-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_capture_mode-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_capture_mode.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_apwm_mode-1024x771.png" alt="" class="wp-image-6528" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_apwm_mode-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_apwm_mode-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_apwm_mode-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_apwm_mode-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_ecap_block_diagram_apwm_mode.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6522</post-id>	</item>
		<item>
		<title>TI C2000: Control – enhanced Pulse Width Modulation (ePWM)</title>
		<link>https://hangpersonal.com/2026/06/03/c2000-epwm/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Wed, 03 Jun 2026 16:18:31 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=6454</guid>

					<description><![CDATA[TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication ePWM Module Signals and Connections ePWM Block Diagram ePWM Time-Base Sub-Module ePWM Compare Sub-Module ePWM Action Qualifier Sub-Module ePWM Dead-Band Sub-Module ePWM Chopper Sub-Module Purpose of the PWM Chopper Allows a high frequency carrier signal to modulate the PWM waveform generated by the Action Qualifier and Dead-Band...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/ti-mcu/c2000-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
</a>
<br><br>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Module Signals and Connections
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_signals_connections-1024x771.png" alt="" class="wp-image-6463" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_signals_connections-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_signals_connections-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_signals_connections-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_signals_connections-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_signals_connections.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Block Diagram
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_block_diagram-1024x771.png" alt="" class="wp-image-6467" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_block_diagram-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_block_diagram-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_block_diagram-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_block_diagram-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_block_diagram.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Time-Base Sub-Module
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_time_base_count_modes-1024x770.png" alt="" class="wp-image-6469" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_time_base_count_modes-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_time_base_count_modes-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_time_base_count_modes-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_time_base_count_modes-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_time_base_count_modes.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_phase_sync-1024x771.png" alt="" class="wp-image-6471" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_phase_sync-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_phase_sync-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_phase_sync-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_phase_sync-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_phase_sync.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Compare Sub-Module
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_compare_event_waveforms-1024x771.png" alt="" class="wp-image-6474" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_compare_event_waveforms-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_compare_event_waveforms-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_compare_event_waveforms-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_compare_event_waveforms-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_compare_event_waveforms.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Action Qualifier Sub-Module
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="772" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_action_qualifier_actions-1024x772.png" alt="" class="wp-image-6476" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_action_qualifier_actions-1024x772.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_action_qualifier_actions-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_action_qualifier_actions-768x579.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_action_qualifier_actions-850x641.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_action_qualifier_actions.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_1-1024x770.png" alt="" class="wp-image-6478" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_1-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_1-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_1-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_1-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_1.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_2-1024x770.png" alt="" class="wp-image-6480" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_2-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_2-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_2-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_2-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_asymmetric_waveform_2.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_1-1024x771.png" alt="" class="wp-image-6482" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_1-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_1-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_1-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_1-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_1.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_2-1024x771.png" alt="" class="wp-image-6484" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_2-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_2-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_2-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_2-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_count_up_down_symmetric_waveform_2.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Dead-Band Sub-Module
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_sub_module-1024x770.png" alt="" class="wp-image-6487" style="width:700px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_sub_module-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_sub_module-300x225.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_sub_module-768x577.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_sub_module-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_sub_module.png 1308w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="772" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_block_diagram-1024x772.png" alt="" class="wp-image-6490" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_block_diagram-1024x772.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_block_diagram-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_block_diagram-768x579.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_block_diagram-850x641.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_dead_band_block_diagram.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
ePWM Chopper Sub-Module
</b>

<b style="color: black;">Purpose of the PWM Chopper</b>
<br>

<ul>

<li>
Allows a high frequency carrier signal to modulate the PWM waveform generated by the Action Qualifier and Dead-Band modules
</li>

<li>
Used with pulse transformer-based gate drivers to control power switching elements
</li>

</ul>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="772" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_chopper_waveform-1024x772.png" alt="" class="wp-image-6493" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_chopper_waveform-1024x772.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_chopper_waveform-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_chopper_waveform-768x579.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_chopper_waveform-850x641.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_chopper_waveform.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Trip-Zone and Digital Compare Sub-Module
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_digital_compare_inputs-1024x770.png" alt="" class="wp-image-6501" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_digital_compare_inputs-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_digital_compare_inputs-300x225.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_digital_compare_inputs-768x577.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_digital_compare_inputs-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_digital_compare_inputs.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar-1024x770.png" alt="" class="wp-image-6503" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar_architecture-1024x770.png" alt="" class="wp-image-6505" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar_architecture-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar_architecture-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar_architecture-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar_architecture-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_x_bar_architecture.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_features-1024x770.png" alt="" class="wp-image-6506" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_features-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_features-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_features-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_features-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_trip_zone_features.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:50px;">

<b style="color: black;">
Purpose of the Digital Compare Sub-Module
</b>
<br>

<ul>

<li>
Generates compare events that can:

<ul>

<li> Trip the ePWM
</li>

<li> Generate a Trip interrupt
</li>

<li> Sync the ePWM
</li>

<li> Generate an ADC start of conversion
</li>

</ul>

</li>

<li>
Digital compare module inputs are:

<ul>

<li> Input X-Bar
</li>

<li> ePWM X-Bar
</li>

<li> Trip-zone input pins
</li>

</ul>

</li>

<li> A compare event is generated when one or more of its selected inputs are either high or low
</li>

<li> Optional Blanking can be used to temporarily disable the compare action in alignment with PWM switching to eliminate noise effects
</li>




</ul>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_sub_module_signals-1024x770.png" alt="" class="wp-image-6511" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_sub_module_signals-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_sub_module_signals-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_sub_module_signals-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_sub_module_signals-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_sub_module_signals.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_events-1024x771.png" alt="" class="wp-image-6513" style="width:700px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_events-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_events-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_events-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_events-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_digital_compare_events.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
ePWM Event-Trigger Sub-Module
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_event_trigger_interrupts_soc-1024x771.png" alt="" class="wp-image-6517" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_event_trigger_interrupts_soc-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_event_trigger_interrupts_soc-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_event_trigger_interrupts_soc-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_event_trigger_interrupts_soc-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_event_trigger_interrupts_soc.png 1443w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:0px;">
Hi-Resolution PWM (HRPWM)
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_hrpwm-1024x770.png" alt="" class="wp-image-6519" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_hrpwm-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_hrpwm-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_hrpwm-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_hrpwm-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/06/c28_epwm_hrpwm.png 1457w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6454</post-id>	</item>
		<item>
		<title>TI C2000: Analog Subsystem – Sigma Delta Filter Module (SDFM)</title>
		<link>https://hangpersonal.com/2026/05/31/c2000-sdfm/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Sun, 31 May 2026 20:20:40 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=6388</guid>

					<description><![CDATA[TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication TMS320F28x7x Sigma Delta Filter Module (SDFM) TMS320F28x7x SDFM Block Diagram Sigma Delta Filter Module (SDFM) The SDFM is a four-channel digital filter designed specifically for current measurement and resolver position decoding in motor control applications. Each channel can receive an independent delta-sigma modulator bit stream which is...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/ti-mcu/c2000-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
</a>
<br><br>



<ul style="margin-top:30px; margin-bottom:30px;">

<li style="margin-bottom:16px;">
<a href="#c28x_sdfm" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Sigma Delta Filter Module (SDFM)
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28_sdfm_block" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x SDFM Block Diagram
</a>
</li> 

</ul>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_sdfm" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Sigma Delta Filter Module (SDFM)
</b>

<p>
The SDFM is a four-channel digital filter designed specifically for current measurement and resolver position decoding in motor control applications. Each channel can receive an
independent delta-sigma modulator bit stream which is processed by four individually programmable digital decimation filters. The filters include a fast comparator for immediate digital threshold comparisons for over-current and under-current monitoring. Also, a filter-bypass mode is available to enable data logging, analysis, and customized filtering. The SDFM pins are configured using the GPIO multiplexer. A key benefit of the SDFM is it enables a simple, costeffective, and safe high-voltage isolation boundary.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="769" src="https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm-1024x769.png" alt="" class="wp-image-6394" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm-1024x769.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm-300x225.png 300w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm-768x577.png 768w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm.png 1267w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_sdfm_block" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
SDFM Block Diagram
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="822" src="https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm_block-1024x822.png" alt="" class="wp-image-6399" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm_block-1024x822.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm_block-300x241.png 300w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm_block-768x617.png 768w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm_block-850x682.png 850w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_sdfm_block.png 1141w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6388</post-id>	</item>
		<item>
		<title>TI C2000: Analog Subsystem – Comparator Subsystem (CMPSS)</title>
		<link>https://hangpersonal.com/2026/05/31/c2000-cmpss/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Sun, 31 May 2026 19:58:21 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=6371</guid>

					<description><![CDATA[TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication TMS320F28x7x Comparator Subsystem (CMPSS) TMS320F28x7x Comparator Subsystem Block Diagram Comparator Subsystem (CMPSS) The F2837xD includes eight independent Comparator Subsystem (CMPSS) modules that are useful for supporting applications such as peak current mode control, switched-mode power, power factor correction, and voltage trip monitoring. The Comparator Subsystem modules have...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/ti-mcu/c2000-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
</a>
<br><br>



<ul style="margin-top:30px; margin-bottom:30px;">

<li style="margin-bottom:16px;">
<a href="#c28x_cmpss" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Comparator Subsystem (CMPSS)
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28_cmpss_block" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Comparator Subsystem Block Diagram
</a>
</li> 

</ul>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_cmpss" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Comparator Subsystem (CMPSS)
</b>

<p>
The F2837xD includes eight independent Comparator Subsystem (CMPSS) modules that are useful for supporting applications such as peak current mode control, switched-mode power, power factor correction, and voltage trip monitoring. The Comparator Subsystem modules have the ability to synchronize with a PWMSYNC event.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss-1024x771.png" alt="" class="wp-image-6378" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss.png 1235w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b id="c28_cmpss_block" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Comparator Subsystem Block Diagram
</b>

<p>
Each CMPSS module is designed around a pair of analog comparators which generates a digital output indicating if the voltage on the positive input is greater than the voltage on the negative input. The positive input to the comparator is always driven from an external pin. The negative input can be driven by either an external pin or an internal programmable 12-bit digital-to-analog (DAC) as a reference voltage. Values written to the DAC can take effect immediately or be synchronized with ePWM events. A falling-ramp generator is optionally available to the control the internal DAC reference value for one comparator in the module. Each comparator output is feed through a programmable digital filter that can remove spurious trip signals. The output of the CMPSS generates trip signals to the ePWM event trigger submodule and GPIO structure.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss_block-1024x771.png" alt="" class="wp-image-6383" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss_block-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss_block-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss_block-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss_block-850x640.png 850w, https://hangpersonal.com/wp-content/uploads/2026/05/c28_cmpss_block.png 1236w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6371</post-id>	</item>
		<item>
		<title>STM32 FreeRTOS: FreeRTOS Scheduler</title>
		<link>https://hangpersonal.com/2026/02/25/stm32-freertos-scheduler/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Thu, 26 Feb 2026 02:46:40 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=5199</guid>

					<description><![CDATA[STM32 Microcontroller and FreeRTOS Development The scheduling algorithm is the software routine that decides which ready state task to transition into the running state. Round Robin: this scheduler will ensure tasks that share priority are selected to enter the running state in turn. The Round Robin scheduling algorithm in FreeRTOS does not guarantee time is...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/stm32-mcu/freertos-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
STM32 Microcontroller and FreeRTOS Development
</a>

<br><br>



<div class="article-text" style="margin-top:30px; margin-bottom:50px;">

<p>
The <b>scheduling algorithm</b> is the software routine that decides which ready state task to transition into the running state.
</p>

<p>
<b>Round Robin</b>: this scheduler will ensure tasks that share priority are selected to enter the running state in turn. The Round Robin scheduling algorithm in FreeRTOS does not guarantee time is shared equally between tasks of equal priority, only that ready state tasks of equal priority will enter the running state in turn.
</p>

<p>
<b>Fixed priority</b>: this scheduler does not change the priority assigned to the tasks being scheduled but also does not prevent the tasked from changing their own priority or that of other tasks.
</p>

<p>
<b>Pre-emptive</b>: this scheduler will immediately preempt the running state task if a task that has priority higher than the running state task enters the ready state. Being pre-empted means being involuntarily moved out of the running state and into the ready state to allow a different task to enter the running state.
</p>

<p>
<b>Time slicing</b>: this scheduler shares processing time between tasks of equal priority, even when the task does not explicitly yield or enter the blocked state. Scheduling algorithms described as using time slicing will select a new task to enter the running state at the end of each time slice if there are other ready state tasks that have the same priority as running task.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// FreeRTOSConfig.h

// Preemptive priority scheduler
// No automatic round-robin for equal priorities
// Deterministic execution until voluntary block/yield
#define configUSE_PREEMPTION                      1 
#define configUSE_TIME_SLICING                    0

// Priority-based preemptive scheduling
// Round-robin between equal priorities
#define configUSE_PREEMPTION                      1 
#define configUSE_TIME_SLICING                    1 </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">// FreeRTOSConfig.h</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Preemptive priority scheduler</span></span>
<span class="line"><span style="color: #6A9955">// No automatic round-robin for equal priorities</span></span>
<span class="line"><span style="color: #6A9955">// Deterministic execution until voluntary block/yield</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_PREEMPTION                      </span><span style="color: #B5CEA8">1</span><span style="color: #569CD6"> </span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_TIME_SLICING                    </span><span style="color: #B5CEA8">0</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A9955">// Priority-based preemptive scheduling</span></span>
<span class="line"><span style="color: #6A9955">// Round-robin between equal priorities</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_PREEMPTION                      </span><span style="color: #B5CEA8">1</span><span style="color: #569CD6"> </span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_TIME_SLICING                    </span><span style="color: #B5CEA8">1</span><span style="color: #569CD6"> </span></span></code></pre></div>



<br>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// FreeRTOSConfig.h

#define configENABLE_FPU                          1
#define configENABLE_MPU                          0
#define configSUPPORT_STATIC_ALLOCATION           1
#define configSUPPORT_DYNAMIC_ALLOCATION          1
#define configUSE_PREEMPTION                      1
#define configUSE_TIME_SLICING                    1
#define configUSE_IDLE_HOOK                       0
#define configUSE_TICK_HOOK                       0
#define configUSE_QUEUE_SETS                      1
#define configUSE_TRACE_FACILITY                  1
#define configUSE_16_BIT_TICKS                    0
#define configUSE_MUTEXES                         1
#define configUSE_TASK_NOTIFICATIONS              1
#define configUSE_RECURSIVE_MUTEXES               1
#define configUSE_COUNTING_SEMAPHORES             1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION   0
#define configCPU_CLOCK_HZ                        ( SystemCoreClock ) // system_stm32f4xx.c
#define configTICK_RATE_HZ                        ((TickType_t)1000)
#define configMAX_PRIORITIES                      ( 56 )
#define configMINIMAL_STACK_SIZE                  ((uint16_t)128)
#define configTOTAL_HEAP_SIZE                     ((size_t)24*1024)
#define configMAX_TASK_NAME_LEN                   ( 16 )
#define configQUEUE_REGISTRY_SIZE                 8</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #6A9955">// FreeRTOSConfig.h</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configENABLE_FPU                          </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configENABLE_MPU                          </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configSUPPORT_STATIC_ALLOCATION           </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configSUPPORT_DYNAMIC_ALLOCATION          </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_PREEMPTION                      </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_TIME_SLICING                    </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_IDLE_HOOK                       </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_TICK_HOOK                       </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_QUEUE_SETS                      </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_TRACE_FACILITY                  </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_16_BIT_TICKS                    </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_MUTEXES                         </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_TASK_NOTIFICATIONS              </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_RECURSIVE_MUTEXES               </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_COUNTING_SEMAPHORES             </span><span style="color: #B5CEA8">1</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configUSE_PORT_OPTIMISED_TASK_SELECTION   </span><span style="color: #B5CEA8">0</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configCPU_CLOCK_HZ                        ( SystemCoreClock )</span><span style="color: #6A9955"> // system_stm32f4xx.c</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configTICK_RATE_HZ                        ((</span><span style="color: #4EC9B0">TickType_t</span><span style="color: #569CD6">)</span><span style="color: #B5CEA8">1000</span><span style="color: #569CD6">)</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configMAX_PRIORITIES                      ( </span><span style="color: #B5CEA8">56</span><span style="color: #569CD6"> )</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configMINIMAL_STACK_SIZE                  ((uint16_t)</span><span style="color: #B5CEA8">128</span><span style="color: #569CD6">)</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configTOTAL_HEAP_SIZE                     ((size_t)</span><span style="color: #B5CEA8">24</span><span style="color: #D4D4D4">*</span><span style="color: #B5CEA8">1024</span><span style="color: #569CD6">)</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configMAX_TASK_NAME_LEN                   ( </span><span style="color: #B5CEA8">16</span><span style="color: #569CD6"> )</span></span>
<span class="line"><span style="color: #C586C0">#define</span><span style="color: #569CD6"> configQUEUE_REGISTRY_SIZE                 </span><span style="color: #B5CEA8">8</span></span></code></pre></div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5199</post-id>	</item>
		<item>
		<title>STM32 FreeRTOS: Task Notifications</title>
		<link>https://hangpersonal.com/2026/02/19/stm32-freertos-task-notification/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Fri, 20 Feb 2026 04:49:27 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=5186</guid>

					<description><![CDATA[Work in Process STM32 Microcontroller and FreeRTOS Development Back to top of the page]]></description>
										<content:encoded><![CDATA[
<span style="font-family: 'Inter', sans-serif; font-size: 22px; color: red;">
Work in Process
</span>
<br><br>

<a href="https://hangpersonal.com/embedded-system/stm32-mcu/freertos-tutorials/" 
style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
STM32 Microcontroller and FreeRTOS Development
</a>
<br><br>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5186</post-id>	</item>
		<item>
		<title>TI C2000: Analog Subsystem &#8211; Digital-to-Analog Converter (DAC)</title>
		<link>https://hangpersonal.com/2026/02/15/c2000-dac/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Sun, 15 Feb 2026 21:46:03 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=5148</guid>

					<description><![CDATA[TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication TMS320F28x7x Digital-to-Analog Converter (DAC) TMS320F28x7x Buffered DAC Block Diagram Digital-to-Analog Converter (DAC) The F2837xD includes three buffered 12-bit DAC modules that can provide a programmable reference output voltage capable of driving an external load. Values written to the DAC can take effect immediately or be synchronized with...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/ti-mcu/c2000-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication
</a>
<br><br>



<ul style="margin-top:30px; margin-bottom:30px;">

<li style="margin-bottom:16px;">
<a href="#c28x_dac_converter" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Digital-to-Analog Converter (DAC)
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28_buffered_dac_block" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Buffered DAC Block Diagram
</a>
</li> 

</ul>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28_dac_converter" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Digital-to-Analog Converter (DAC)
</b>

<p>
The F2837xD includes three buffered 12-bit DAC modules that can provide a programmable reference output voltage capable of driving an external load. Values written to the DAC can take effect immediately or be synchronized with ePWM events.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="689" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_dac-1024x689.png" alt="" class="wp-image-6052" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_dac-1024x689.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dac-300x202.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dac-768x517.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dac-850x572.png 850w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dac.png 1361w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b id="c28_buffered_dac_block" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Buffered DAC Block Diagram
</b>

<p>
Two sets of DACVAL registers are present in the buffered DAC module: DACVALA and DACVALS. DACVALA is a read-only register that actively controls the DAC value. DACVALS is a writable shadow register that loads into DACVALA either immediately or synchronized with the next PWMSYNC event. The ideal output of the internal DAC can be calculated as shown in the equation below.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_buffered_dac_block-1024x770.png" alt="" class="wp-image-6055" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_buffered_dac_block-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_buffered_dac_block-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_buffered_dac_block-768x577.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_buffered_dac_block-850x639.png 850w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_buffered_dac_block.png 1443w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5148</post-id>	</item>
		<item>
		<title>TI C2000: Interrupts</title>
		<link>https://hangpersonal.com/2026/02/08/c2000-interrupt/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Sun, 08 Feb 2026 08:02:17 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=4751</guid>

					<description><![CDATA[STM32 Microcontroller and FreeRTOS Development TMS320F28x7x Interrupt Sources TMS320F28x7x Interrupt Processing TMS320F28x7x IFR, IER, INTM TMS320F28x7x Peripheral Interrupt Expansion (PIE) TMS320F28x7x PIE Block Initialization TMS320F28x7x Interrupt Signal Flow TMS320F28x7D Dual-Core Interrupt Structure TMS320F28x7x Interrupt Response and Latency TMS320F28x7x Interrupt Sources The internal interrupt sources include the general purpose timers 0, 1, and 2, and all...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/stm32-mcu/freertos-tutorials/" 
style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
STM32 Microcontroller and FreeRTOS Development
</a>
<br><br>



<ul style="margin-top:30px; margin-bottom:30px;">

<li style="margin-bottom:16px;">
<a href="#c28x_interrupt_sources" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Interrupt Sources
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_interrupt_processing" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Interrupt Processing
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_ifr_ier_intm" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x IFR, IER, INTM
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_pie" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Peripheral Interrupt Expansion (PIE)
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_pie_init" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x PIE Block Initialization
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_interrupt_signal_flow" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Interrupt Signal Flow
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_dual_core_interrupt" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7D Dual-Core Interrupt Structure
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#c28x_interrupt_latency" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
TMS320F28x7x Interrupt Response and Latency
</a>
</li> 

</ul>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28x_interrupt_sources"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x Interrupt Sources
</b>

<p>
The internal interrupt sources include the general purpose timers 0, 1, and 2, and all of the peripherals on the device. External interrupt sources include the three external interrupt lines, the trip zones, and the external reset pin. The core has 14 interrupt lines. The Peripheral Interrupt Expansion block, known as the PIE block, is connected to the core interrupt lines 1 through 12 and is used to expand the core interrupt capability, allowing up to 192 possible interrupt sources. 
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="963" height="724" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_resource.png" alt="" class="wp-image-4809" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_resource.png 963w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_resource-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_resource-768x577.png 768w" sizes="auto, (max-width: 963px) 100vw, 963px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28x_interrupt_processing"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x Interrupt Processing
</b>

<p>
By using a series of flag and enable registers, the CPU can be configured to service one interrupt while others remain pending, or perhaps disabled when servicing certain critical tasks. When an interrupt signal occurs on a core line, the interrupt flag register (<b>IFR</b>) for that core line is set. If the appropriate interrupt enable register (<b>IER</b>) is enabled for that core line, and the interrupt global mask (<b>INTM</b>) is enabled, the interrupt signal will propagate to the core. 
</p>

<p>
Once the interrupt service routine (<b>ISR</b>) starts processing the interrupt, the <b>INTM</b> bit is disabled to prevent nested interrupts. The <b>IFR</b> is then cleared and ready for the next interrupt signal. When the interrupt servicing is completed, the <b>INTM</b> bit is automatically enabled, allowing the next interrupt to be serviced. Notice that when the <b>INTM</b> bit is <b>0</b>, the switch is closed and enabled. When the bit is <b>1</b>, the switch is open and disabled. The <b>IER</b> is managed by ORing and ANDing mask values. The <b>INTM</b> bit in the status register is managed by using in-line assembly instructions.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="963" height="724" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_processing.png" alt="" class="wp-image-4818" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_processing.png 963w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_processing-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_processing-768x577.png 768w" sizes="auto, (max-width: 963px) 100vw, 963px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:20px;">

<b id="c28x_ifr_ier_intm"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x IFR, IER, INTM
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="963" height="724" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_ifr.png" alt="" class="wp-image-4823" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_ifr.png 963w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_ifr-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_ifr-768x577.png 768w" sizes="auto, (max-width: 963px) 100vw, 963px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="963" height="725" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_ier.png" alt="" class="wp-image-4824" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_ier.png 963w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_ier-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_ier-768x578.png 768w" sizes="auto, (max-width: 963px) 100vw, 963px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="963" height="724" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_intm.png" alt="" class="wp-image-4825" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_intm.png 963w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_intm-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_intm-768x577.png 768w" sizes="auto, (max-width: 963px) 100vw, 963px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:40px;">
</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// Disable CPU interrupts
DINT;

// Disable CPU interrupts and clear all CPU interrupt flags
IER = 0x0000;
IFR = 0x0000;

// Enable global Interrupts and higher priority real-time debug events
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global real-time interrupt DBGM</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #A0A1A7CC">// Disable CPU interrupts</span></span>
<span class="line"><span style="color: #D5CED9">DINT;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Disable CPU interrupts and clear all CPU interrupt flags</span></span>
<span class="line"><span style="color: #D5CED9">IER </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">0x</span><span style="color: #F39C12">0000</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">IFR </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">0x</span><span style="color: #F39C12">0000</span><span style="color: #D5CED9">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Enable global Interrupts and higher priority real-time debug events</span></span>
<span class="line"><span style="color: #D5CED9">EINT;</span><span style="color: #A0A1A7CC"> // Enable Global interrupt INTM</span></span>
<span class="line"><span style="color: #D5CED9">ERTM;</span><span style="color: #A0A1A7CC"> // Enable Global real-time interrupt DBGM</span></span></code></pre></div>



<div class="article-text" style="margin-top:60px; margin-bottom:40px;">

<b id="c28x_pie" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x Peripheral Interrupt Expansion (PIE)
</b>

<p>
The C28x CPU core has a total of fourteen interrupt lines, of which two interrupt lines are directly connected to CPU Timers 1 and 2 (on INT13 and INT14, respectively) and the remaining twelve interrupt lines (INT1 through INT12) are used to service the peripheral interrupts. A Peripheral Interrupt Expansion (PIE) module multiplexes up to sixteen peripheral interrupts into each of the twelve CPU interrupt lines, further expanding support for up to 192 peripheral interrupt signals. The PIE module also expands the interrupt vector table, allowing each unique interrupt signal to have its own interrupt service routine (ISR), permitting the CPU to support a large number of peripherals.
</p>

<p>
The PIE module has an individual flag and enable bit for each peripheral interrupt signal. Each of the sixteen peripheral interrupt signals that are multiplexed into a single CPU interrupt line is referred to as a <b>group</b>, so the PIE module consists of 12 groups. Each PIE group has a 16-bit flag register (<b>PIEIFRx</b>), a 16-bit enable register (<b>PIEIERx</b>), and a bit field in the PIE acknowledge register (<b>PIEACK</b>) which acts as a common interrupt mask for the entire group.
</p>

<p>
For a peripheral interrupt to propagate to the CPU, the appropriate <b>PIEIFR</b> must be set, the <b>PIEIER</b> enabled, the CPU IFR set, the IER enabled, and the INTM enabled. Note that some peripherals can have multiple events trigger the same interrupt signal, and the cause of the interrupt can be determined by reading the peripheral&#8217;s status register.
</p>

<p>
We have already discussed the interrupt process in the core. Now we need to look at the peripheral interrupt expansion block. This block is connected to the core interrupt lines 1 through 12. The PIE block consists of 12 groups. Within each group, there are sixteen interrupt sources. Each group has a PIE interrupt enable register and a PIE interrupt flag register. Note that interrupt lines 13, 14, and NMI bypass the PIE block.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="963" height="725" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie.png" alt="" class="wp-image-4832" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie.png 963w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie-768x578.png 768w" sizes="auto, (max-width: 963px) 100vw, 963px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<p>
The PIE assignment table maps each peripheral interrupt to the unique vector location for that interrupt service routine. Notice the interrupt numbers on the left represent the twelve core group interrupt lines and the interrupt numbers across the top represent the lower eight of the sixteen peripheral interrupts within the core group interrupt line. The next figure shows the upper eight of the sixteen peripheral interrupts within the core group interrupt line.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="772" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_lower-1024x772.png" alt="" class="wp-image-4836" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_lower-1024x772.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_lower-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_lower-768x579.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_lower.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_upper-1024x770.png" alt="" class="wp-image-4837" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_upper-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_upper-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_upper-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_table_upper.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<p>
Similar to the core interrupt process, the PIE module has an individual flag and enable bit for each peripheral interrupt signal. Each PIE group has a 16-bit flag register, a 16-bit enable register, and a bit field in the PIE acknowledge register which acts as a common interrupt mask for the entire group. The enable PIE bit in the PIECTRL register is used to activate the PIE module.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_register-1024x771.png" alt="" class="wp-image-4840" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_register-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_register-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_register-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_register.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:40px;">
</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags are cleared.
// This function is found in the F2837xD_PieCtrl.c file.
InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell 
// Interrupt Service Routines (ISR).
// This will populate the entire table, even if the interrupt 
// is not used in this example.
// The shell ISR routines are found in F2837xD_DefaultIsr.c.
// This function is found in F2837xD_PieVect.c.
InitPieVectTable();

// Interrupts that are used in this example are re-mapped to
// ISR functions found within this project
EALLOW;  
PieVectTable.SCIA_RX_INT = &amp;RXAINT_recv_ready;
PieVectTable.SCIA_TX_INT = &amp;TXAINT_data_sent;
EDIS;    

// Enable group 9 for SCIA RX/TX
IER |= (M_INT9); 

// Enable SCI-A RX interrupt in the PIE: group 9 channel 1
PieCtrlRegs.PIEIER9.bit.INTx1 = 1; 

// Enable SCI-A TX interrupt in the PIE: group 9 channel 2
PieCtrlRegs.PIEIER9.bit.INTx2 = 1; 

// Enable global Interrupts and higher priority real-time debug events
EINT;  // Enable Global interrupt INTM
ERTM;  // Enable Global realtime interrupt DBGM

// Called in RX/TX ISR function
// Acknowledge this interrupt to receive more interrupts from group 9
PieCtrlRegs.PIEACK.all = PIEACK_GROUP9;</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #A0A1A7CC">// Clear all interrupts and initialize PIE vector table:</span></span>
<span class="line"><span style="color: #A0A1A7CC">// Disable CPU interrupts</span></span>
<span class="line"><span style="color: #D5CED9">DINT;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Initialize the PIE control registers to their default state.</span></span>
<span class="line"><span style="color: #A0A1A7CC">// The default state is all PIE interrupts disabled and flags are cleared.</span></span>
<span class="line"><span style="color: #A0A1A7CC">// This function is found in the F2837xD_PieCtrl.c file.</span></span>
<span class="line"><span style="color: #FFE66D">InitPieCtrl</span><span style="color: #D5CED9">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Disable CPU interrupts and clear all CPU interrupt flags:</span></span>
<span class="line"><span style="color: #D5CED9">IER </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">0x</span><span style="color: #F39C12">0000</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">IFR </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">0x</span><span style="color: #F39C12">0000</span><span style="color: #D5CED9">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Initialize the PIE vector table with pointers to the shell </span></span>
<span class="line"><span style="color: #A0A1A7CC">// Interrupt Service Routines (ISR).</span></span>
<span class="line"><span style="color: #A0A1A7CC">// This will populate the entire table, even if the interrupt </span></span>
<span class="line"><span style="color: #A0A1A7CC">// is not used in this example.</span></span>
<span class="line"><span style="color: #A0A1A7CC">// The shell ISR routines are found in F2837xD_DefaultIsr.c.</span></span>
<span class="line"><span style="color: #A0A1A7CC">// This function is found in F2837xD_PieVect.c.</span></span>
<span class="line"><span style="color: #FFE66D">InitPieVectTable</span><span style="color: #D5CED9">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Interrupts that are used in this example are re-mapped to</span></span>
<span class="line"><span style="color: #A0A1A7CC">// ISR functions found within this project</span></span>
<span class="line"><span style="color: #D5CED9">EALLOW;  </span></span>
<span class="line"><span style="color: #D5CED9">PieVectTable.SCIA_RX_INT </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">&amp;</span><span style="color: #D5CED9">RXAINT_recv_ready;</span></span>
<span class="line"><span style="color: #D5CED9">PieVectTable.SCIA_TX_INT </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">&amp;</span><span style="color: #D5CED9">TXAINT_data_sent;</span></span>
<span class="line"><span style="color: #D5CED9">EDIS;    </span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Enable group 9 for SCIA RX/TX</span></span>
<span class="line"><span style="color: #D5CED9">IER </span><span style="color: #EE5D43">|=</span><span style="color: #D5CED9"> (M_INT9); </span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Enable SCI-A RX interrupt in the PIE: group 9 channel 1</span></span>
<span class="line"><span style="color: #D5CED9">PieCtrlRegs.PIEIER9.bit.INTx1 </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #F39C12">1</span><span style="color: #D5CED9">; </span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Enable SCI-A TX interrupt in the PIE: group 9 channel 2</span></span>
<span class="line"><span style="color: #D5CED9">PieCtrlRegs.PIEIER9.bit.INTx2 </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #F39C12">1</span><span style="color: #D5CED9">; </span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Enable global Interrupts and higher priority real-time debug events</span></span>
<span class="line"><span style="color: #D5CED9">EINT;</span><span style="color: #A0A1A7CC">  // Enable Global interrupt INTM</span></span>
<span class="line"><span style="color: #D5CED9">ERTM;</span><span style="color: #A0A1A7CC">  // Enable Global realtime interrupt DBGM</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Called in RX/TX ISR function</span></span>
<span class="line"><span style="color: #A0A1A7CC">// Acknowledge this interrupt to receive more interrupts from group 9</span></span>
<span class="line"><span style="color: #D5CED9">PieCtrlRegs.PIEACK.all </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> PIEACK_GROUP9;</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28x_pie_init"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x PIE Block Initialization
</b>

<p>
The interrupt vector table, as mapped in the PIE interrupt assignment table, is located in the PieVect.c file. During processor initialization a function call to PieCtrl.c file is used to copy the interrupt vector table to the PIE RAM and then the PIE module is enabled by setting ENPIE to 1. When the CPU receives an interrupt, the vector address of the ISR is fetched from the PIE RAM, and the interrupt with the highest priority that is both flagged and enabled is executed. Priority is determined by the location within the interrupt vector table. The lowest numbered interrupt has the highest priority when multiple interrupts are pending.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_block_init-1024x770.png" alt="" class="wp-image-4855" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_block_init-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_block_init-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_block_init-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_block_init.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<p>
In summary, the PIE initialization code flow is as follows. After the device is reset and execution of the boot code is completed, the selected boot option determines the code entry point. In this figure, two different entry points are shown. The one on the left is for memory block M0 RAM, and the one on the right is for flash.
</p>

<p>
In either case, the CodeStartBranch.asm file has a Long Branch instruction to the entry point of the runtime support library. After the runtime support library completes execution, main is called. In main, a function is called to initialize the interrupt process and enable the PIE module. When the CPU receives an interrupt, the vector address of the ISR is fetched from the PIE RAM, and the interrupt with the highest priority that is both flagged and enabled is executed. Priority is determined by the location within the interrupt vector table.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_init_flow-1024x770.png" alt="" class="wp-image-4859" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_init_flow-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_init_flow-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_init_flow-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_pie_init_flow.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28x_interrupt_signal_flow"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x Interrupt Signal Flow
</b>

<p>
In summary, the following steps occur during an interrupt process. First, a peripheral interrupt is generated and the PIE interrupt flag register is set. If the PIE interrupt enable register is enabled, then the core interrupt flag register will be set. Next, if the core interrupt enable register and global interrupt mask is enabled, the PIE vector table will redirect the code to the interrupt service routine.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_signal_flow-1024x771.png" alt="" class="wp-image-4864" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_signal_flow-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_signal_flow-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_signal_flow-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_signal_flow.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28x_dual_core_interrupt"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7D Dual-Core Interrupt Structure
</b>

<p>
Each C28x CPU core in the F2837xD device has its own PIE module, and each PIE module is configured independently. Some interrupt signals are sourced from shared peripherals that canbe owned by either CPU, and these interrupt signals are sent to both CPU PIE modules regardless of which CPU owns the peripheral. Therefore, if enabled a peripheral owned by one CPU can cause an interrupt on the other CPU.
</p>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_dual_core_interrupt-1024x771.png" alt="" class="wp-image-4868" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_dual_core_interrupt-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dual_core_interrupt-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dual_core_interrupt-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_dual_core_interrupt.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b id="c28x_interrupt_latency"
   style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
TMS320F28x7x Interrupt Response and Latency
</b>

</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_hardware_sequence-1024x771.png" alt="" class="wp-image-4872" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_hardware_sequence-1024x771.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_hardware_sequence-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_hardware_sequence-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_hardware_sequence.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:30px; margin-bottom:30px;">
</div>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="770" src="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_latency-1024x770.png" alt="" class="wp-image-4874" style="width:800px" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_latency-1024x770.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_latency-300x226.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_latency-768x578.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/c28_interrupt_latency.png 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:40px;">

<b style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
Reference
</b>

<p>
[1] <a href="https://www.ti.com/video/series/c2000-f2837xd-microcontroller-one-day-workshop-series.html" style="color: blue;">
TMS320F2837xD Microcontroller Workshop</a>
</p>

</div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4751</post-id>	</item>
		<item>
		<title>STM32 FreeRTOS: Task API Functions</title>
		<link>https://hangpersonal.com/2026/02/06/stm32-freertos-task/</link>
		
		<dc:creator><![CDATA[hangcui1201]]></dc:creator>
		<pubDate>Sat, 07 Feb 2026 06:05:29 +0000</pubDate>
				<category><![CDATA[Embedded System]]></category>
		<guid isPermaLink="false">https://hangpersonal.com/?p=4607</guid>

					<description><![CDATA[STM32 Microcontroller and FreeRTOS Development xTaskCreate() xTaskCreateStatic() vTaskDelete() vTaskPrioritySet() uxTaskPriorityGet() vTaskSuspend() vTaskResume() xTaskResumeFromISR() vTaskDelayUntil() xTaskCreate() xTaskCreate() creates a new FreeRTOS task using dynamically allocated memory. It specifies the task function, task name, stack size, input parameter, priority, and an optional task handle for controlling the task later. The function returns pdPASS when the task is...]]></description>
										<content:encoded><![CDATA[
<a href="https://hangpersonal.com/embedded-system/stm32-mcu/freertos-tutorials/" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
STM32 Microcontroller and FreeRTOS Development
</a>
<br><br>



<ul style="margin-top:30px; margin-bottom:60px;">

<li style="margin-bottom:16px;">
<a href="#task_dynamic" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
xTaskCreate()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_static" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
xTaskCreateStatic()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_delete" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
vTaskDelete()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_priority_set" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
vTaskPrioritySet()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_priority_get" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
uxTaskPriorityGet()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_suspend" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
vTaskSuspend()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_resume" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
vTaskResume()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_resume_isr" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
xTaskResumeFromISR()
</a>
</li> 

<li style="margin-bottom:16px;">
<a href="#task_delay_until" style="font-family: 'Inter', sans-serif; font-size: 22px; color: blue;">
vTaskDelayUntil()
</a>
</li> 

</ul>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="610" src="https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state-1024x610.png" alt="" class="wp-image-6450" style="object-fit:cover;object-position:68% 59%" srcset="https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state-1024x610.png 1024w, https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state-300x180.png 300w, https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state-768x457.png 768w, https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state-1536x915.png 1536w, https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state-850x506.png 850w, https://hangpersonal.com/wp-content/uploads/2026/02/freertos_task_state.png 1625w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_dynamic" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
xTaskCreate()
</b>

<p>
xTaskCreate() creates a new FreeRTOS task using dynamically allocated memory. It specifies the task function, task name, stack size, input parameter, priority, and an optional task handle for controlling the task later. The function returns pdPASS when the task is created successfully or an error value when memory allocation fails.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>#define configSUPPORT_DYNAMIC_ALLOCATION    1

BaseType_t xTaskCreate( 
  TaskFunction_t          pxTaskCode,     // Task function to execute
  const char * const      pcName,         // Task name
  const uint16_t          usStackDepth,   // Task stack size
  void * const            pvParameters,   // Parameter passed to the task
  UBaseType_t             uxPriority,     // Task priority
  TaskHandle_t * const    pxCreatedTask   // Stores the created task handle
)

// ---------------------- Example ----------------------

#define TASK1_TASK_PRIO        2      
#define TASK1_STK_SIZE         256    
TaskHandle_t Task1Task_Handler;       

void vTask1Task(void * pvParameters) {
  while(1) {
	  vTaskDelay(pdMS_TO_TICKS(1000));
	}
}

#define TASK2_TASK_PRIO        3      
#define TASK2_STK_SIZE         256    
TaskHandle_t Task2Task_Handler;       

void vTask2Task(void * pvParameters) {
	while(1) {
		vTaskDelay(pdMS_TO_TICKS(500));
	}
}

xReturn = xTaskCreate((TaskFunction_t ) vTask1Task,
                      (const char *   ) "Task1 Task",
                      (uint16_t       ) TASK1_STK_SIZE,
                      (void *         ) NULL,
                      (UBaseType_t    ) TASK1_TASK_PRIO,
                      (TaskHandle_t * ) &amp;Task1Task_Handler);
                      
if (pdPASS == xReturn) {
	printf("Create vTask1Task successfully.\r\n");
}

xReturn = xTaskCreate((TaskFunction_t ) vTask2Task,
			    		        (const char *   ) "Task2 Task",
						          (uint16_t       ) TASK2_STK_SIZE,
						          (void *         ) NULL,
						          (UBaseType_t    ) TASK2_TASK_PRIO,
						          (TaskHandle_t * ) &amp;Task2Task_Handler);

if (pdPASS == xReturn) {
  printf("Create vTask2Task successfully.\r\n");
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">configSUPPORT_DYNAMIC_ALLOCATION</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">BaseType_t </span><span style="color: #FFE66D">xTaskCreate</span><span style="color: #D5CED9">( </span></span>
<span class="line"><span style="color: #D5CED9">  TaskFunction_t          </span><span style="color: #00E8C6">pxTaskCode</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">     // Task function to execute</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">char</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">      </span><span style="color: #00E8C6">pcName</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">         // Task name</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">uint16_t</span><span style="color: #D5CED9">          </span><span style="color: #00E8C6">usStackDepth</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">   // Task stack size</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">            </span><span style="color: #00E8C6">pvParameters</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">   // Parameter passed to the task</span></span>
<span class="line"><span style="color: #D5CED9">  UBaseType_t             </span><span style="color: #00E8C6">uxPriority</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">     // Task priority</span></span>
<span class="line"><span style="color: #D5CED9">  TaskHandle_t </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">    pxCreatedTask</span><span style="color: #A0A1A7CC">   // Stores the created task handle</span></span>
<span class="line"><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK1_TASK_PRIO</span><span style="color: #D5CED9">        </span><span style="color: #F39C12">2</span><span style="color: #D5CED9">      </span></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK1_STK_SIZE</span><span style="color: #D5CED9">         </span><span style="color: #F39C12">256</span><span style="color: #D5CED9">    </span></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t Task1Task_Handler;       </span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTask1Task</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #00E8C6">pvParameters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line cbp-see-more-line "><span style="color: #D5CED9">	  </span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1000</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK2_TASK_PRIO</span><span style="color: #D5CED9">        </span><span style="color: #F39C12">3</span><span style="color: #D5CED9">      </span></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK2_STK_SIZE</span><span style="color: #D5CED9">         </span><span style="color: #F39C12">256</span><span style="color: #D5CED9">    </span></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t Task2Task_Handler;       </span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTask2Task</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #00E8C6">pvParameters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">500</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">xReturn </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">xTaskCreate</span><span style="color: #D5CED9">((TaskFunction_t ) </span><span style="color: #00E8C6">vTask1Task</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">                      (</span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">char</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">   ) </span><span style="color: #96E072">&quot;Task1 Task&quot;</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">                      (</span><span style="color: #C74DED">uint16_t</span><span style="color: #D5CED9">       ) </span><span style="color: #00E8C6">TASK1_STK_SIZE</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">                      (</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">         ) </span><span style="color: #00E8C6">NULL</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">                      (UBaseType_t    ) </span><span style="color: #00E8C6">TASK1_TASK_PRIO</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">                      (TaskHandle_t </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> ) </span><span style="color: #EE5D43">&amp;</span><span style="color: #00E8C6">Task1Task_Handler</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #D5CED9">                      </span></span>
<span class="line"><span style="color: #C74DED">if</span><span style="color: #D5CED9"> (pdPASS </span><span style="color: #EE5D43">==</span><span style="color: #D5CED9"> xReturn) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #FFE66D">printf</span><span style="color: #D5CED9">(</span><span style="color: #96E072">&quot;Create vTask1Task successfully.</span><span style="color: #EE5D43">\r\n</span><span style="color: #96E072">&quot;</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">xReturn </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">xTaskCreate</span><span style="color: #D5CED9">((TaskFunction_t ) </span><span style="color: #00E8C6">vTask2Task</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			    		        (</span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">char</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">   ) </span><span style="color: #96E072">&quot;Task2 Task&quot;</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">						          (</span><span style="color: #C74DED">uint16_t</span><span style="color: #D5CED9">       ) </span><span style="color: #00E8C6">TASK2_STK_SIZE</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">						          (</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">         ) </span><span style="color: #00E8C6">NULL</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">						          (UBaseType_t    ) </span><span style="color: #00E8C6">TASK2_TASK_PRIO</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">						          (TaskHandle_t </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> ) </span><span style="color: #EE5D43">&amp;</span><span style="color: #00E8C6">Task2Task_Handler</span><span style="color: #D5CED9">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">if</span><span style="color: #D5CED9"> (pdPASS </span><span style="color: #EE5D43">==</span><span style="color: #D5CED9"> xReturn) {</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #FFE66D">printf</span><span style="color: #D5CED9">(</span><span style="color: #96E072">&quot;Create vTask2Task successfully.</span><span style="color: #EE5D43">\r\n</span><span style="color: #96E072">&quot;</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_static" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
xTaskCreateStatic()
</b>

<p>
xTaskCreateStatic() creates a new FreeRTOS task using memory supplied by the application instead of the FreeRTOS heap. The caller provides the task stack buffer and task control block, making memory usage fixed and deterministic. The function returns the created task handle when successful or NULL if task creation fails.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly> #define configSUPPORT_STATIC_ALLOCATION    1

TaskHandle_t xTaskCreateStatic( 
  TaskFunction_t         pxTaskCode,      // Task function to execute
  const char * const     pcName,          // Task name
  const uint32_t         ulStackDepth,    // Task stack depth
  void * const           pvParameters,    // Parameter passed to the task
  UBaseType_t            uxPriority,      // Task priority
  StackType_t * const    puxStackBuffer,  // User-provided stack buffer
  StaticTask_t * const   pxTaskBuffer     // User-provided task control block
)

// ---------------------- Example ----------------------

#define TASK1_TASK_PRIO        2               
#define TASK1_STK_SIZE         256             
StackType_t Task1TaskStack&#91;TASK1_STK_SIZE&#93;;    
StaticTask_t Task1TaskTCB;                     
TaskHandle_t Task1Task_Handler;                

void vTask1Task(void * pvParameters) {
	while(1) {
		vTaskDelay(pdMS_TO_TICKS(1000));
	}
}              

#define TASK2_TASK_PRIO        3               
#define TASK2_STK_SIZE         256             
StackType_t Task2TaskStack&#91;TASK2_STK_SIZE&#93;;    
StaticTask_t Task2TaskTCB;                     
TaskHandle_t Task2Task_Handler;   
             
void vTask2Task(void * pvParameters) {
	while(1) {
		vTaskDelay(pdMS_TO_TICKS(500));
	}
}        

static StackType_t IdleTaskStack&#91;configMINIMAL_STACK_SIZE&#93;;
static StaticTask_t IdleTaskTCB;

void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer,
									                  StackType_t **ppxIdleTaskStackBuffer,
									                  uint32_t *pulIdleTaskStackSize ) {
	*ppxIdleTaskTCBBuffer=&IdleTaskTCB;
	*ppxIdleTaskStackBuffer=IdleTaskStack;
	*pulIdleTaskStackSize=configMINIMAL_STACK_SIZE;
}

static StackType_t TimerTaskStack&#91;configTIMER_TASK_STACK_DEPTH&#93;;
static StaticTask_t TimerTaskTCB;

void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer,
									                   StackType_t **ppxTimerTaskStackBuffer,
									                   uint32_t *pulTimerTaskStackSize ) {
	*ppxTimerTaskTCBBuffer=&TimerTaskTCB;
	*ppxTimerTaskStackBuffer=TimerTaskStack;
	*pulTimerTaskStackSize=configMINIMAL_STACK_SIZE;
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #D5CED9"> </span><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">configSUPPORT_STATIC_ALLOCATION</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t </span><span style="color: #FFE66D">xTaskCreateStatic</span><span style="color: #D5CED9">( </span></span>
<span class="line"><span style="color: #D5CED9">  TaskFunction_t         </span><span style="color: #00E8C6">pxTaskCode</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">      // Task function to execute</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">char</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">     </span><span style="color: #00E8C6">pcName</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">          // Task name</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">uint32_t</span><span style="color: #D5CED9">         </span><span style="color: #00E8C6">ulStackDepth</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">    // Task stack depth</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">           </span><span style="color: #00E8C6">pvParameters</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">    // Parameter passed to the task</span></span>
<span class="line"><span style="color: #D5CED9">  UBaseType_t            </span><span style="color: #00E8C6">uxPriority</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">      // Task priority</span></span>
<span class="line"><span style="color: #D5CED9">  StackType_t </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">    </span><span style="color: #00E8C6">puxStackBuffer</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC">  // User-provided stack buffer</span></span>
<span class="line"><span style="color: #D5CED9">  StaticTask_t </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9">   pxTaskBuffer</span><span style="color: #A0A1A7CC">     // User-provided task control block</span></span>
<span class="line"><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK1_TASK_PRIO</span><span style="color: #D5CED9">        </span><span style="color: #F39C12">2</span><span style="color: #D5CED9">               </span></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK1_STK_SIZE</span><span style="color: #D5CED9">         </span><span style="color: #F39C12">256</span><span style="color: #D5CED9">             </span></span>
<span class="line"><span style="color: #D5CED9">StackType_t </span><span style="color: #00E8C6">Task1TaskStack</span><span style="color: #D5CED9">&#91;TASK1_STK_SIZE&#93;;    </span></span>
<span class="line"><span style="color: #D5CED9">StaticTask_t Task1TaskTCB;                     </span></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t Task1Task_Handler;                </span></span>
<span class="line cbp-see-more-line "></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTask1Task</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #00E8C6">pvParameters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1000</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}              </span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK2_TASK_PRIO</span><span style="color: #D5CED9">        </span><span style="color: #F39C12">3</span><span style="color: #D5CED9">               </span></span>
<span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">TASK2_STK_SIZE</span><span style="color: #D5CED9">         </span><span style="color: #F39C12">256</span><span style="color: #D5CED9">             </span></span>
<span class="line"><span style="color: #D5CED9">StackType_t </span><span style="color: #00E8C6">Task2TaskStack</span><span style="color: #D5CED9">&#91;TASK2_STK_SIZE&#93;;    </span></span>
<span class="line"><span style="color: #D5CED9">StaticTask_t Task2TaskTCB;                     </span></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t Task2Task_Handler;   </span></span>
<span class="line"><span style="color: #D5CED9">             </span></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTask2Task</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #00E8C6">pvParameters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">500</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}        </span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">static</span><span style="color: #D5CED9"> StackType_t </span><span style="color: #00E8C6">IdleTaskStack</span><span style="color: #D5CED9">&#91;configMINIMAL_STACK_SIZE&#93;;</span></span>
<span class="line"><span style="color: #C74DED">static</span><span style="color: #D5CED9"> StaticTask_t IdleTaskTCB;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vApplicationGetIdleTaskMemory</span><span style="color: #D5CED9">( StaticTask_t </span><span style="color: #EE5D43">**</span><span style="color: #00E8C6">ppxIdleTaskTCBBuffer</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">									                  StackType_t </span><span style="color: #EE5D43">**</span><span style="color: #00E8C6">ppxIdleTaskStackBuffer</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">									                  </span><span style="color: #C74DED">uint32_t</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">pulIdleTaskStackSize</span><span style="color: #D5CED9"> ) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">ppxIdleTaskTCBBuffer</span><span style="color: #EE5D43">=&amp;</span><span style="color: #D5CED9">IdleTaskTCB;</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">ppxIdleTaskStackBuffer</span><span style="color: #EE5D43">=</span><span style="color: #D5CED9">IdleTaskStack;</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">pulIdleTaskStackSize</span><span style="color: #EE5D43">=</span><span style="color: #D5CED9">configMINIMAL_STACK_SIZE;</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">static</span><span style="color: #D5CED9"> StackType_t </span><span style="color: #00E8C6">TimerTaskStack</span><span style="color: #D5CED9">&#91;configTIMER_TASK_STACK_DEPTH&#93;;</span></span>
<span class="line"><span style="color: #C74DED">static</span><span style="color: #D5CED9"> StaticTask_t TimerTaskTCB;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vApplicationGetTimerTaskMemory</span><span style="color: #D5CED9">( StaticTask_t </span><span style="color: #EE5D43">**</span><span style="color: #00E8C6">ppxTimerTaskTCBBuffer</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">									                   StackType_t </span><span style="color: #EE5D43">**</span><span style="color: #00E8C6">ppxTimerTaskStackBuffer</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">									                   </span><span style="color: #C74DED">uint32_t</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">pulTimerTaskStackSize</span><span style="color: #D5CED9"> ) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">ppxTimerTaskTCBBuffer</span><span style="color: #EE5D43">=&amp;</span><span style="color: #D5CED9">TimerTaskTCB;</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">ppxTimerTaskStackBuffer</span><span style="color: #EE5D43">=</span><span style="color: #D5CED9">TimerTaskStack;</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #EE5D43">*</span><span style="color: #D5CED9">pulTimerTaskStackSize</span><span style="color: #EE5D43">=</span><span style="color: #D5CED9">configMINIMAL_STACK_SIZE;</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_delete" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
vTaskDelete()
</b>

<p>
vTaskDelete() permanently removes a specified FreeRTOS task from the scheduler. Passing a task handle deletes that task, while passing NULL deletes the currently running task.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>#define INCLUDE_vTaskDelete    1
void vTaskDelete(TaskHandle_t xTaskToDelete)

// Delete the currently running task
vTaskDelete(NULL);
vTaskDelete(xTaskGetCurrentTaskHandle());

// ---------------------- Example ----------------------

TaskHandle_t Task2Handle = NULL;

void Task1(void *argument) {
  if (Task2Handle != NULL) {
    vTaskDelete(Task2Handle);
    Task2Handle = NULL;
  }
  while(1) {
    printf("Task1 running\n");
    vTaskDelay(pdMS_TO_TICKS(1000));
  }
}

void Task2(void *argument) {
  while(1) {
    printf("Task2 running\n");
    vTaskDelay(pdMS_TO_TICKS(500));
  }
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">INCLUDE_vTaskDelete</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTaskDelete</span><span style="color: #D5CED9">(TaskHandle_t </span><span style="color: #00E8C6">xTaskToDelete</span><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Delete the currently running task</span></span>
<span class="line"><span style="color: #FFE66D">vTaskDelete</span><span style="color: #D5CED9">(</span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #FFE66D">vTaskDelete</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">xTaskGetCurrentTaskHandle</span><span style="color: #D5CED9">());</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t Task2Handle </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">Task1</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">argument</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">if</span><span style="color: #D5CED9"> (Task2Handle </span><span style="color: #EE5D43">!=</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">vTaskDelete</span><span style="color: #D5CED9">(Task2Handle);</span></span>
<span class="line"><span style="color: #D5CED9">    Task2Handle </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">  }</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">printf</span><span style="color: #D5CED9">(</span><span style="color: #96E072">&quot;Task1 running</span><span style="color: #EE5D43">\n</span><span style="color: #96E072">&quot;</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1000</span><span style="color: #D5CED9">));</span></span>
<span class="line cbp-see-more-line "><span style="color: #D5CED9">  }</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">Task2</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">argument</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">printf</span><span style="color: #D5CED9">(</span><span style="color: #96E072">&quot;Task2 running</span><span style="color: #EE5D43">\n</span><span style="color: #96E072">&quot;</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">500</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">  }</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_priority_set" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
vTaskPrioritySet()
</b>

<p>
vTaskPrioritySet() changes the priority of an existing FreeRTOS task. The xTask argument specifies the handle of the task whose priority will be changed; passing NULL changes the priority of the currently running task. The uxNewPriority argument specifies the new priority level, which must be between 0 and configMAX_PRIORITIES &#8211; 1, where a larger value represents a higher priority. Changing a task’s priority may cause an immediate context switch if another task becomes the highest-priority task that is ready to run.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>#define INCLUDE_vTaskPrioritySet    1

void vTaskPrioritySet(
    TaskHandle_t xTask, 
    UBaseType_t uxNewPriority
)

// Set current task priority to 1
vTaskPrioritySet(NULL, 1);

// ---------------------- Example ----------------------

TaskHandle_t red_handle, green_handle;

xTaskCreate(vRedLedControllerTask,
			      "Red Led Controller",
			      100,
			      NULL,
			      1, // task priority
			      &amp;red_handle);

xTaskCreate(vGreenLedControllerTask,
			      "Green Led Controller",
			      100,
			      NULL,
			      1, // task priority
			      &amp;green_handle);

// Red Led Controller Task
void vRedLedControllerTask(void *pvParamters) {
	while(1){
		HAL_GPIO_TogglePin(GPIOD, RED);
		RedTaskProfiler++;
		vTaskDelay(pdMS_TO_TICKS(1000));
		// Set green task with priority of 3
		vTaskPrioritySet(green_handle, 3);
	}
}

// Green Led Controller Task
void vGreenLedControllerTask(void *pvParamters) {
	while(1){
		HAL_GPIO_TogglePin(GPIOD, GREEN);
		GreenTaskProfiler++;
		vTaskDelay(pdMS_TO_TICKS(500));
	}
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">INCLUDE_vTaskPrioritySet</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTaskPrioritySet</span><span style="color: #D5CED9">(</span></span>
<span class="line"><span style="color: #D5CED9">    TaskHandle_t </span><span style="color: #00E8C6">xTask</span><span style="color: #D5CED9">, </span></span>
<span class="line"><span style="color: #D5CED9">    UBaseType_t uxNewPriority</span></span>
<span class="line"><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Set current task priority to 1</span></span>
<span class="line"><span style="color: #FFE66D">vTaskPrioritySet</span><span style="color: #D5CED9">(</span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">, </span><span style="color: #F39C12">1</span><span style="color: #D5CED9">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t red_handle, green_handle;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #FFE66D">xTaskCreate</span><span style="color: #D5CED9">(vRedLedControllerTask,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #96E072">&quot;Red Led Controller&quot;</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #F39C12">100</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #F39C12">1</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC"> // task priority</span></span>
<span class="line cbp-see-more-line "><span style="color: #D5CED9">			      </span><span style="color: #EE5D43">&amp;</span><span style="color: #00E8C6">red_handle</span><span style="color: #D5CED9">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #FFE66D">xTaskCreate</span><span style="color: #D5CED9">(vGreenLedControllerTask,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #96E072">&quot;Green Led Controller&quot;</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #F39C12">100</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">,</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #F39C12">1</span><span style="color: #D5CED9">,</span><span style="color: #A0A1A7CC"> // task priority</span></span>
<span class="line"><span style="color: #D5CED9">			      </span><span style="color: #EE5D43">&amp;</span><span style="color: #00E8C6">green_handle</span><span style="color: #D5CED9">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Red Led Controller Task</span></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vRedLedControllerTask</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">pvParamters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">){</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">HAL_GPIO_TogglePin</span><span style="color: #D5CED9">(GPIOD, RED);</span></span>
<span class="line"><span style="color: #D5CED9">		RedTaskProfiler</span><span style="color: #EE5D43">++</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1000</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #A0A1A7CC">// Set green task with priority of 3</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskPrioritySet</span><span style="color: #D5CED9">(green_handle, </span><span style="color: #F39C12">3</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Green Led Controller Task</span></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vGreenLedControllerTask</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">pvParamters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">){</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">HAL_GPIO_TogglePin</span><span style="color: #D5CED9">(GPIOD, GREEN);</span></span>
<span class="line"><span style="color: #D5CED9">		GreenTaskProfiler</span><span style="color: #EE5D43">++</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">500</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_priority_get" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
uxTaskPriorityGet()
</b>

<p>
uxTaskPriorityGet() returns the current priority of a FreeRTOS task. The xTask argument is the handle of the task whose priority is requested; passing NULL returns the priority of the currently running task. The function returns the task’s priority as a value of type UBaseType_t, where a larger value represents a higher priority.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>#define INCLUDE_uxTaskPriorityGet    1
UBaseType_t uxTaskPriorityGet(const TaskHandle_t xTask)

// ---------------------- Example ----------------------

TaskHandle_t green_handle;
uint32_t green_priority;

// Get priority green LED task
green_priority = uxTaskPriorityGet(green_handle);</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">INCLUDE_uxTaskPriorityGet</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"><span style="color: #D5CED9">UBaseType_t </span><span style="color: #FFE66D">uxTaskPriorityGet</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> TaskHandle_t </span><span style="color: #00E8C6">xTask</span><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t green_handle;</span></span>
<span class="line"><span style="color: #C74DED">uint32_t</span><span style="color: #D5CED9"> green_priority;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Get priority green LED task</span></span>
<span class="line"><span style="color: #D5CED9">green_priority </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">uxTaskPriorityGet</span><span style="color: #D5CED9">(green_handle);</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_suspend" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
vTaskSuspend()
</b>

<p>
vTaskSuspend() suspends a FreeRTOS task, preventing it from being scheduled until it is resumed using vTaskResume() or xTaskResumeFromISR(). The xTaskToSuspend argument specifies the handle of the task to suspend; passing NULL suspends the currently running task. A suspended task does not consume CPU time and remains suspended indefinitely until explicitly resumed.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>#define INCLUDE_vTaskSuspend    1
void vTaskSuspend(TaskHandle_t xTaskToSuspend)

// ---------------------- Example ----------------------

vTaskSuspend(NULL);
vTaskSuspend(blue_handle);

void vBlueLedControllerTask(void *pvParamters) {
	while(1) {
		HAL_GPIO_TogglePin(GPIOD, BLUE);
		BlueTaskProfiler++;
    vTaskDelay(pdMS_TO_TICKS(500));
		vTaskSuspend(NULL); // Suspend task itself
	}
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">INCLUDE_vTaskSuspend</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTaskSuspend</span><span style="color: #D5CED9">(TaskHandle_t </span><span style="color: #00E8C6">xTaskToSuspend</span><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #FFE66D">vTaskSuspend</span><span style="color: #D5CED9">(</span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">);</span></span>
<span class="line"><span style="color: #FFE66D">vTaskSuspend</span><span style="color: #D5CED9">(blue_handle);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vBlueLedControllerTask</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">pvParamters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">HAL_GPIO_TogglePin</span><span style="color: #D5CED9">(GPIOD, BLUE);</span></span>
<span class="line"><span style="color: #D5CED9">		BlueTaskProfiler</span><span style="color: #EE5D43">++</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">vTaskDelay</span><span style="color: #D5CED9">(</span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">500</span><span style="color: #D5CED9">));</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskSuspend</span><span style="color: #D5CED9">(</span><span style="color: #EE5D43">NULL</span><span style="color: #D5CED9">);</span><span style="color: #A0A1A7CC"> // Suspend task itself</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_resume" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
vTaskResume()
</b>

<p>
vTaskResume() resumes a task that was previously suspended using vTaskSuspend(), allowing it to return to the Ready state and be scheduled again. The xTaskToResume argument is the handle of the suspended task to resume. If the resumed task has a higher priority than the currently running task, a context switch may occur immediately.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>void vTaskResume(TaskHandle_t xTaskToResume)

// ---------------------- Example ----------------------

TaskHandle_t xTaskHandle;
vTaskResume(xTaskHandle);</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTaskResume</span><span style="color: #D5CED9">(TaskHandle_t </span><span style="color: #00E8C6">xTaskToResume</span><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D5CED9">TaskHandle_t xTaskHandle;</span></span>
<span class="line"><span style="color: #FFE66D">vTaskResume</span><span style="color: #D5CED9">(xTaskHandle);</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_resume_isr" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
xTaskResumeFromISR()
</b>

<p>
xTaskResumeFromISR() resumes a task that was previously suspended by vTaskSuspend() and is specifically designed to be called from an interrupt service routine. The xTaskToResume argument is the handle of the task to resume. The function returns pdTRUE when resuming the task causes a higher-priority task to become ready, indicating that a context switch should be requested before leaving the ISR; otherwise, it returns pdFALSE.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>BaseType_t xTaskResumeFromISR(TaskHandle_t xTaskToResume)

// ---------------------- Example ----------------------

void EXTI0_IRQHandler(void) {
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
}

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
	BaseType_t YieldRequired = pdFALSE;
  if (GPIO_Pin == GPIO_PIN_0) {
    YieldRequired = xTaskResumeFromISR(Task1Task_Handler);
    if(YieldRequired == pdTRUE) {
      portYIELD_FROM_ISR(YieldRequired);
    }
  }
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #D5CED9">BaseType_t </span><span style="color: #FFE66D">xTaskResumeFromISR</span><span style="color: #D5CED9">(TaskHandle_t </span><span style="color: #00E8C6">xTaskToResume</span><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">EXTI0_IRQHandler</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #FFE66D">HAL_GPIO_EXTI_IRQHandler</span><span style="color: #D5CED9">(GPIO_PIN_0);</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">HAL_GPIO_EXTI_Callback</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">uint16_t</span><span style="color: #D5CED9"> </span><span style="color: #00E8C6">GPIO_Pin</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	BaseType_t YieldRequired </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> pdFALSE;</span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">if</span><span style="color: #D5CED9"> (GPIO_Pin </span><span style="color: #EE5D43">==</span><span style="color: #D5CED9"> GPIO_PIN_0) {</span></span>
<span class="line"><span style="color: #D5CED9">    YieldRequired </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">xTaskResumeFromISR</span><span style="color: #D5CED9">(Task1Task_Handler);</span></span>
<span class="line"><span style="color: #D5CED9">    </span><span style="color: #C74DED">if</span><span style="color: #D5CED9">(YieldRequired </span><span style="color: #EE5D43">==</span><span style="color: #D5CED9"> pdTRUE) {</span></span>
<span class="line"><span style="color: #D5CED9">      </span><span style="color: #FFE66D">portYIELD_FROM_ISR</span><span style="color: #D5CED9">(YieldRequired);</span></span>
<span class="line"><span style="color: #D5CED9">    }</span></span>
<span class="line"><span style="color: #D5CED9">  }</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<div class="article-text" style="margin-top:50px; margin-bottom:30px;">

<b id="task_delay_until" style="display:block;
          font-family: 'Inter', sans-serif; 
          font-size: 22px; 
          color: black; 
          margin-top:0px; 
          margin-bottom:20px;">
vTaskDelayUntil()
</b>

<p>
vTaskDelayUntil() blocks a task until a specified absolute wake time, making it useful for creating tasks that execute at a fixed and consistent period. The pxPreviousWakeTime argument points to a variable containing the task’s previous wake time; it is automatically updated after each call. The xTimeIncrement argument specifies the period between executions in system ticks. Unlike vTaskDelay(), this function compensates for task execution time and helps prevent timing drift.
</p>

</div>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D5CED9;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#D5CED9;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>#define INCLUDE_vTaskDelayUntil    1

void vTaskDelayUntil(
  TickType_t * const pxPreviousWakeTime, 
  const TickType_t xTimeIncrement
)

// ---------------------- Example ----------------------

const TickType_t xPeriod = pdMS_TO_TICKS(500);

// Blue Led Controller Task
void vBlueLedControllerTask(void *pvParamters) {
	TickType_t xLastWakeTime = xTaskGetTickCount();
	while(1) {
		// xLastWakeTime value will be updated automatically
		vTaskDelayUntil(&amp;xLastWakeTime, xPeriod);
		HAL_GPIO_TogglePin(GPIOD, BLUE);
		BlueTaskProfiler++;
	}
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki andromeda" style="background-color: #23262E" tabindex="0"><code><span class="line"><span style="color: #C74DED">#define</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">INCLUDE_vTaskDelayUntil</span><span style="color: #D5CED9">    </span><span style="color: #F39C12">1</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vTaskDelayUntil</span><span style="color: #D5CED9">(</span></span>
<span class="line"><span style="color: #D5CED9">  TickType_t </span><span style="color: #EE5D43">*</span><span style="color: #D5CED9"> </span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> </span><span style="color: #00E8C6">pxPreviousWakeTime</span><span style="color: #D5CED9">, </span></span>
<span class="line"><span style="color: #D5CED9">  </span><span style="color: #C74DED">const</span><span style="color: #D5CED9"> TickType_t xTimeIncrement</span></span>
<span class="line"><span style="color: #D5CED9">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// ---------------------- Example ----------------------</span></span>
<span class="line"></span>
<span class="line"><span style="color: #C74DED">const</span><span style="color: #D5CED9"> TickType_t xPeriod </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">pdMS_TO_TICKS</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">500</span><span style="color: #D5CED9">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #A0A1A7CC">// Blue Led Controller Task</span></span>
<span class="line"><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">vBlueLedControllerTask</span><span style="color: #D5CED9">(</span><span style="color: #C74DED">void</span><span style="color: #D5CED9"> </span><span style="color: #EE5D43">*</span><span style="color: #00E8C6">pvParamters</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">	TickType_t xLastWakeTime </span><span style="color: #EE5D43">=</span><span style="color: #D5CED9"> </span><span style="color: #FFE66D">xTaskGetTickCount</span><span style="color: #D5CED9">();</span></span>
<span class="line"><span style="color: #D5CED9">	</span><span style="color: #C74DED">while</span><span style="color: #D5CED9">(</span><span style="color: #F39C12">1</span><span style="color: #D5CED9">) {</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #A0A1A7CC">// xLastWakeTime value will be updated automatically</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">vTaskDelayUntil</span><span style="color: #D5CED9">(</span><span style="color: #EE5D43">&amp;</span><span style="color: #D5CED9">xLastWakeTime, xPeriod);</span></span>
<span class="line"><span style="color: #D5CED9">		</span><span style="color: #FFE66D">HAL_GPIO_TogglePin</span><span style="color: #D5CED9">(GPIOD, BLUE);</span></span>
<span class="line"><span style="color: #D5CED9">		BlueTaskProfiler</span><span style="color: #EE5D43">++</span><span style="color: #D5CED9">;</span></span>
<span class="line"><span style="color: #D5CED9">	}</span></span>
<span class="line"><span style="color: #D5CED9">}</span></span></code></pre></div>



<br><br>
<a href="#top" style="font-size:20px; color: blue;">Back to top of the page</a>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4607</post-id>	</item>
	</channel>
</rss>
