<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://stm32world.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lth</id>
	<title>Stm32World Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://stm32world.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lth"/>
	<link rel="alternate" type="text/html" href="https://stm32world.com/wiki/Special:Contributions/Lth"/>
	<updated>2026-08-23T04:10:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://stm32world.com/w/index.php?title=FreeRTOS_WS2812_(Neopixel)_RGB_LED_(part_2)&amp;diff=8053</id>
		<title>FreeRTOS WS2812 (Neopixel) RGB LED (part 2)</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=FreeRTOS_WS2812_(Neopixel)_RGB_LED_(part_2)&amp;diff=8053"/>
		<updated>2026-08-22T03:41:45Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=RP Pico Video |number=15 |title=FreeRTOS WS2812 (Neopixel) RGB LED (part 2) |youtube-id=UeD5Fpw9Cxs |description=Adding FreeRTOS to driving Neopixel WS2812 add...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=RP Pico Video&lt;br /&gt;
|number=15&lt;br /&gt;
|title=FreeRTOS WS2812 (Neopixel) RGB LED (part 2)&lt;br /&gt;
|youtube-id=UeD5Fpw9Cxs&lt;br /&gt;
|description=Adding FreeRTOS to driving Neopixel WS2812 addressable RGB LEDs using a RP2350.  We will be adding FreeRTOS into the mix but keep the PIO state machine and DMA code from the previous project.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8052</id>
		<title>CAN bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8052"/>
		<updated>2026-08-19T04:26:40Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* CAN Frame */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:CAN]]&lt;br /&gt;
[[File:CAN 3.jpg|thumb|300px|Well, it's a Carlsberg CAN Bus]]&lt;br /&gt;
A controller area network ([[CAN bus]]) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts. For each device, the data in a frame is transmitted serially but in such a way that if more than one device transmits at the same time, the highest priority device can continue while the others back off. Frames are received by all devices, including by the transmitting device.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Bus Layout == &lt;br /&gt;
&lt;br /&gt;
A [[CAN bus]] consist of a differential set of wires with a number of nodes attached in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_ISO11898-2_Network.png|1200px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wires operate in differential mode to suppress noise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ISO11898-3_Waveform.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The nodes themselves consist of a CAN Controller and a transceiver which will adjust the signals to match the bus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_Node.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multi Master ==&lt;br /&gt;
&lt;br /&gt;
The exact voltages for a logical 0 or 1 depend on the physical layer used, but the basic principle of CAN requires that each node listen to the data on the CAN network including the transmitting node(s) itself (themselves). If a logical 1 is transmitted by all transmitting nodes at the same time, then a logical 1 is seen by all of the nodes, including both the transmitting node(s) and receiving node(s). If a logical 0 is transmitted by all transmitting node(s) at the same time, then a logical 0 is seen by all nodes. If a logical 0 is being transmitted by one or more nodes, and a logical 1 is being transmitted by one or more nodes, then a logical 0 is seen by all nodes including the node(s) transmitting the logical 1. When a node transmits a logical 1 but sees a logical 0, it realizes that there is a contention and it quits transmitting. By using this process, any node that transmits a logical 1, when another node transmits a logical 0, loses the arbitration and drops out. A node that loses arbitration re-queues its message for later transmission and the CAN frame bit-stream continues without error until only one node is left transmitting. This means that the node that transmits the first 1 loses arbitration. Since the 11 (or 29 for CAN 2.0B) bit identifier is transmitted by all nodes at the start of the CAN frame, the node with the lowest identifier transmits more zeros at the start of the frame, and that is the node that wins the arbitration or has the highest priority.&lt;br /&gt;
&lt;br /&gt;
For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation, 00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time, each will first transmit the start bit then transmit the first six zeros of their ID with no arbitration decision being made.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| Start &amp;lt;br /&amp;gt;bit&lt;br /&gt;
! colspan=&amp;quot;11&amp;quot;| ID bits&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| The rest of the frame&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|10&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|9&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|8&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|7&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|6&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|5&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|4&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|3&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|2&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|1&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|0&lt;br /&gt;
|-&lt;br /&gt;
! Node 15&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|-&lt;br /&gt;
! Node 16&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:red;&amp;quot;|1|| colspan=&amp;quot;5&amp;quot;| Stopped Transmitting&lt;br /&gt;
|-&lt;br /&gt;
! CAN data&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When ID bit 4 is transmitted, the node with the ID of 16 transmits a 1 (recessive) for its ID, and the node with the ID of 15 transmits a 0 (dominant) for its ID. When this happens, the node with the ID of 16 knows it transmitted a 1, but sees a 0 and realizes that there is a collision and it lost arbitration. Node 16 stops transmitting which allows the node with ID of 15 to continue its transmission without any loss of data. The node with the lowest ID will always win the arbitration and therefore has the highest priority.&lt;br /&gt;
&lt;br /&gt;
== CAN Frame ==&lt;br /&gt;
[[File:CAN-bus-frame-with-stuff-bit-and-correct-CRC.png|thumb|center|850px|A complete CAN bus frame, including stuff bits, a correct CRC, and inter-frame spacing]]&lt;br /&gt;
&lt;br /&gt;
The frame format is as follows: The bit values are described for CAN-LO signal.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &amp;quot;&lt;br /&gt;
! Field name !! Length (bits) !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Start-of-frame|| 1|| Denotes the start of frame transmission&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=lime| Identifier (green)|| 11|| A (unique) identifier which also represents the message priority&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=cyan| Remote transmission request (RTR) (blue)|| 1|| Must be dominant (0) for data frames and recessive (1) for remote request frames (see [[#Remote frame|Remote Frame]], below)&lt;br /&gt;
|-&lt;br /&gt;
| Identifier extension bit (IDE)|| 1|| Must be dominant (0) for base frame format with 11-bit identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Reserved bit (r0)|| 1|| Reserved bit. Must be dominant (0), but accepted as either dominant or recessive.&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=yellow| Data length code (DLC) (yellow)|| 4|| Number of bytes of data (0–8 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=red| Data field (red)|| 0–64 (0-8 bytes)|| Data to be transmitted (length in bytes dictated by DLC field)&lt;br /&gt;
|-&lt;br /&gt;
| CRC|| 15|| [[Cyclic redundancy check#CRC-15-CAN|Cyclic Redundancy Check]]&lt;br /&gt;
|-&lt;br /&gt;
| CRC delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| ACK slot|| 1|| Transmitter sends recessive (1) and any receiver can assert a dominant (0)&lt;br /&gt;
|-&lt;br /&gt;
| ACK delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| End-of-frame (EOF)|| 7|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| Inter-frame spacing (IFS)|| 3|| Must be recessive (1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As can be seen the overhead is massive.  47 bit required to send a maximum of a 64 bit payload.  The CAN bus is definitely not designed for speed but rather reliability.&lt;br /&gt;
&lt;br /&gt;
== CAN bus length vs. speed ==&lt;br /&gt;
&lt;br /&gt;
The top speed of CAN 2.0 is 1 Mbps.  Lower speed can work on longer busses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN Bus Speed Limit.png|600px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/CAN_bus Wikipedia Article about CAN]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Cyclic_Redundancy_Check&amp;diff=8051</id>
		<title>Cyclic Redundancy Check</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Cyclic_Redundancy_Check&amp;diff=8051"/>
		<updated>2026-08-19T04:26:04Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Cyclic Redundancy Check]] (or short: [[CRC]]) is a way to verify data.&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=CRC&amp;diff=8050</id>
		<title>CRC</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=CRC&amp;diff=8050"/>
		<updated>2026-08-19T04:25:11Z</updated>

		<summary type="html">&lt;p&gt;Lth: Lth moved page CRC to Cyclic Redundancy Check&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Cyclic Redundancy Check]]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Cyclic_Redundancy_Check&amp;diff=8049</id>
		<title>Cyclic Redundancy Check</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Cyclic_Redundancy_Check&amp;diff=8049"/>
		<updated>2026-08-19T04:25:11Z</updated>

		<summary type="html">&lt;p&gt;Lth: Lth moved page CRC to Cyclic Redundancy Check&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CRC]] is short for &amp;quot;Cyclic Redundancy Check&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8048</id>
		<title>CAN bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8048"/>
		<updated>2026-08-19T04:22:41Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* CAN bus length vs. speed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:CAN]]&lt;br /&gt;
[[File:CAN 3.jpg|thumb|300px|Well, it's a Carlsberg CAN Bus]]&lt;br /&gt;
A controller area network ([[CAN bus]]) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts. For each device, the data in a frame is transmitted serially but in such a way that if more than one device transmits at the same time, the highest priority device can continue while the others back off. Frames are received by all devices, including by the transmitting device.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Bus Layout == &lt;br /&gt;
&lt;br /&gt;
A [[CAN bus]] consist of a differential set of wires with a number of nodes attached in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_ISO11898-2_Network.png|1200px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wires operate in differential mode to suppress noise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ISO11898-3_Waveform.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The nodes themselves consist of a CAN Controller and a transceiver which will adjust the signals to match the bus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_Node.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multi Master ==&lt;br /&gt;
&lt;br /&gt;
The exact voltages for a logical 0 or 1 depend on the physical layer used, but the basic principle of CAN requires that each node listen to the data on the CAN network including the transmitting node(s) itself (themselves). If a logical 1 is transmitted by all transmitting nodes at the same time, then a logical 1 is seen by all of the nodes, including both the transmitting node(s) and receiving node(s). If a logical 0 is transmitted by all transmitting node(s) at the same time, then a logical 0 is seen by all nodes. If a logical 0 is being transmitted by one or more nodes, and a logical 1 is being transmitted by one or more nodes, then a logical 0 is seen by all nodes including the node(s) transmitting the logical 1. When a node transmits a logical 1 but sees a logical 0, it realizes that there is a contention and it quits transmitting. By using this process, any node that transmits a logical 1, when another node transmits a logical 0, loses the arbitration and drops out. A node that loses arbitration re-queues its message for later transmission and the CAN frame bit-stream continues without error until only one node is left transmitting. This means that the node that transmits the first 1 loses arbitration. Since the 11 (or 29 for CAN 2.0B) bit identifier is transmitted by all nodes at the start of the CAN frame, the node with the lowest identifier transmits more zeros at the start of the frame, and that is the node that wins the arbitration or has the highest priority.&lt;br /&gt;
&lt;br /&gt;
For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation, 00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time, each will first transmit the start bit then transmit the first six zeros of their ID with no arbitration decision being made.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| Start &amp;lt;br /&amp;gt;bit&lt;br /&gt;
! colspan=&amp;quot;11&amp;quot;| ID bits&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| The rest of the frame&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|10&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|9&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|8&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|7&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|6&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|5&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|4&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|3&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|2&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|1&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|0&lt;br /&gt;
|-&lt;br /&gt;
! Node 15&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|-&lt;br /&gt;
! Node 16&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:red;&amp;quot;|1|| colspan=&amp;quot;5&amp;quot;| Stopped Transmitting&lt;br /&gt;
|-&lt;br /&gt;
! CAN data&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When ID bit 4 is transmitted, the node with the ID of 16 transmits a 1 (recessive) for its ID, and the node with the ID of 15 transmits a 0 (dominant) for its ID. When this happens, the node with the ID of 16 knows it transmitted a 1, but sees a 0 and realizes that there is a collision and it lost arbitration. Node 16 stops transmitting which allows the node with ID of 15 to continue its transmission without any loss of data. The node with the lowest ID will always win the arbitration and therefore has the highest priority.&lt;br /&gt;
&lt;br /&gt;
== CAN Frame ==&lt;br /&gt;
[[File:CAN-bus-frame-with-stuff-bit-and-correct-CRC.png|thumb|center|850px|A complete CAN bus frame, including stuff bits, a correct CRC, and inter-frame spacing]]&lt;br /&gt;
&lt;br /&gt;
The frame format is as follows: The bit values are described for CAN-LO signal.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &amp;quot;&lt;br /&gt;
! Field name !! Length (bits) !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Start-of-frame|| 1|| Denotes the start of frame transmission&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=lime| Identifier (green)|| 11|| A (unique) identifier which also represents the message priority&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=cyan| Remote transmission request (RTR) (blue)|| 1|| Must be dominant (0) for data frames and recessive (1) for remote request frames (see [[#Remote frame|Remote Frame]], below)&lt;br /&gt;
|-&lt;br /&gt;
| Identifier extension bit (IDE)|| 1|| Must be dominant (0) for base frame format with 11-bit identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Reserved bit (r0)|| 1|| Reserved bit. Must be dominant (0), but accepted as either dominant or recessive.&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=yellow| Data length code (DLC) (yellow)|| 4|| Number of bytes of data (0–8 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=red| Data field (red)|| 0–64 (0-8 bytes)|| Data to be transmitted (length in bytes dictated by DLC field)&lt;br /&gt;
|-&lt;br /&gt;
| CRC|| 15|| [[Cyclic redundancy check#CRC-15-CAN|Cyclic redundancy check]]&lt;br /&gt;
|-&lt;br /&gt;
| CRC delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| ACK slot|| 1|| Transmitter sends recessive (1) and any receiver can assert a dominant (0)&lt;br /&gt;
|-&lt;br /&gt;
| ACK delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| End-of-frame (EOF)|| 7|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| Inter-frame spacing (IFS)|| 3|| Must be recessive (1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As can be seen the overhead is massive.  47 bit required to send a maximum of a 64 bit payload.  The CAN bus is definitely not designed for speed but rather reliability.&lt;br /&gt;
&lt;br /&gt;
== CAN bus length vs. speed ==&lt;br /&gt;
&lt;br /&gt;
The top speed of CAN 2.0 is 1 Mbps.  Lower speed can work on longer busses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN Bus Speed Limit.png|600px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/CAN_bus Wikipedia Article about CAN]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8047</id>
		<title>CAN bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8047"/>
		<updated>2026-08-19T04:22:01Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* Miscellaneous Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:CAN]]&lt;br /&gt;
[[File:CAN 3.jpg|thumb|300px|Well, it's a Carlsberg CAN Bus]]&lt;br /&gt;
A controller area network ([[CAN bus]]) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts. For each device, the data in a frame is transmitted serially but in such a way that if more than one device transmits at the same time, the highest priority device can continue while the others back off. Frames are received by all devices, including by the transmitting device.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Bus Layout == &lt;br /&gt;
&lt;br /&gt;
A [[CAN bus]] consist of a differential set of wires with a number of nodes attached in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_ISO11898-2_Network.png|1200px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wires operate in differential mode to suppress noise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ISO11898-3_Waveform.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The nodes themselves consist of a CAN Controller and a transceiver which will adjust the signals to match the bus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_Node.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multi Master ==&lt;br /&gt;
&lt;br /&gt;
The exact voltages for a logical 0 or 1 depend on the physical layer used, but the basic principle of CAN requires that each node listen to the data on the CAN network including the transmitting node(s) itself (themselves). If a logical 1 is transmitted by all transmitting nodes at the same time, then a logical 1 is seen by all of the nodes, including both the transmitting node(s) and receiving node(s). If a logical 0 is transmitted by all transmitting node(s) at the same time, then a logical 0 is seen by all nodes. If a logical 0 is being transmitted by one or more nodes, and a logical 1 is being transmitted by one or more nodes, then a logical 0 is seen by all nodes including the node(s) transmitting the logical 1. When a node transmits a logical 1 but sees a logical 0, it realizes that there is a contention and it quits transmitting. By using this process, any node that transmits a logical 1, when another node transmits a logical 0, loses the arbitration and drops out. A node that loses arbitration re-queues its message for later transmission and the CAN frame bit-stream continues without error until only one node is left transmitting. This means that the node that transmits the first 1 loses arbitration. Since the 11 (or 29 for CAN 2.0B) bit identifier is transmitted by all nodes at the start of the CAN frame, the node with the lowest identifier transmits more zeros at the start of the frame, and that is the node that wins the arbitration or has the highest priority.&lt;br /&gt;
&lt;br /&gt;
For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation, 00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time, each will first transmit the start bit then transmit the first six zeros of their ID with no arbitration decision being made.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| Start &amp;lt;br /&amp;gt;bit&lt;br /&gt;
! colspan=&amp;quot;11&amp;quot;| ID bits&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| The rest of the frame&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|10&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|9&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|8&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|7&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|6&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|5&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|4&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|3&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|2&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|1&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|0&lt;br /&gt;
|-&lt;br /&gt;
! Node 15&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|-&lt;br /&gt;
! Node 16&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:red;&amp;quot;|1|| colspan=&amp;quot;5&amp;quot;| Stopped Transmitting&lt;br /&gt;
|-&lt;br /&gt;
! CAN data&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When ID bit 4 is transmitted, the node with the ID of 16 transmits a 1 (recessive) for its ID, and the node with the ID of 15 transmits a 0 (dominant) for its ID. When this happens, the node with the ID of 16 knows it transmitted a 1, but sees a 0 and realizes that there is a collision and it lost arbitration. Node 16 stops transmitting which allows the node with ID of 15 to continue its transmission without any loss of data. The node with the lowest ID will always win the arbitration and therefore has the highest priority.&lt;br /&gt;
&lt;br /&gt;
== CAN Frame ==&lt;br /&gt;
[[File:CAN-bus-frame-with-stuff-bit-and-correct-CRC.png|thumb|center|850px|A complete CAN bus frame, including stuff bits, a correct CRC, and inter-frame spacing]]&lt;br /&gt;
&lt;br /&gt;
The frame format is as follows: The bit values are described for CAN-LO signal.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &amp;quot;&lt;br /&gt;
! Field name !! Length (bits) !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Start-of-frame|| 1|| Denotes the start of frame transmission&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=lime| Identifier (green)|| 11|| A (unique) identifier which also represents the message priority&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=cyan| Remote transmission request (RTR) (blue)|| 1|| Must be dominant (0) for data frames and recessive (1) for remote request frames (see [[#Remote frame|Remote Frame]], below)&lt;br /&gt;
|-&lt;br /&gt;
| Identifier extension bit (IDE)|| 1|| Must be dominant (0) for base frame format with 11-bit identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Reserved bit (r0)|| 1|| Reserved bit. Must be dominant (0), but accepted as either dominant or recessive.&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=yellow| Data length code (DLC) (yellow)|| 4|| Number of bytes of data (0–8 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=red| Data field (red)|| 0–64 (0-8 bytes)|| Data to be transmitted (length in bytes dictated by DLC field)&lt;br /&gt;
|-&lt;br /&gt;
| CRC|| 15|| [[Cyclic redundancy check#CRC-15-CAN|Cyclic redundancy check]]&lt;br /&gt;
|-&lt;br /&gt;
| CRC delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| ACK slot|| 1|| Transmitter sends recessive (1) and any receiver can assert a dominant (0)&lt;br /&gt;
|-&lt;br /&gt;
| ACK delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| End-of-frame (EOF)|| 7|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| Inter-frame spacing (IFS)|| 3|| Must be recessive (1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As can be seen the overhead is massive.  47 bit required to send a maximum of a 64 bit payload.  The CAN bus is definitely not designed for speed but rather reliability.&lt;br /&gt;
&lt;br /&gt;
== CAN bus length vs. speed ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN Bus Speed Limit.png|600px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/CAN_bus Wikipedia Article about CAN]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=File:CAN_Bus_Speed_Limit.png&amp;diff=8046</id>
		<title>File:CAN Bus Speed Limit.png</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=File:CAN_Bus_Speed_Limit.png&amp;diff=8046"/>
		<updated>2026-08-19T04:21:40Z</updated>

		<summary type="html">&lt;p&gt;Lth: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_CAN&amp;diff=8045</id>
		<title>STM32 CAN</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_CAN&amp;diff=8045"/>
		<updated>2026-08-17T04:06:38Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* Videos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:STM32]][[Category:STM32 Development]][[Category:STM32CubeMX]][[Category:STM32CubeIde]][[Category:STM32 HAL]][[Category:C]][[Category:CAN]]{{metadesc|Using the STM32 CAN Peripheral}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Most [[STM32]] [[MCU]]s are equipped with one or more [[CAN]] peripherals.&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
&lt;br /&gt;
We have created some CAN Tutorial videos.&lt;br /&gt;
&lt;br /&gt;
You can watch the first one here: [https://www.youtube.com/watch?v=RrR-BDoBoSg https://www.youtube.com/watch?v=RrR-BDoBoSg]&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|RrR-BDoBoSg}}&lt;br /&gt;
&lt;br /&gt;
The second video is going much more into detail about filters as well as using an external CAN transceiver.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|bmtOyr7UYNo}}&lt;br /&gt;
&lt;br /&gt;
New video on Streamline&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|urtuDQOOEH0}}&lt;br /&gt;
&lt;br /&gt;
== Filters ==&lt;br /&gt;
&lt;br /&gt;
On a [[CAN bus]] every node can transmit messages at any times.  On a busy [[CAN bus]] that can become an awful lot of messages.  To lower the [[MCU]] cycles necessary to handle [[CAN]], the [[CAN]] peripheral is equipped with 27 filter banks.  These will filter received messages and only messages matching one (or more) filters will be loaded in RAM.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN Filter bank register organization.png|1000px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loopback Example ==&lt;br /&gt;
&lt;br /&gt;
The [[CAN]] peripheral on [[STM32]] MCU's can be configured to run in loopback mode.  This makes it possible to test CAN programming without actually hooking the device up to a physical CAN bus.&lt;br /&gt;
&lt;br /&gt;
The source for this example is here: [https://github.com/STM32World/firmware/tree/master/mcustm32f405_can_loopback https://github.com/STM32World/firmware/tree/master/mcustm32f405_can_loopback]&lt;br /&gt;
&lt;br /&gt;
=== CubeMX Config ===&lt;br /&gt;
&lt;br /&gt;
The clock is configured to maximum speed using the external crystal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Can loopback example clock.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the APB1 bus is running at 42 MHz.  The CAN peripherals are connected to this bus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Can loopback example pinout.png]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can now configure the CAN1 periopheral:&lt;br /&gt;
&lt;br /&gt;
{| width=100%&lt;br /&gt;
|-&lt;br /&gt;
| valign=top | [[File:Can loopback example can1.png]]&lt;br /&gt;
| valign=top | [[File:Can loopback example can nvic.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Code ===&lt;br /&gt;
&lt;br /&gt;
First let's drop a few global variables to handle the CAN messages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* USER CODE BEGIN PV */&lt;br /&gt;
&lt;br /&gt;
CAN_TxHeaderTypeDef TxHeader;&lt;br /&gt;
CAN_RxHeaderTypeDef RxHeader;&lt;br /&gt;
&lt;br /&gt;
uint32_t TxMailbox;&lt;br /&gt;
&lt;br /&gt;
uint8_t TxData[8];&lt;br /&gt;
uint8_t RxData[8];&lt;br /&gt;
&lt;br /&gt;
uint32_t msg_count = 0;&lt;br /&gt;
&lt;br /&gt;
/* USER CODE END PV */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second, we create a callback to receive messages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan)&lt;br /&gt;
{&lt;br /&gt;
    DBG(&amp;quot;HAL_CAN_RxFifo0MsgPendingCallback&amp;quot;);&lt;br /&gt;
    if (HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &amp;amp;RxHeader, RxData) == HAL_OK) {&lt;br /&gt;
        DBG(&amp;quot;Got message %lu - id = 0x%04lx len = 0x%lx, data=%02x%02x%02x%02x%02x%02x%02x%02x&amp;quot;, msg_count + 1, RxHeader.StdId, RxHeader.DLC, RxData[0], RxData[1], RxData[2], RxData[3], RxData[4], RxData[5], RxData[6], RxData[7]);&lt;br /&gt;
    }&lt;br /&gt;
    msg_count++;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can now initialize the [[CAN]] peripheral and the filters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /* USER CODE BEGIN 2 */&lt;br /&gt;
&lt;br /&gt;
    DBG(&amp;quot;\n\n\n\n\n---------------------\nCAN Loopback Starting&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    CAN_FilterTypeDef canfilterconfig;&lt;br /&gt;
&lt;br /&gt;
    canfilterconfig.FilterActivation = CAN_FILTER_ENABLE;&lt;br /&gt;
    canfilterconfig.FilterBank = 12;  // anything between 0 to SlaveStartFilterBank&lt;br /&gt;
    canfilterconfig.FilterFIFOAssignment = CAN_RX_FIFO0;&lt;br /&gt;
    //canfilterconfig.FilterIdHigh = 0x103&amp;lt;&amp;lt;5;&lt;br /&gt;
    canfilterconfig.FilterIdHigh = 0x0000;&lt;br /&gt;
    canfilterconfig.FilterIdLow = 0x0000;&lt;br /&gt;
    //canfilterconfig.FilterMaskIdHigh = 0x1&amp;lt;&amp;lt;13;&lt;br /&gt;
    canfilterconfig.FilterMaskIdHigh = 0x0;&lt;br /&gt;
    canfilterconfig.FilterMaskIdLow = 0x0;&lt;br /&gt;
    canfilterconfig.FilterMode = CAN_FILTERMODE_IDMASK;&lt;br /&gt;
    canfilterconfig.FilterScale = CAN_FILTERSCALE_32BIT;&lt;br /&gt;
    canfilterconfig.SlaveStartFilterBank = 13;  // 13 to 27 are assigned to slave CAN (CAN 2) OR 0 to 12 are assgned to CAN1&lt;br /&gt;
&lt;br /&gt;
    HAL_CAN_ConfigFilter(&amp;amp;hcan1, &amp;amp;canfilterconfig);&lt;br /&gt;
&lt;br /&gt;
    HAL_CAN_Start(&amp;amp;hcan1);&lt;br /&gt;
&lt;br /&gt;
    HAL_CAN_ActivateNotification(&lt;br /&gt;
            &amp;amp;hcan1,&lt;br /&gt;
            CAN_IT_TX_MAILBOX_EMPTY |&lt;br /&gt;
            CAN_IT_RX_FIFO0_MSG_PENDING |&lt;br /&gt;
            CAN_IT_RX_FIFO0_FULL |&lt;br /&gt;
            CAN_IT_RX_FIFO0_OVERRUN |&lt;br /&gt;
            CAN_IT_RX_FIFO1_MSG_PENDING |&lt;br /&gt;
            CAN_IT_RX_FIFO1_FULL |&lt;br /&gt;
            CAN_IT_RX_FIFO1_OVERRUN |&lt;br /&gt;
            CAN_IT_WAKEUP |&lt;br /&gt;
            CAN_IT_SLEEP_ACK |&lt;br /&gt;
            CAN_IT_ERROR_WARNING |&lt;br /&gt;
            CAN_IT_ERROR_PASSIVE |&lt;br /&gt;
            CAN_IT_BUSOFF |&lt;br /&gt;
            CAN_IT_LAST_ERROR_CODE |&lt;br /&gt;
            CAN_IT_ERROR&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
  /* USER CODE END 2 */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the main loop we can send a message with the current timestamp:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  /* USER CODE BEGIN WHILE */&lt;br /&gt;
&lt;br /&gt;
    uint32_t now = 0, last_blink = 0, last_tx = 0;&lt;br /&gt;
&lt;br /&gt;
    while (1) {&lt;br /&gt;
&lt;br /&gt;
        now = HAL_GetTick();&lt;br /&gt;
&lt;br /&gt;
        if (now - last_tx &amp;gt;= 100) {&lt;br /&gt;
&lt;br /&gt;
            TxHeader.DLC = 4;&lt;br /&gt;
            TxHeader.ExtId = 0;&lt;br /&gt;
            TxHeader.IDE = CAN_ID_STD;&lt;br /&gt;
            TxHeader.RTR = CAN_RTR_DATA;&lt;br /&gt;
            TxHeader.StdId = 0x601;&lt;br /&gt;
            //TxHeader.TransmitGlobalTime = DISABLE;&lt;br /&gt;
&lt;br /&gt;
            if (HAL_CAN_AddTxMessage(&amp;amp;hcan1, &amp;amp;TxHeader, (uint8_t *)&amp;amp;now, &amp;amp;TxMailbox) != HAL_OK)&lt;br /&gt;
            {&lt;br /&gt;
                Error_Handler();&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            last_tx = now;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (now - last_blink &amp;gt;= 500) {&lt;br /&gt;
&lt;br /&gt;
            HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);&lt;br /&gt;
&lt;br /&gt;
            last_blink = now;&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    /* USER CODE END WHILE */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Real CAN bus example ==&lt;br /&gt;
&lt;br /&gt;
To be added&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
To be added&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Streamline_CAN_Bus&amp;diff=8044</id>
		<title>Streamline CAN Bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Streamline_CAN_Bus&amp;diff=8044"/>
		<updated>2026-08-17T04:05:04Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=STM32 Tutorial Video&lt;br /&gt;
|number=98&lt;br /&gt;
|title=Streamline CAN Bus&lt;br /&gt;
|youtube-id=urtuDQOOEH0&lt;br /&gt;
|description=CAN bus on CurrentMakers streamline.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Streamline_CAN_Bus&amp;diff=8043</id>
		<title>Streamline CAN Bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Streamline_CAN_Bus&amp;diff=8043"/>
		<updated>2026-08-17T04:04:53Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=STM32 Tutorial Video |number=97 |title=Streamline CAN Bus |youtube-id=urtuDQOOEH0 |description=CAN bus on CurrentMakers streamline. }}&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=STM32 Tutorial Video&lt;br /&gt;
|number=97&lt;br /&gt;
|title=Streamline CAN Bus&lt;br /&gt;
|youtube-id=urtuDQOOEH0&lt;br /&gt;
|description=CAN bus on CurrentMakers streamline.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8042</id>
		<title>CAN bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8042"/>
		<updated>2026-08-17T01:47:49Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* CAN Frame */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:CAN]]&lt;br /&gt;
[[File:CAN 3.jpg|thumb|300px|Well, it's a Carlsberg CAN Bus]]&lt;br /&gt;
A controller area network ([[CAN bus]]) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts. For each device, the data in a frame is transmitted serially but in such a way that if more than one device transmits at the same time, the highest priority device can continue while the others back off. Frames are received by all devices, including by the transmitting device.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Bus Layout == &lt;br /&gt;
&lt;br /&gt;
A [[CAN bus]] consist of a differential set of wires with a number of nodes attached in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_ISO11898-2_Network.png|1200px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wires operate in differential mode to suppress noise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ISO11898-3_Waveform.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The nodes themselves consist of a CAN Controller and a transceiver which will adjust the signals to match the bus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_Node.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multi Master ==&lt;br /&gt;
&lt;br /&gt;
The exact voltages for a logical 0 or 1 depend on the physical layer used, but the basic principle of CAN requires that each node listen to the data on the CAN network including the transmitting node(s) itself (themselves). If a logical 1 is transmitted by all transmitting nodes at the same time, then a logical 1 is seen by all of the nodes, including both the transmitting node(s) and receiving node(s). If a logical 0 is transmitted by all transmitting node(s) at the same time, then a logical 0 is seen by all nodes. If a logical 0 is being transmitted by one or more nodes, and a logical 1 is being transmitted by one or more nodes, then a logical 0 is seen by all nodes including the node(s) transmitting the logical 1. When a node transmits a logical 1 but sees a logical 0, it realizes that there is a contention and it quits transmitting. By using this process, any node that transmits a logical 1, when another node transmits a logical 0, loses the arbitration and drops out. A node that loses arbitration re-queues its message for later transmission and the CAN frame bit-stream continues without error until only one node is left transmitting. This means that the node that transmits the first 1 loses arbitration. Since the 11 (or 29 for CAN 2.0B) bit identifier is transmitted by all nodes at the start of the CAN frame, the node with the lowest identifier transmits more zeros at the start of the frame, and that is the node that wins the arbitration or has the highest priority.&lt;br /&gt;
&lt;br /&gt;
For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation, 00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time, each will first transmit the start bit then transmit the first six zeros of their ID with no arbitration decision being made.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| Start &amp;lt;br /&amp;gt;bit&lt;br /&gt;
! colspan=&amp;quot;11&amp;quot;| ID bits&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| The rest of the frame&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|10&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|9&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|8&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|7&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|6&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|5&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|4&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|3&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|2&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|1&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|0&lt;br /&gt;
|-&lt;br /&gt;
! Node 15&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|-&lt;br /&gt;
! Node 16&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:red;&amp;quot;|1|| colspan=&amp;quot;5&amp;quot;| Stopped Transmitting&lt;br /&gt;
|-&lt;br /&gt;
! CAN data&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When ID bit 4 is transmitted, the node with the ID of 16 transmits a 1 (recessive) for its ID, and the node with the ID of 15 transmits a 0 (dominant) for its ID. When this happens, the node with the ID of 16 knows it transmitted a 1, but sees a 0 and realizes that there is a collision and it lost arbitration. Node 16 stops transmitting which allows the node with ID of 15 to continue its transmission without any loss of data. The node with the lowest ID will always win the arbitration and therefore has the highest priority.&lt;br /&gt;
&lt;br /&gt;
== CAN Frame ==&lt;br /&gt;
[[File:CAN-bus-frame-with-stuff-bit-and-correct-CRC.png|thumb|center|850px|A complete CAN bus frame, including stuff bits, a correct CRC, and inter-frame spacing]]&lt;br /&gt;
&lt;br /&gt;
The frame format is as follows: The bit values are described for CAN-LO signal.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &amp;quot;&lt;br /&gt;
! Field name !! Length (bits) !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Start-of-frame|| 1|| Denotes the start of frame transmission&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=lime| Identifier (green)|| 11|| A (unique) identifier which also represents the message priority&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=cyan| Remote transmission request (RTR) (blue)|| 1|| Must be dominant (0) for data frames and recessive (1) for remote request frames (see [[#Remote frame|Remote Frame]], below)&lt;br /&gt;
|-&lt;br /&gt;
| Identifier extension bit (IDE)|| 1|| Must be dominant (0) for base frame format with 11-bit identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Reserved bit (r0)|| 1|| Reserved bit. Must be dominant (0), but accepted as either dominant or recessive.&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=yellow| Data length code (DLC) (yellow)|| 4|| Number of bytes of data (0–8 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=red| Data field (red)|| 0–64 (0-8 bytes)|| Data to be transmitted (length in bytes dictated by DLC field)&lt;br /&gt;
|-&lt;br /&gt;
| CRC|| 15|| [[Cyclic redundancy check#CRC-15-CAN|Cyclic redundancy check]]&lt;br /&gt;
|-&lt;br /&gt;
| CRC delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| ACK slot|| 1|| Transmitter sends recessive (1) and any receiver can assert a dominant (0)&lt;br /&gt;
|-&lt;br /&gt;
| ACK delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| End-of-frame (EOF)|| 7|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| Inter-frame spacing (IFS)|| 3|| Must be recessive (1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As can be seen the overhead is massive.  47 bit required to send a maximum of a 64 bit payload.  The CAN bus is definitely not designed for speed but rather reliability.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/CAN_bus Wikipedia Article about CAN]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8041</id>
		<title>CAN bus</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=CAN_bus&amp;diff=8041"/>
		<updated>2026-08-17T01:16:14Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* Bus Layout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:CAN]]&lt;br /&gt;
[[File:CAN 3.jpg|thumb|300px|Well, it's a Carlsberg CAN Bus]]&lt;br /&gt;
A controller area network ([[CAN bus]]) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts. For each device, the data in a frame is transmitted serially but in such a way that if more than one device transmits at the same time, the highest priority device can continue while the others back off. Frames are received by all devices, including by the transmitting device.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Bus Layout == &lt;br /&gt;
&lt;br /&gt;
A [[CAN bus]] consist of a differential set of wires with a number of nodes attached in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_ISO11898-2_Network.png|1200px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wires operate in differential mode to suppress noise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ISO11898-3_Waveform.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The nodes themselves consist of a CAN Controller and a transceiver which will adjust the signals to match the bus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:CAN_Node.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multi Master ==&lt;br /&gt;
&lt;br /&gt;
The exact voltages for a logical 0 or 1 depend on the physical layer used, but the basic principle of CAN requires that each node listen to the data on the CAN network including the transmitting node(s) itself (themselves). If a logical 1 is transmitted by all transmitting nodes at the same time, then a logical 1 is seen by all of the nodes, including both the transmitting node(s) and receiving node(s). If a logical 0 is transmitted by all transmitting node(s) at the same time, then a logical 0 is seen by all nodes. If a logical 0 is being transmitted by one or more nodes, and a logical 1 is being transmitted by one or more nodes, then a logical 0 is seen by all nodes including the node(s) transmitting the logical 1. When a node transmits a logical 1 but sees a logical 0, it realizes that there is a contention and it quits transmitting. By using this process, any node that transmits a logical 1, when another node transmits a logical 0, loses the arbitration and drops out. A node that loses arbitration re-queues its message for later transmission and the CAN frame bit-stream continues without error until only one node is left transmitting. This means that the node that transmits the first 1 loses arbitration. Since the 11 (or 29 for CAN 2.0B) bit identifier is transmitted by all nodes at the start of the CAN frame, the node with the lowest identifier transmits more zeros at the start of the frame, and that is the node that wins the arbitration or has the highest priority.&lt;br /&gt;
&lt;br /&gt;
For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation, 00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time, each will first transmit the start bit then transmit the first six zeros of their ID with no arbitration decision being made.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| Start &amp;lt;br /&amp;gt;bit&lt;br /&gt;
! colspan=&amp;quot;11&amp;quot;| ID bits&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot;| The rest of the frame&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|10&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|9&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|8&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|7&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|6&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|5&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|4&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|3&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|2&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|1&lt;br /&gt;
! style=&amp;quot;width:32px;&amp;quot;|0&lt;br /&gt;
|-&lt;br /&gt;
! Node 15&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|-&lt;br /&gt;
! Node 16&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:red;&amp;quot;|1|| colspan=&amp;quot;5&amp;quot;| Stopped Transmitting&lt;br /&gt;
|-&lt;br /&gt;
! CAN data&lt;br /&gt;
| 0|| 0|| 0|| 0|| 0|| 0|| 0|| style=&amp;quot;background:green;&amp;quot;|0|| 1|| 1|| 1|| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When ID bit 4 is transmitted, the node with the ID of 16 transmits a 1 (recessive) for its ID, and the node with the ID of 15 transmits a 0 (dominant) for its ID. When this happens, the node with the ID of 16 knows it transmitted a 1, but sees a 0 and realizes that there is a collision and it lost arbitration. Node 16 stops transmitting which allows the node with ID of 15 to continue its transmission without any loss of data. The node with the lowest ID will always win the arbitration and therefore has the highest priority.&lt;br /&gt;
&lt;br /&gt;
== CAN Frame ==&lt;br /&gt;
[[File:CAN-bus-frame-with-stuff-bit-and-correct-CRC.png|thumb|center|750px|A complete CAN bus frame, including stuff bits, a correct CRC, and inter-frame spacing]]&lt;br /&gt;
&lt;br /&gt;
The frame format is as follows: The bit values are described for CAN-LO signal.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &amp;quot;&lt;br /&gt;
! Field name !! Length (bits) !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Start-of-frame|| 1|| Denotes the start of frame transmission&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=lime| Identifier (green)|| 11|| A (unique) identifier which also represents the message priority&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=cyan| Remote transmission request (RTR) (blue)|| 1|| Must be dominant (0) for data frames and recessive (1) for remote request frames (see [[#Remote frame|Remote Frame]], below)&lt;br /&gt;
|-&lt;br /&gt;
| Identifier extension bit (IDE)|| 1|| Must be dominant (0) for base frame format with 11-bit identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Reserved bit (r0)|| 1|| Reserved bit. Must be dominant (0), but accepted as either dominant or recessive.&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=yellow| Data length code (DLC) (yellow)|| 4|| Number of bytes of data (0–8 bytes)&lt;br /&gt;
|-&lt;br /&gt;
| bgcolor=red| Data field (red)|| 0–64 (0-8 bytes)|| Data to be transmitted (length in bytes dictated by DLC field)&lt;br /&gt;
|-&lt;br /&gt;
| CRC|| 15|| [[Cyclic redundancy check#CRC-15-CAN|Cyclic redundancy check]]&lt;br /&gt;
|-&lt;br /&gt;
| CRC delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| ACK slot|| 1|| Transmitter sends recessive (1) and any receiver can assert a dominant (0)&lt;br /&gt;
|-&lt;br /&gt;
| ACK delimiter|| 1|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| End-of-frame (EOF)|| 7|| Must be recessive (1)&lt;br /&gt;
|-&lt;br /&gt;
| Inter-frame spacing (IFS)|| 3|| Must be recessive (1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As can be seen the overhead is massive.  47 bit required to send a maximum of a 64 bit payload.  The CAN bus is definitely not designed for speed but rather reliability.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/CAN_bus Wikipedia Article about CAN]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Neopixel_WS2812_RGB_LED_(part_1)&amp;diff=8040</id>
		<title>Neopixel WS2812 RGB LED (part 1)</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Neopixel_WS2812_RGB_LED_(part_1)&amp;diff=8040"/>
		<updated>2026-08-15T04:52:38Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=RP Pico Video |number=14 |title=Neopixel WS2812 RGB LED (part 1) |youtube-id=QLq5hNKwWlk |description=Driving Neopixel WS2812 addressable RGB LEDs using a RP23...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=RP Pico Video&lt;br /&gt;
|number=14&lt;br /&gt;
|title=Neopixel WS2812 RGB LED (part 1)&lt;br /&gt;
|youtube-id=QLq5hNKwWlk&lt;br /&gt;
|description=Driving Neopixel WS2812 addressable RGB LEDs using a RP2350.  We will implement a PIO state machine to take care of the timing.  We will also demonstrate how efficiency can be increased by offloading the data transfer to DMA.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Power_(and_a_bit_I_forgot)&amp;diff=8039</id>
		<title>Power (and a bit I forgot)</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Power_(and_a_bit_I_forgot)&amp;diff=8039"/>
		<updated>2026-08-13T08:04:33Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=Electronics Video |number=6 |title=Power (and a bit I forgot) |youtube-id=sLBSLPhS5UY |description=In this Getting Started Tutorial video we will cover Electri...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=Electronics Video&lt;br /&gt;
|number=6&lt;br /&gt;
|title=Power (and a bit I forgot)&lt;br /&gt;
|youtube-id=sLBSLPhS5UY&lt;br /&gt;
|description=In this Getting Started Tutorial video we will cover Electrical Power - what it is and why you need to know.  We will also cover Zener diodes, which we forgot to cover in the previous video.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=MIDI_Synthesizer_-_STM32C071_and_TinyUSB&amp;diff=8038</id>
		<title>MIDI Synthesizer - STM32C071 and TinyUSB</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=MIDI_Synthesizer_-_STM32C071_and_TinyUSB&amp;diff=8038"/>
		<updated>2026-08-10T07:40:53Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=STM32 Tutorial Video |number=97 |title=MIDI Synthesizer - STM32C071 and TinyUSB |youtube-id=sH7dBeBEMlg |description=In this video we will implement a (pretty...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=STM32 Tutorial Video&lt;br /&gt;
|number=97&lt;br /&gt;
|title=MIDI Synthesizer - STM32C071 and TinyUSB&lt;br /&gt;
|youtube-id=sH7dBeBEMlg&lt;br /&gt;
|description=In this video we will implement a (pretty shitty) USB MIDI device acting like a simple synthesizer using nothing but PWM and a passive buzzer.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=FreeRTOS_on_RP_Pico_-_Semaphores_Notifications_Queues_and_Timers&amp;diff=8037</id>
		<title>FreeRTOS on RP Pico - Semaphores Notifications Queues and Timers</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=FreeRTOS_on_RP_Pico_-_Semaphores_Notifications_Queues_and_Timers&amp;diff=8037"/>
		<updated>2026-08-08T07:28:39Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=RP Pico Video |number=13 |title=FreeRTOS on RP Pico - Semaphores Notifications Queues and Timers |youtube-id=MkHc4k1Tz4w |description=In this video we cover ho...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=RP Pico Video&lt;br /&gt;
|number=13&lt;br /&gt;
|title=FreeRTOS on RP Pico - Semaphores Notifications Queues and Timers&lt;br /&gt;
|youtube-id=MkHc4k1Tz4w&lt;br /&gt;
|description=In this video we cover how to use FreeRTOS Semaphores, Notifications, Queues and Timers with RP2350.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8036</id>
		<title>STM32 Hidden Flash</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8036"/>
		<updated>2026-08-08T00:55:07Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* Video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:STM32]][[Category:Flash]][[Category:STM32 Hardware]][[Category:STM32 Documentation]][[Category:STM32 Development]]{{metadesc|STM32 Real Flash Size}}&lt;br /&gt;
Many [[STM32]] [[MCU]]s have more flash than they claim to have.&lt;br /&gt;
&lt;br /&gt;
This has been confirmed on [[STM32F103]], [[STM32L432]] and [[STM32F40x]].&lt;br /&gt;
&lt;br /&gt;
== Speculation ==&lt;br /&gt;
&lt;br /&gt;
While not confirmed it is quite possible that this is common in all [[STM32]] [[MCU]]s which share datasheets.  If we look at the STM32G474, the datasheet overview looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Example datasheet STM32G474xB STM32G474xC STM32G474xE.png|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most likely, these MCU's all have 512 kB of flash even if some report having less.&lt;br /&gt;
&lt;br /&gt;
== Video == &lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|lMNvgP76n2E}}&lt;br /&gt;
&lt;br /&gt;
== STM32L432 ==&lt;br /&gt;
[[File:FidoKey rev. a - top view.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
The STM32L432Kx is available with two different flash sizes.  The STM32L432KB has got 128 kB while the STM32L432KC has got 256 kB.&lt;br /&gt;
I recently created a USB &amp;quot;key&amp;quot; using the STM32L432.  The reason for using this specific [[STM32]] [[MCU]] was twofold:&lt;br /&gt;
&lt;br /&gt;
# It is small&lt;br /&gt;
# It's got a built-in 48 MHz oscillator precise enough to use USB without an external crystal&lt;br /&gt;
&lt;br /&gt;
Unfortunately, while I wanted the 256 kB version, only the 128 kB version was available.&lt;br /&gt;
&lt;br /&gt;
[[File:STM32L432 Part Numbering.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The [[STM32]] [[Blue Pill]] boards mostly use Chinese clone [[MCU]]s but there has been a lot of writing about the original ones having 128 kB of flash rather than the 64 kB specified by the datasheet.  There is even a [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html test tool] available which can test for the hidden flash.&lt;br /&gt;
&lt;br /&gt;
Inspired by this, I decided to test the STM32L432KB on my own board.  As per the datasheet this processor is supposed to have 128 kB of flash ranging from 0x8000000 to 0x801FFFF.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
[[File:Flash Size Test Setup.jpg|thumb|300px|STM32L432 Test Setup]] &lt;br /&gt;
&lt;br /&gt;
=== Checking device ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-info --probe&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J45S31&lt;br /&gt;
  serial:     066CFF3933584B3043184346&lt;br /&gt;
  flash:      131072 (pagesize: 2048)&lt;br /&gt;
  sram:       49152&lt;br /&gt;
  chipid:     0x435&lt;br /&gt;
  dev-type:   STM32L41x_L42x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the device reports 128 kB of flash - as is expected.&lt;br /&gt;
&lt;br /&gt;
=== Generating Test Data ===&lt;br /&gt;
&lt;br /&gt;
First step is to create a 256 kB file with random data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ dd if=/dev/urandom of=random.bin bs=1k count=256&lt;br /&gt;
256+0 records in&lt;br /&gt;
256+0 records out&lt;br /&gt;
262144 bytes (262 kB, 256 KiB) copied, 0.0012241 s, 214 MB/s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing data to MCU ===&lt;br /&gt;
&lt;br /&gt;
The random.bin file is of a size which should only be possible to flash on STM32L432KC.&lt;br /&gt;
&lt;br /&gt;
First step is to flash normal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:01 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:01 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
2024-09-02T10:30:01 ERROR common_flash.c: The size exceeds the size of the flash (0x00020000 bytes available)&lt;br /&gt;
stlink_fwrite_flash() == -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As expected this failed.  The [[MCU]] reports 128 kB of flash and we attempt to write 256 kB.  We can however instruct st-flash to ignore that and attempt to write the entire file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:26 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:26 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Page:0x10 Size:0x800 -&amp;gt; Flash page at 0x8008000 erased (size: 0x800EraseFlash - Page:0x11 Size:0x800 -&amp;gt; Flash page at 0x8008800 erased (size: 0x800EraseFlash - Page:0x12 Size:0x800 -&amp;gt; Flash page at 0x8009000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x13 Size:0x800 -&amp;gt; Flash page at 0x8009800 erased (size: 0x800EraseFlash - Page:0x14 Size:0x800 -&amp;gt; Flash page at 0x800a000 erased (size: 0x800EraseFlash - Page:0x15 Size:0x800 -&amp;gt; Flash page at 0x800a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x16 Size:0x800 -&amp;gt; Flash page at 0x800b000 erased (size: 0x800EraseFlash - Page:0x17 Size:0x800 -&amp;gt; Flash page at 0x800b800 erased (size: 0x800EraseFlash - Page:0x18 Size:0x800 -&amp;gt; Flash page at 0x800c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x19 Size:0x800 -&amp;gt; Flash page at 0x800c800 erased (size: 0x800EraseFlash - Page:0x1a Size:0x800 -&amp;gt; Flash page at 0x800d000 erased (size: 0x800EraseFlash - Page:0x1b Size:0x800 -&amp;gt; Flash page at 0x800d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1c Size:0x800 -&amp;gt; Flash page at 0x800e000 erased (size: 0x800EraseFlash - Page:0x1d Size:0x800 -&amp;gt; Flash page at 0x800e800 erased (size: 0x800EraseFlash - Page:0x1e Size:0x800 -&amp;gt; Flash page at 0x800f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1f Size:0x800 -&amp;gt; Flash page at 0x800f800 erased (size: 0x800EraseFlash - Page:0x20 Size:0x800 -&amp;gt; Flash page at 0x8010000 erased (size: 0x800EraseFlash - Page:0x21 Size:0x800 -&amp;gt; Flash page at 0x8010800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x22 Size:0x800 -&amp;gt; Flash page at 0x8011000 erased (size: 0x800EraseFlash - Page:0x23 Size:0x800 -&amp;gt; Flash page at 0x8011800 erased (size: 0x800EraseFlash - Page:0x24 Size:0x800 -&amp;gt; Flash page at 0x8012000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x25 Size:0x800 -&amp;gt; Flash page at 0x8012800 erased (size: 0x800EraseFlash - Page:0x26 Size:0x800 -&amp;gt; Flash page at 0x8013000 erased (size: 0x800EraseFlash - Page:0x27 Size:0x800 -&amp;gt; Flash page at 0x8013800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x28 Size:0x800 -&amp;gt; Flash page at 0x8014000 erased (size: 0x800EraseFlash - Page:0x29 Size:0x800 -&amp;gt; Flash page at 0x8014800 erased (size: 0x800EraseFlash - Page:0x2a Size:0x800 -&amp;gt; Flash page at 0x8015000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2b Size:0x800 -&amp;gt; Flash page at 0x8015800 erased (size: 0x800EraseFlash - Page:0x2c Size:0x800 -&amp;gt; Flash page at 0x8016000 erased (size: 0x800EraseFlash - Page:0x2d Size:0x800 -&amp;gt; Flash page at 0x8016800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2e Size:0x800 -&amp;gt; Flash page at 0x8017000 erased (size: 0x800EraseFlash - Page:0x2f Size:0x800 -&amp;gt; Flash page at 0x8017800 erased (size: 0x800EraseFlash - Page:0x30 Size:0x800 -&amp;gt; Flash page at 0x8018000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x31 Size:0x800 -&amp;gt; Flash page at 0x8018800 erased (size: 0x800EraseFlash - Page:0x32 Size:0x800 -&amp;gt; Flash page at 0x8019000 erased (size: 0x800EraseFlash - Page:0x33 Size:0x800 -&amp;gt; Flash page at 0x8019800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x34 Size:0x800 -&amp;gt; Flash page at 0x801a000 erased (size: 0x800EraseFlash - Page:0x35 Size:0x800 -&amp;gt; Flash page at 0x801a800 erased (size: 0x800EraseFlash - Page:0x36 Size:0x800 -&amp;gt; Flash page at 0x801b000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x37 Size:0x800 -&amp;gt; Flash page at 0x801b800 erased (size: 0x800EraseFlash - Page:0x38 Size:0x800 -&amp;gt; Flash page at 0x801c000 erased (size: 0x800EraseFlash - Page:0x39 Size:0x800 -&amp;gt; Flash page at 0x801c800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3a Size:0x800 -&amp;gt; Flash page at 0x801d000 erased (size: 0x800EraseFlash - Page:0x3b Size:0x800 -&amp;gt; Flash page at 0x801d800 erased (size: 0x800EraseFlash - Page:0x3c Size:0x800 -&amp;gt; Flash page at 0x801e000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3d Size:0x800 -&amp;gt; Flash page at 0x801e800 erased (size: 0x800EraseFlash - Page:0x3e Size:0x800 -&amp;gt; Flash page at 0x801f000 erased (size: 0x800EraseFlash - Page:0x3f Size:0x800 -&amp;gt; Flash page at 0x801f800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x40 Size:0x800 -&amp;gt; Flash page at 0x8020000 erased (size: 0x800EraseFlash - Page:0x41 Size:0x800 -&amp;gt; Flash page at 0x8020800 erased (size: 0x800EraseFlash - Page:0x42 Size:0x800 -&amp;gt; Flash page at 0x8021000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x43 Size:0x800 -&amp;gt; Flash page at 0x8021800 erased (size: 0x800EraseFlash - Page:0x44 Size:0x800 -&amp;gt; Flash page at 0x8022000 erased (size: 0x800EraseFlash - Page:0x45 Size:0x800 -&amp;gt; Flash page at 0x8022800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x46 Size:0x800 -&amp;gt; Flash page at 0x8023000 erased (size: 0x800EraseFlash - Page:0x47 Size:0x800 -&amp;gt; Flash page at 0x8023800 erased (size: 0x800EraseFlash - Page:0x48 Size:0x800 -&amp;gt; Flash page at 0x8024000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x49 Size:0x800 -&amp;gt; Flash page at 0x8024800 erased (size: 0x800EraseFlash - Page:0x4a Size:0x800 -&amp;gt; Flash page at 0x8025000 erased (size: 0x800EraseFlash - Page:0x4b Size:0x800 -&amp;gt; Flash page at 0x8025800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4c Size:0x800 -&amp;gt; Flash page at 0x8026000 erased (size: 0x800EraseFlash - Page:0x4d Size:0x800 -&amp;gt; Flash page at 0x8026800 erased (size: 0x800EraseFlash - Page:0x4e Size:0x800 -&amp;gt; Flash page at 0x8027000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4f Size:0x800 -&amp;gt; Flash page at 0x8027800 erased (size: 0x800EraseFlash - Page:0x50 Size:0x800 -&amp;gt; Flash page at 0x8028000 erased (size: 0x800EraseFlash - Page:0x51 Size:0x800 -&amp;gt; Flash page at 0x8028800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x52 Size:0x800 -&amp;gt; Flash page at 0x8029000 erased (size: 0x800EraseFlash - Page:0x53 Size:0x800 -&amp;gt; Flash page at 0x8029800 erased (size: 0x800EraseFlash - Page:0x54 Size:0x800 -&amp;gt; Flash page at 0x802a000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x55 Size:0x800 -&amp;gt; Flash page at 0x802a800 erased (size: 0x800EraseFlash - Page:0x56 Size:0x800 -&amp;gt; Flash page at 0x802b000 erased (size: 0x800EraseFlash - Page:0x57 Size:0x800 -&amp;gt; Flash page at 0x802b800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x58 Size:0x800 -&amp;gt; Flash page at 0x802c000 erased (size: 0x800EraseFlash - Page:0x59 Size:0x800 -&amp;gt; Flash page at 0x802c800 erased (size: 0x800EraseFlash - Page:0x5a Size:0x800 -&amp;gt; Flash page at 0x802d000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5b Size:0x800 -&amp;gt; Flash page at 0x802d800 erased (size: 0x800EraseFlash - Page:0x5c Size:0x800 -&amp;gt; Flash page at 0x802e000 erased (size: 0x800EraseFlash - Page:0x5d Size:0x800 -&amp;gt; Flash page at 0x802e800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5e Size:0x800 -&amp;gt; Flash page at 0x802f000 erased (size: 0x800EraseFlash - Page:0x5f Size:0x800 -&amp;gt; Flash page at 0x802f800 erased (size: 0x800EraseFlash - Page:0x60 Size:0x800 -&amp;gt; Flash page at 0x8030000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x61 Size:0x800 -&amp;gt; Flash page at 0x8030800 erased (size: 0x800EraseFlash - Page:0x62 Size:0x800 -&amp;gt; Flash page at 0x8031000 erased (size: 0x800EraseFlash - Page:0x63 Size:0x800 -&amp;gt; Flash page at 0x8031800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x64 Size:0x800 -&amp;gt; Flash page at 0x8032000 erased (size: 0x800EraseFlash - Page:0x65 Size:0x800 -&amp;gt; Flash page at 0x8032800 erased (size: 0x800EraseFlash - Page:0x66 Size:0x800 -&amp;gt; Flash page at 0x8033000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x67 Size:0x800 -&amp;gt; Flash page at 0x8033800 erased (size: 0x800EraseFlash - Page:0x68 Size:0x800 -&amp;gt; Flash page at 0x8034000 erased (size: 0x800EraseFlash - Page:0x69 Size:0x800 -&amp;gt; Flash page at 0x8034800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6a Size:0x800 -&amp;gt; Flash page at 0x8035000 erased (size: 0x800EraseFlash - Page:0x6b Size:0x800 -&amp;gt; Flash page at 0x8035800 erased (size: 0x800EraseFlash - Page:0x6c Size:0x800 -&amp;gt; Flash page at 0x8036000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6d Size:0x800 -&amp;gt; Flash page at 0x8036800 erased (size: 0x800EraseFlash - Page:0x6e Size:0x800 -&amp;gt; Flash page at 0x8037000 erased (size: 0x800EraseFlash - Page:0x6f Size:0x800 -&amp;gt; Flash page at 0x8037800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x70 Size:0x800 -&amp;gt; Flash page at 0x8038000 erased (size: 0x800EraseFlash - Page:0x71 Size:0x800 -&amp;gt; Flash page at 0x8038800 erased (size: 0x800EraseFlash - Page:0x72 Size:0x800 -&amp;gt; Flash page at 0x8039000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x73 Size:0x800 -&amp;gt; Flash page at 0x8039800 erased (size: 0x800EraseFlash - Page:0x74 Size:0x800 -&amp;gt; Flash page at 0x803a000 erased (size: 0x800EraseFlash - Page:0x75 Size:0x800 -&amp;gt; Flash page at 0x803a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x76 Size:0x800 -&amp;gt; Flash page at 0x803b000 erased (size: 0x800EraseFlash - Page:0x77 Size:0x800 -&amp;gt; Flash page at 0x803b800 erased (size: 0x800EraseFlash - Page:0x78 Size:0x800 -&amp;gt; Flash page at 0x803c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x79 Size:0x800 -&amp;gt; Flash page at 0x803c800 erased (size: 0x800EraseFlash - Page:0x7a Size:0x800 -&amp;gt; Flash page at 0x803d000 erased (size: 0x800EraseFlash - Page:0x7b Size:0x800 -&amp;gt; Flash page at 0x803d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7c Size:0x800 -&amp;gt; Flash page at 0x803e000 erased (size: 0x800EraseFlash - Page:0x7d Size:0x800 -&amp;gt; Flash page at 0x803e800 erased (size: 0x800EraseFlash - Page:0x7e Size:0x800 -&amp;gt; Flash page at 0x803f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7f Size:0x800 -&amp;gt; Flash page at 0x803f800 erased (size: 0x800)&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2024-09-02T10:30:35 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2024-09-02T10:30:37 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That went well - no errors reported.  Now let's try to read that flash into a file:&lt;br /&gt;
&lt;br /&gt;
=== Reading data from the MCU ===&lt;br /&gt;
&lt;br /&gt;
To be absolutely certain, read the data back into a new file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k read random2.bin 0x8000000 0x40000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: read from address 0x08000000 size 262144&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No complaints!&lt;br /&gt;
&lt;br /&gt;
=== Compare data ===&lt;br /&gt;
&lt;br /&gt;
Finally we can verify that the data read from the MCU matches the data we wrote to the MCU:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ md5sum random*&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random2.bin&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are identical, so it is absolutely confirmed that this particular STM32L432KB is in fact a STM32L432KC which identifies as a STM32L432KB.&lt;br /&gt;
&lt;br /&gt;
== STM32F407 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@nb7:~/tmp$ st-info --probe &amp;amp;&amp;amp; dd if=/dev/urandom of=random.bin bs=1k count=1024 &amp;amp;&amp;amp; st-flash --flash=1024k write random.bin 0x8000000 &amp;amp;&amp;amp; st-flash --flash=1024k read random2.bin 0x8000000 0x100000 &amp;amp;&amp;amp; md5sum random.bin random2.bin&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J48S35&lt;br /&gt;
  serial:     066DFF495454657287165222&lt;br /&gt;
  flash:      524288 (pagesize: 16384)&lt;br /&gt;
  sram:       196608&lt;br /&gt;
  chipid:     0x413&lt;br /&gt;
  dev-type:   STM32F4x5_F4x7&lt;br /&gt;
1024+0 records in&lt;br /&gt;
1024+0 records out&lt;br /&gt;
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00555526 s, 189 MB/s&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:03 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
file random.bin md5 checksum: dcd4cae158a72174cf828026717b6d4b, stlink checksum: 0x07f88bb5&lt;br /&gt;
2026-08-05T18:17:03 INFO common_flash.c: Attempting to write 1048576 (0x100000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Sector:0x0 Size:0x4000 -&amp;gt; Flash page at 0x8000000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x1 Size:0x4000 -&amp;gt; Flash page at 0x8004000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x2 Size:0x4000 -&amp;gt; Flash page at 0x8008000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x3 Size:0x4000 -&amp;gt; Flash page at 0x800c000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x4 Size:0x10000 -&amp;gt; Flash page at 0x8010000 erased (size: 0x10000)&lt;br /&gt;
EraseFlash - Sector:0x5 Size:0x20000 -&amp;gt; Flash page at 0x8020000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x6 Size:0x20000 -&amp;gt; Flash page at 0x8040000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x7 Size:0x20000 -&amp;gt; Flash page at 0x8060000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x8 Size:0x20000 -&amp;gt; Flash page at 0x8080000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x9 Size:0x20000 -&amp;gt; Flash page at 0x80a0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xa Size:0x20000 -&amp;gt; Flash page at 0x80c0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xb Size:0x20000 -&amp;gt; Flash page at 0x80e0000 erased (size: 0x20000)&lt;br /&gt;
&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: enabling 32-bit flash writes&lt;br /&gt;
2026-08-05T18:17:36 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2026-08-05T18:17:46 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: Go to Thumb mode&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: read from address 0x08000000 size 1048576&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random.bin&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random2.bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://ipfs-pin.com/ipfs/QmcYpvigogWESmwTEFM5GYZc6st2SJRAoqwKWJ8ZDtgiXb/stm32l432kb.pdf STM32L432 Datasheet]&lt;br /&gt;
* [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html Bluepill Diagnostics Tool]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8035</id>
		<title>STM32 Hidden Flash</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8035"/>
		<updated>2026-08-08T00:54:23Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:STM32]][[Category:Flash]][[Category:STM32 Hardware]][[Category:STM32 Documentation]][[Category:STM32 Development]]{{metadesc|STM32 Real Flash Size}}&lt;br /&gt;
Many [[STM32]] [[MCU]]s have more flash than they claim to have.&lt;br /&gt;
&lt;br /&gt;
This has been confirmed on [[STM32F103]], [[STM32L432]] and [[STM32F40x]].&lt;br /&gt;
&lt;br /&gt;
== Speculation ==&lt;br /&gt;
&lt;br /&gt;
While not confirmed it is quite possible that this is common in all [[STM32]] [[MCU]]s which share datasheets.  If we look at the STM32G474, the datasheet overview looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Example datasheet STM32G474xB STM32G474xC STM32G474xE.png|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most likely, these MCU's all have 512 kB of flash even if some report having less.&lt;br /&gt;
&lt;br /&gt;
== Video == &lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|lMNvgP76n2Ee}}&lt;br /&gt;
&lt;br /&gt;
== STM32L432 ==&lt;br /&gt;
[[File:FidoKey rev. a - top view.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
The STM32L432Kx is available with two different flash sizes.  The STM32L432KB has got 128 kB while the STM32L432KC has got 256 kB.&lt;br /&gt;
I recently created a USB &amp;quot;key&amp;quot; using the STM32L432.  The reason for using this specific [[STM32]] [[MCU]] was twofold:&lt;br /&gt;
&lt;br /&gt;
# It is small&lt;br /&gt;
# It's got a built-in 48 MHz oscillator precise enough to use USB without an external crystal&lt;br /&gt;
&lt;br /&gt;
Unfortunately, while I wanted the 256 kB version, only the 128 kB version was available.&lt;br /&gt;
&lt;br /&gt;
[[File:STM32L432 Part Numbering.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The [[STM32]] [[Blue Pill]] boards mostly use Chinese clone [[MCU]]s but there has been a lot of writing about the original ones having 128 kB of flash rather than the 64 kB specified by the datasheet.  There is even a [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html test tool] available which can test for the hidden flash.&lt;br /&gt;
&lt;br /&gt;
Inspired by this, I decided to test the STM32L432KB on my own board.  As per the datasheet this processor is supposed to have 128 kB of flash ranging from 0x8000000 to 0x801FFFF.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
[[File:Flash Size Test Setup.jpg|thumb|300px|STM32L432 Test Setup]] &lt;br /&gt;
&lt;br /&gt;
=== Checking device ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-info --probe&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J45S31&lt;br /&gt;
  serial:     066CFF3933584B3043184346&lt;br /&gt;
  flash:      131072 (pagesize: 2048)&lt;br /&gt;
  sram:       49152&lt;br /&gt;
  chipid:     0x435&lt;br /&gt;
  dev-type:   STM32L41x_L42x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the device reports 128 kB of flash - as is expected.&lt;br /&gt;
&lt;br /&gt;
=== Generating Test Data ===&lt;br /&gt;
&lt;br /&gt;
First step is to create a 256 kB file with random data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ dd if=/dev/urandom of=random.bin bs=1k count=256&lt;br /&gt;
256+0 records in&lt;br /&gt;
256+0 records out&lt;br /&gt;
262144 bytes (262 kB, 256 KiB) copied, 0.0012241 s, 214 MB/s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing data to MCU ===&lt;br /&gt;
&lt;br /&gt;
The random.bin file is of a size which should only be possible to flash on STM32L432KC.&lt;br /&gt;
&lt;br /&gt;
First step is to flash normal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:01 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:01 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
2024-09-02T10:30:01 ERROR common_flash.c: The size exceeds the size of the flash (0x00020000 bytes available)&lt;br /&gt;
stlink_fwrite_flash() == -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As expected this failed.  The [[MCU]] reports 128 kB of flash and we attempt to write 256 kB.  We can however instruct st-flash to ignore that and attempt to write the entire file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:26 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:26 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Page:0x10 Size:0x800 -&amp;gt; Flash page at 0x8008000 erased (size: 0x800EraseFlash - Page:0x11 Size:0x800 -&amp;gt; Flash page at 0x8008800 erased (size: 0x800EraseFlash - Page:0x12 Size:0x800 -&amp;gt; Flash page at 0x8009000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x13 Size:0x800 -&amp;gt; Flash page at 0x8009800 erased (size: 0x800EraseFlash - Page:0x14 Size:0x800 -&amp;gt; Flash page at 0x800a000 erased (size: 0x800EraseFlash - Page:0x15 Size:0x800 -&amp;gt; Flash page at 0x800a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x16 Size:0x800 -&amp;gt; Flash page at 0x800b000 erased (size: 0x800EraseFlash - Page:0x17 Size:0x800 -&amp;gt; Flash page at 0x800b800 erased (size: 0x800EraseFlash - Page:0x18 Size:0x800 -&amp;gt; Flash page at 0x800c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x19 Size:0x800 -&amp;gt; Flash page at 0x800c800 erased (size: 0x800EraseFlash - Page:0x1a Size:0x800 -&amp;gt; Flash page at 0x800d000 erased (size: 0x800EraseFlash - Page:0x1b Size:0x800 -&amp;gt; Flash page at 0x800d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1c Size:0x800 -&amp;gt; Flash page at 0x800e000 erased (size: 0x800EraseFlash - Page:0x1d Size:0x800 -&amp;gt; Flash page at 0x800e800 erased (size: 0x800EraseFlash - Page:0x1e Size:0x800 -&amp;gt; Flash page at 0x800f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1f Size:0x800 -&amp;gt; Flash page at 0x800f800 erased (size: 0x800EraseFlash - Page:0x20 Size:0x800 -&amp;gt; Flash page at 0x8010000 erased (size: 0x800EraseFlash - Page:0x21 Size:0x800 -&amp;gt; Flash page at 0x8010800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x22 Size:0x800 -&amp;gt; Flash page at 0x8011000 erased (size: 0x800EraseFlash - Page:0x23 Size:0x800 -&amp;gt; Flash page at 0x8011800 erased (size: 0x800EraseFlash - Page:0x24 Size:0x800 -&amp;gt; Flash page at 0x8012000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x25 Size:0x800 -&amp;gt; Flash page at 0x8012800 erased (size: 0x800EraseFlash - Page:0x26 Size:0x800 -&amp;gt; Flash page at 0x8013000 erased (size: 0x800EraseFlash - Page:0x27 Size:0x800 -&amp;gt; Flash page at 0x8013800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x28 Size:0x800 -&amp;gt; Flash page at 0x8014000 erased (size: 0x800EraseFlash - Page:0x29 Size:0x800 -&amp;gt; Flash page at 0x8014800 erased (size: 0x800EraseFlash - Page:0x2a Size:0x800 -&amp;gt; Flash page at 0x8015000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2b Size:0x800 -&amp;gt; Flash page at 0x8015800 erased (size: 0x800EraseFlash - Page:0x2c Size:0x800 -&amp;gt; Flash page at 0x8016000 erased (size: 0x800EraseFlash - Page:0x2d Size:0x800 -&amp;gt; Flash page at 0x8016800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2e Size:0x800 -&amp;gt; Flash page at 0x8017000 erased (size: 0x800EraseFlash - Page:0x2f Size:0x800 -&amp;gt; Flash page at 0x8017800 erased (size: 0x800EraseFlash - Page:0x30 Size:0x800 -&amp;gt; Flash page at 0x8018000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x31 Size:0x800 -&amp;gt; Flash page at 0x8018800 erased (size: 0x800EraseFlash - Page:0x32 Size:0x800 -&amp;gt; Flash page at 0x8019000 erased (size: 0x800EraseFlash - Page:0x33 Size:0x800 -&amp;gt; Flash page at 0x8019800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x34 Size:0x800 -&amp;gt; Flash page at 0x801a000 erased (size: 0x800EraseFlash - Page:0x35 Size:0x800 -&amp;gt; Flash page at 0x801a800 erased (size: 0x800EraseFlash - Page:0x36 Size:0x800 -&amp;gt; Flash page at 0x801b000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x37 Size:0x800 -&amp;gt; Flash page at 0x801b800 erased (size: 0x800EraseFlash - Page:0x38 Size:0x800 -&amp;gt; Flash page at 0x801c000 erased (size: 0x800EraseFlash - Page:0x39 Size:0x800 -&amp;gt; Flash page at 0x801c800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3a Size:0x800 -&amp;gt; Flash page at 0x801d000 erased (size: 0x800EraseFlash - Page:0x3b Size:0x800 -&amp;gt; Flash page at 0x801d800 erased (size: 0x800EraseFlash - Page:0x3c Size:0x800 -&amp;gt; Flash page at 0x801e000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3d Size:0x800 -&amp;gt; Flash page at 0x801e800 erased (size: 0x800EraseFlash - Page:0x3e Size:0x800 -&amp;gt; Flash page at 0x801f000 erased (size: 0x800EraseFlash - Page:0x3f Size:0x800 -&amp;gt; Flash page at 0x801f800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x40 Size:0x800 -&amp;gt; Flash page at 0x8020000 erased (size: 0x800EraseFlash - Page:0x41 Size:0x800 -&amp;gt; Flash page at 0x8020800 erased (size: 0x800EraseFlash - Page:0x42 Size:0x800 -&amp;gt; Flash page at 0x8021000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x43 Size:0x800 -&amp;gt; Flash page at 0x8021800 erased (size: 0x800EraseFlash - Page:0x44 Size:0x800 -&amp;gt; Flash page at 0x8022000 erased (size: 0x800EraseFlash - Page:0x45 Size:0x800 -&amp;gt; Flash page at 0x8022800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x46 Size:0x800 -&amp;gt; Flash page at 0x8023000 erased (size: 0x800EraseFlash - Page:0x47 Size:0x800 -&amp;gt; Flash page at 0x8023800 erased (size: 0x800EraseFlash - Page:0x48 Size:0x800 -&amp;gt; Flash page at 0x8024000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x49 Size:0x800 -&amp;gt; Flash page at 0x8024800 erased (size: 0x800EraseFlash - Page:0x4a Size:0x800 -&amp;gt; Flash page at 0x8025000 erased (size: 0x800EraseFlash - Page:0x4b Size:0x800 -&amp;gt; Flash page at 0x8025800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4c Size:0x800 -&amp;gt; Flash page at 0x8026000 erased (size: 0x800EraseFlash - Page:0x4d Size:0x800 -&amp;gt; Flash page at 0x8026800 erased (size: 0x800EraseFlash - Page:0x4e Size:0x800 -&amp;gt; Flash page at 0x8027000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4f Size:0x800 -&amp;gt; Flash page at 0x8027800 erased (size: 0x800EraseFlash - Page:0x50 Size:0x800 -&amp;gt; Flash page at 0x8028000 erased (size: 0x800EraseFlash - Page:0x51 Size:0x800 -&amp;gt; Flash page at 0x8028800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x52 Size:0x800 -&amp;gt; Flash page at 0x8029000 erased (size: 0x800EraseFlash - Page:0x53 Size:0x800 -&amp;gt; Flash page at 0x8029800 erased (size: 0x800EraseFlash - Page:0x54 Size:0x800 -&amp;gt; Flash page at 0x802a000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x55 Size:0x800 -&amp;gt; Flash page at 0x802a800 erased (size: 0x800EraseFlash - Page:0x56 Size:0x800 -&amp;gt; Flash page at 0x802b000 erased (size: 0x800EraseFlash - Page:0x57 Size:0x800 -&amp;gt; Flash page at 0x802b800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x58 Size:0x800 -&amp;gt; Flash page at 0x802c000 erased (size: 0x800EraseFlash - Page:0x59 Size:0x800 -&amp;gt; Flash page at 0x802c800 erased (size: 0x800EraseFlash - Page:0x5a Size:0x800 -&amp;gt; Flash page at 0x802d000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5b Size:0x800 -&amp;gt; Flash page at 0x802d800 erased (size: 0x800EraseFlash - Page:0x5c Size:0x800 -&amp;gt; Flash page at 0x802e000 erased (size: 0x800EraseFlash - Page:0x5d Size:0x800 -&amp;gt; Flash page at 0x802e800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5e Size:0x800 -&amp;gt; Flash page at 0x802f000 erased (size: 0x800EraseFlash - Page:0x5f Size:0x800 -&amp;gt; Flash page at 0x802f800 erased (size: 0x800EraseFlash - Page:0x60 Size:0x800 -&amp;gt; Flash page at 0x8030000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x61 Size:0x800 -&amp;gt; Flash page at 0x8030800 erased (size: 0x800EraseFlash - Page:0x62 Size:0x800 -&amp;gt; Flash page at 0x8031000 erased (size: 0x800EraseFlash - Page:0x63 Size:0x800 -&amp;gt; Flash page at 0x8031800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x64 Size:0x800 -&amp;gt; Flash page at 0x8032000 erased (size: 0x800EraseFlash - Page:0x65 Size:0x800 -&amp;gt; Flash page at 0x8032800 erased (size: 0x800EraseFlash - Page:0x66 Size:0x800 -&amp;gt; Flash page at 0x8033000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x67 Size:0x800 -&amp;gt; Flash page at 0x8033800 erased (size: 0x800EraseFlash - Page:0x68 Size:0x800 -&amp;gt; Flash page at 0x8034000 erased (size: 0x800EraseFlash - Page:0x69 Size:0x800 -&amp;gt; Flash page at 0x8034800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6a Size:0x800 -&amp;gt; Flash page at 0x8035000 erased (size: 0x800EraseFlash - Page:0x6b Size:0x800 -&amp;gt; Flash page at 0x8035800 erased (size: 0x800EraseFlash - Page:0x6c Size:0x800 -&amp;gt; Flash page at 0x8036000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6d Size:0x800 -&amp;gt; Flash page at 0x8036800 erased (size: 0x800EraseFlash - Page:0x6e Size:0x800 -&amp;gt; Flash page at 0x8037000 erased (size: 0x800EraseFlash - Page:0x6f Size:0x800 -&amp;gt; Flash page at 0x8037800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x70 Size:0x800 -&amp;gt; Flash page at 0x8038000 erased (size: 0x800EraseFlash - Page:0x71 Size:0x800 -&amp;gt; Flash page at 0x8038800 erased (size: 0x800EraseFlash - Page:0x72 Size:0x800 -&amp;gt; Flash page at 0x8039000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x73 Size:0x800 -&amp;gt; Flash page at 0x8039800 erased (size: 0x800EraseFlash - Page:0x74 Size:0x800 -&amp;gt; Flash page at 0x803a000 erased (size: 0x800EraseFlash - Page:0x75 Size:0x800 -&amp;gt; Flash page at 0x803a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x76 Size:0x800 -&amp;gt; Flash page at 0x803b000 erased (size: 0x800EraseFlash - Page:0x77 Size:0x800 -&amp;gt; Flash page at 0x803b800 erased (size: 0x800EraseFlash - Page:0x78 Size:0x800 -&amp;gt; Flash page at 0x803c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x79 Size:0x800 -&amp;gt; Flash page at 0x803c800 erased (size: 0x800EraseFlash - Page:0x7a Size:0x800 -&amp;gt; Flash page at 0x803d000 erased (size: 0x800EraseFlash - Page:0x7b Size:0x800 -&amp;gt; Flash page at 0x803d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7c Size:0x800 -&amp;gt; Flash page at 0x803e000 erased (size: 0x800EraseFlash - Page:0x7d Size:0x800 -&amp;gt; Flash page at 0x803e800 erased (size: 0x800EraseFlash - Page:0x7e Size:0x800 -&amp;gt; Flash page at 0x803f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7f Size:0x800 -&amp;gt; Flash page at 0x803f800 erased (size: 0x800)&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2024-09-02T10:30:35 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2024-09-02T10:30:37 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That went well - no errors reported.  Now let's try to read that flash into a file:&lt;br /&gt;
&lt;br /&gt;
=== Reading data from the MCU ===&lt;br /&gt;
&lt;br /&gt;
To be absolutely certain, read the data back into a new file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k read random2.bin 0x8000000 0x40000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: read from address 0x08000000 size 262144&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No complaints!&lt;br /&gt;
&lt;br /&gt;
=== Compare data ===&lt;br /&gt;
&lt;br /&gt;
Finally we can verify that the data read from the MCU matches the data we wrote to the MCU:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ md5sum random*&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random2.bin&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are identical, so it is absolutely confirmed that this particular STM32L432KB is in fact a STM32L432KC which identifies as a STM32L432KB.&lt;br /&gt;
&lt;br /&gt;
== STM32F407 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@nb7:~/tmp$ st-info --probe &amp;amp;&amp;amp; dd if=/dev/urandom of=random.bin bs=1k count=1024 &amp;amp;&amp;amp; st-flash --flash=1024k write random.bin 0x8000000 &amp;amp;&amp;amp; st-flash --flash=1024k read random2.bin 0x8000000 0x100000 &amp;amp;&amp;amp; md5sum random.bin random2.bin&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J48S35&lt;br /&gt;
  serial:     066DFF495454657287165222&lt;br /&gt;
  flash:      524288 (pagesize: 16384)&lt;br /&gt;
  sram:       196608&lt;br /&gt;
  chipid:     0x413&lt;br /&gt;
  dev-type:   STM32F4x5_F4x7&lt;br /&gt;
1024+0 records in&lt;br /&gt;
1024+0 records out&lt;br /&gt;
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00555526 s, 189 MB/s&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:03 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
file random.bin md5 checksum: dcd4cae158a72174cf828026717b6d4b, stlink checksum: 0x07f88bb5&lt;br /&gt;
2026-08-05T18:17:03 INFO common_flash.c: Attempting to write 1048576 (0x100000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Sector:0x0 Size:0x4000 -&amp;gt; Flash page at 0x8000000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x1 Size:0x4000 -&amp;gt; Flash page at 0x8004000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x2 Size:0x4000 -&amp;gt; Flash page at 0x8008000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x3 Size:0x4000 -&amp;gt; Flash page at 0x800c000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x4 Size:0x10000 -&amp;gt; Flash page at 0x8010000 erased (size: 0x10000)&lt;br /&gt;
EraseFlash - Sector:0x5 Size:0x20000 -&amp;gt; Flash page at 0x8020000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x6 Size:0x20000 -&amp;gt; Flash page at 0x8040000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x7 Size:0x20000 -&amp;gt; Flash page at 0x8060000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x8 Size:0x20000 -&amp;gt; Flash page at 0x8080000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x9 Size:0x20000 -&amp;gt; Flash page at 0x80a0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xa Size:0x20000 -&amp;gt; Flash page at 0x80c0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xb Size:0x20000 -&amp;gt; Flash page at 0x80e0000 erased (size: 0x20000)&lt;br /&gt;
&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: enabling 32-bit flash writes&lt;br /&gt;
2026-08-05T18:17:36 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2026-08-05T18:17:46 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: Go to Thumb mode&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: read from address 0x08000000 size 1048576&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random.bin&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random2.bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://ipfs-pin.com/ipfs/QmcYpvigogWESmwTEFM5GYZc6st2SJRAoqwKWJ8ZDtgiXb/stm32l432kb.pdf STM32L432 Datasheet]&lt;br /&gt;
* [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html Bluepill Diagnostics Tool]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=File:Example_datasheet_STM32G474xB_STM32G474xC_STM32G474xE.png&amp;diff=8034</id>
		<title>File:Example datasheet STM32G474xB STM32G474xC STM32G474xE.png</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=File:Example_datasheet_STM32G474xB_STM32G474xC_STM32G474xE.png&amp;diff=8034"/>
		<updated>2026-08-08T00:52:16Z</updated>

		<summary type="html">&lt;p&gt;Lth: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_Secret_-_FREE_Hidden_Flash&amp;diff=8033</id>
		<title>STM32 Secret - FREE Hidden Flash</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_Secret_-_FREE_Hidden_Flash&amp;diff=8033"/>
		<updated>2026-08-06T04:14:14Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=STM32 Short Video |number=13 |title=STM32 Secret - FREE Hidden Flash |youtube-id=lMNvgP76n2E |description=In this video we will expose the HIDDEN flash partiti...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=STM32 Short Video&lt;br /&gt;
|number=13&lt;br /&gt;
|title=STM32 Secret - FREE Hidden Flash&lt;br /&gt;
|youtube-id=lMNvgP76n2E&lt;br /&gt;
|description=In this video we will expose the HIDDEN flash partition included in many STM32 Microcontrollers.  When you watch this video you will learn what to look for, how to test and most importantly how to use this flash memory.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32F40x&amp;diff=8032</id>
		<title>STM32F40x</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32F40x&amp;diff=8032"/>
		<updated>2026-08-05T10:45:47Z</updated>

		<summary type="html">&lt;p&gt;Lth: Redirected page to STM32F405xx/STM32F407xx&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[STM32F405xx/STM32F407xx]]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8031</id>
		<title>STM32 Hidden Flash</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8031"/>
		<updated>2026-08-05T10:44:40Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:STM32]][[Category:Flash]][[Category:STM32 Hardware]][[Category:STM32 Documentation]][[Category:STM32 Development]]{{metadesc|STM32 Real Flash Size}}&lt;br /&gt;
Many [[STM32]] [[MCU]]s have more flash than they claim to have.&lt;br /&gt;
&lt;br /&gt;
This has been confirmed on [[STM32F103]], [[STM32L432]] and [[STM32F40x]].&lt;br /&gt;
&lt;br /&gt;
== STM32L432 ==&lt;br /&gt;
[[File:FidoKey rev. a - top view.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
The STM32L432Kx is available with two different flash sizes.  The STM32L432KB has got 128 kB while the STM32L432KC has got 256 kB.&lt;br /&gt;
I recently created a USB &amp;quot;key&amp;quot; using the STM32L432.  The reason for using this specific [[STM32]] [[MCU]] was twofold:&lt;br /&gt;
&lt;br /&gt;
# It is small&lt;br /&gt;
# It's got a built-in 48 MHz oscillator precise enough to use USB without an external crystal&lt;br /&gt;
&lt;br /&gt;
Unfortunately, while I wanted the 256 kB version, only the 128 kB version was available.&lt;br /&gt;
&lt;br /&gt;
[[File:STM32L432 Part Numbering.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The [[STM32]] [[Blue Pill]] boards mostly use Chinese clone [[MCU]]s but there has been a lot of writing about the original ones having 128 kB of flash rather than the 64 kB specified by the datasheet.  There is even a [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html test tool] available which can test for the hidden flash.&lt;br /&gt;
&lt;br /&gt;
Inspired by this, I decided to test the STM32L432KB on my own board.  As per the datasheet this processor is supposed to have 128 kB of flash ranging from 0x8000000 to 0x801FFFF.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
[[File:Flash Size Test Setup.jpg|thumb|300px|STM32L432 Test Setup]] &lt;br /&gt;
&lt;br /&gt;
=== Checking device ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-info --probe&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J45S31&lt;br /&gt;
  serial:     066CFF3933584B3043184346&lt;br /&gt;
  flash:      131072 (pagesize: 2048)&lt;br /&gt;
  sram:       49152&lt;br /&gt;
  chipid:     0x435&lt;br /&gt;
  dev-type:   STM32L41x_L42x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the device reports 128 kB of flash - as is expected.&lt;br /&gt;
&lt;br /&gt;
=== Generating Test Data ===&lt;br /&gt;
&lt;br /&gt;
First step is to create a 256 kB file with random data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ dd if=/dev/urandom of=random.bin bs=1k count=256&lt;br /&gt;
256+0 records in&lt;br /&gt;
256+0 records out&lt;br /&gt;
262144 bytes (262 kB, 256 KiB) copied, 0.0012241 s, 214 MB/s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing data to MCU ===&lt;br /&gt;
&lt;br /&gt;
The random.bin file is of a size which should only be possible to flash on STM32L432KC.&lt;br /&gt;
&lt;br /&gt;
First step is to flash normal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:01 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:01 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
2024-09-02T10:30:01 ERROR common_flash.c: The size exceeds the size of the flash (0x00020000 bytes available)&lt;br /&gt;
stlink_fwrite_flash() == -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As expected this failed.  The [[MCU]] reports 128 kB of flash and we attempt to write 256 kB.  We can however instruct st-flash to ignore that and attempt to write the entire file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:26 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:26 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Page:0x10 Size:0x800 -&amp;gt; Flash page at 0x8008000 erased (size: 0x800EraseFlash - Page:0x11 Size:0x800 -&amp;gt; Flash page at 0x8008800 erased (size: 0x800EraseFlash - Page:0x12 Size:0x800 -&amp;gt; Flash page at 0x8009000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x13 Size:0x800 -&amp;gt; Flash page at 0x8009800 erased (size: 0x800EraseFlash - Page:0x14 Size:0x800 -&amp;gt; Flash page at 0x800a000 erased (size: 0x800EraseFlash - Page:0x15 Size:0x800 -&amp;gt; Flash page at 0x800a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x16 Size:0x800 -&amp;gt; Flash page at 0x800b000 erased (size: 0x800EraseFlash - Page:0x17 Size:0x800 -&amp;gt; Flash page at 0x800b800 erased (size: 0x800EraseFlash - Page:0x18 Size:0x800 -&amp;gt; Flash page at 0x800c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x19 Size:0x800 -&amp;gt; Flash page at 0x800c800 erased (size: 0x800EraseFlash - Page:0x1a Size:0x800 -&amp;gt; Flash page at 0x800d000 erased (size: 0x800EraseFlash - Page:0x1b Size:0x800 -&amp;gt; Flash page at 0x800d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1c Size:0x800 -&amp;gt; Flash page at 0x800e000 erased (size: 0x800EraseFlash - Page:0x1d Size:0x800 -&amp;gt; Flash page at 0x800e800 erased (size: 0x800EraseFlash - Page:0x1e Size:0x800 -&amp;gt; Flash page at 0x800f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1f Size:0x800 -&amp;gt; Flash page at 0x800f800 erased (size: 0x800EraseFlash - Page:0x20 Size:0x800 -&amp;gt; Flash page at 0x8010000 erased (size: 0x800EraseFlash - Page:0x21 Size:0x800 -&amp;gt; Flash page at 0x8010800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x22 Size:0x800 -&amp;gt; Flash page at 0x8011000 erased (size: 0x800EraseFlash - Page:0x23 Size:0x800 -&amp;gt; Flash page at 0x8011800 erased (size: 0x800EraseFlash - Page:0x24 Size:0x800 -&amp;gt; Flash page at 0x8012000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x25 Size:0x800 -&amp;gt; Flash page at 0x8012800 erased (size: 0x800EraseFlash - Page:0x26 Size:0x800 -&amp;gt; Flash page at 0x8013000 erased (size: 0x800EraseFlash - Page:0x27 Size:0x800 -&amp;gt; Flash page at 0x8013800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x28 Size:0x800 -&amp;gt; Flash page at 0x8014000 erased (size: 0x800EraseFlash - Page:0x29 Size:0x800 -&amp;gt; Flash page at 0x8014800 erased (size: 0x800EraseFlash - Page:0x2a Size:0x800 -&amp;gt; Flash page at 0x8015000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2b Size:0x800 -&amp;gt; Flash page at 0x8015800 erased (size: 0x800EraseFlash - Page:0x2c Size:0x800 -&amp;gt; Flash page at 0x8016000 erased (size: 0x800EraseFlash - Page:0x2d Size:0x800 -&amp;gt; Flash page at 0x8016800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2e Size:0x800 -&amp;gt; Flash page at 0x8017000 erased (size: 0x800EraseFlash - Page:0x2f Size:0x800 -&amp;gt; Flash page at 0x8017800 erased (size: 0x800EraseFlash - Page:0x30 Size:0x800 -&amp;gt; Flash page at 0x8018000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x31 Size:0x800 -&amp;gt; Flash page at 0x8018800 erased (size: 0x800EraseFlash - Page:0x32 Size:0x800 -&amp;gt; Flash page at 0x8019000 erased (size: 0x800EraseFlash - Page:0x33 Size:0x800 -&amp;gt; Flash page at 0x8019800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x34 Size:0x800 -&amp;gt; Flash page at 0x801a000 erased (size: 0x800EraseFlash - Page:0x35 Size:0x800 -&amp;gt; Flash page at 0x801a800 erased (size: 0x800EraseFlash - Page:0x36 Size:0x800 -&amp;gt; Flash page at 0x801b000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x37 Size:0x800 -&amp;gt; Flash page at 0x801b800 erased (size: 0x800EraseFlash - Page:0x38 Size:0x800 -&amp;gt; Flash page at 0x801c000 erased (size: 0x800EraseFlash - Page:0x39 Size:0x800 -&amp;gt; Flash page at 0x801c800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3a Size:0x800 -&amp;gt; Flash page at 0x801d000 erased (size: 0x800EraseFlash - Page:0x3b Size:0x800 -&amp;gt; Flash page at 0x801d800 erased (size: 0x800EraseFlash - Page:0x3c Size:0x800 -&amp;gt; Flash page at 0x801e000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3d Size:0x800 -&amp;gt; Flash page at 0x801e800 erased (size: 0x800EraseFlash - Page:0x3e Size:0x800 -&amp;gt; Flash page at 0x801f000 erased (size: 0x800EraseFlash - Page:0x3f Size:0x800 -&amp;gt; Flash page at 0x801f800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x40 Size:0x800 -&amp;gt; Flash page at 0x8020000 erased (size: 0x800EraseFlash - Page:0x41 Size:0x800 -&amp;gt; Flash page at 0x8020800 erased (size: 0x800EraseFlash - Page:0x42 Size:0x800 -&amp;gt; Flash page at 0x8021000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x43 Size:0x800 -&amp;gt; Flash page at 0x8021800 erased (size: 0x800EraseFlash - Page:0x44 Size:0x800 -&amp;gt; Flash page at 0x8022000 erased (size: 0x800EraseFlash - Page:0x45 Size:0x800 -&amp;gt; Flash page at 0x8022800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x46 Size:0x800 -&amp;gt; Flash page at 0x8023000 erased (size: 0x800EraseFlash - Page:0x47 Size:0x800 -&amp;gt; Flash page at 0x8023800 erased (size: 0x800EraseFlash - Page:0x48 Size:0x800 -&amp;gt; Flash page at 0x8024000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x49 Size:0x800 -&amp;gt; Flash page at 0x8024800 erased (size: 0x800EraseFlash - Page:0x4a Size:0x800 -&amp;gt; Flash page at 0x8025000 erased (size: 0x800EraseFlash - Page:0x4b Size:0x800 -&amp;gt; Flash page at 0x8025800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4c Size:0x800 -&amp;gt; Flash page at 0x8026000 erased (size: 0x800EraseFlash - Page:0x4d Size:0x800 -&amp;gt; Flash page at 0x8026800 erased (size: 0x800EraseFlash - Page:0x4e Size:0x800 -&amp;gt; Flash page at 0x8027000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4f Size:0x800 -&amp;gt; Flash page at 0x8027800 erased (size: 0x800EraseFlash - Page:0x50 Size:0x800 -&amp;gt; Flash page at 0x8028000 erased (size: 0x800EraseFlash - Page:0x51 Size:0x800 -&amp;gt; Flash page at 0x8028800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x52 Size:0x800 -&amp;gt; Flash page at 0x8029000 erased (size: 0x800EraseFlash - Page:0x53 Size:0x800 -&amp;gt; Flash page at 0x8029800 erased (size: 0x800EraseFlash - Page:0x54 Size:0x800 -&amp;gt; Flash page at 0x802a000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x55 Size:0x800 -&amp;gt; Flash page at 0x802a800 erased (size: 0x800EraseFlash - Page:0x56 Size:0x800 -&amp;gt; Flash page at 0x802b000 erased (size: 0x800EraseFlash - Page:0x57 Size:0x800 -&amp;gt; Flash page at 0x802b800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x58 Size:0x800 -&amp;gt; Flash page at 0x802c000 erased (size: 0x800EraseFlash - Page:0x59 Size:0x800 -&amp;gt; Flash page at 0x802c800 erased (size: 0x800EraseFlash - Page:0x5a Size:0x800 -&amp;gt; Flash page at 0x802d000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5b Size:0x800 -&amp;gt; Flash page at 0x802d800 erased (size: 0x800EraseFlash - Page:0x5c Size:0x800 -&amp;gt; Flash page at 0x802e000 erased (size: 0x800EraseFlash - Page:0x5d Size:0x800 -&amp;gt; Flash page at 0x802e800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5e Size:0x800 -&amp;gt; Flash page at 0x802f000 erased (size: 0x800EraseFlash - Page:0x5f Size:0x800 -&amp;gt; Flash page at 0x802f800 erased (size: 0x800EraseFlash - Page:0x60 Size:0x800 -&amp;gt; Flash page at 0x8030000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x61 Size:0x800 -&amp;gt; Flash page at 0x8030800 erased (size: 0x800EraseFlash - Page:0x62 Size:0x800 -&amp;gt; Flash page at 0x8031000 erased (size: 0x800EraseFlash - Page:0x63 Size:0x800 -&amp;gt; Flash page at 0x8031800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x64 Size:0x800 -&amp;gt; Flash page at 0x8032000 erased (size: 0x800EraseFlash - Page:0x65 Size:0x800 -&amp;gt; Flash page at 0x8032800 erased (size: 0x800EraseFlash - Page:0x66 Size:0x800 -&amp;gt; Flash page at 0x8033000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x67 Size:0x800 -&amp;gt; Flash page at 0x8033800 erased (size: 0x800EraseFlash - Page:0x68 Size:0x800 -&amp;gt; Flash page at 0x8034000 erased (size: 0x800EraseFlash - Page:0x69 Size:0x800 -&amp;gt; Flash page at 0x8034800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6a Size:0x800 -&amp;gt; Flash page at 0x8035000 erased (size: 0x800EraseFlash - Page:0x6b Size:0x800 -&amp;gt; Flash page at 0x8035800 erased (size: 0x800EraseFlash - Page:0x6c Size:0x800 -&amp;gt; Flash page at 0x8036000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6d Size:0x800 -&amp;gt; Flash page at 0x8036800 erased (size: 0x800EraseFlash - Page:0x6e Size:0x800 -&amp;gt; Flash page at 0x8037000 erased (size: 0x800EraseFlash - Page:0x6f Size:0x800 -&amp;gt; Flash page at 0x8037800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x70 Size:0x800 -&amp;gt; Flash page at 0x8038000 erased (size: 0x800EraseFlash - Page:0x71 Size:0x800 -&amp;gt; Flash page at 0x8038800 erased (size: 0x800EraseFlash - Page:0x72 Size:0x800 -&amp;gt; Flash page at 0x8039000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x73 Size:0x800 -&amp;gt; Flash page at 0x8039800 erased (size: 0x800EraseFlash - Page:0x74 Size:0x800 -&amp;gt; Flash page at 0x803a000 erased (size: 0x800EraseFlash - Page:0x75 Size:0x800 -&amp;gt; Flash page at 0x803a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x76 Size:0x800 -&amp;gt; Flash page at 0x803b000 erased (size: 0x800EraseFlash - Page:0x77 Size:0x800 -&amp;gt; Flash page at 0x803b800 erased (size: 0x800EraseFlash - Page:0x78 Size:0x800 -&amp;gt; Flash page at 0x803c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x79 Size:0x800 -&amp;gt; Flash page at 0x803c800 erased (size: 0x800EraseFlash - Page:0x7a Size:0x800 -&amp;gt; Flash page at 0x803d000 erased (size: 0x800EraseFlash - Page:0x7b Size:0x800 -&amp;gt; Flash page at 0x803d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7c Size:0x800 -&amp;gt; Flash page at 0x803e000 erased (size: 0x800EraseFlash - Page:0x7d Size:0x800 -&amp;gt; Flash page at 0x803e800 erased (size: 0x800EraseFlash - Page:0x7e Size:0x800 -&amp;gt; Flash page at 0x803f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7f Size:0x800 -&amp;gt; Flash page at 0x803f800 erased (size: 0x800)&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2024-09-02T10:30:35 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2024-09-02T10:30:37 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That went well - no errors reported.  Now let's try to read that flash into a file:&lt;br /&gt;
&lt;br /&gt;
=== Reading data from the MCU ===&lt;br /&gt;
&lt;br /&gt;
To be absolutely certain, read the data back into a new file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k read random2.bin 0x8000000 0x40000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: read from address 0x08000000 size 262144&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No complaints!&lt;br /&gt;
&lt;br /&gt;
=== Compare data ===&lt;br /&gt;
&lt;br /&gt;
Finally we can verify that the data read from the MCU matches the data we wrote to the MCU:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ md5sum random*&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random2.bin&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are identical, so it is absolutely confirmed that this particular STM32L432KB is in fact a STM32L432KC which identifies as a STM32L432KB.&lt;br /&gt;
&lt;br /&gt;
== STM32F407 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@nb7:~/tmp$ st-info --probe &amp;amp;&amp;amp; dd if=/dev/urandom of=random.bin bs=1k count=1024 &amp;amp;&amp;amp; st-flash --flash=1024k write random.bin 0x8000000 &amp;amp;&amp;amp; st-flash --flash=1024k read random2.bin 0x8000000 0x100000 &amp;amp;&amp;amp; md5sum random.bin random2.bin&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J48S35&lt;br /&gt;
  serial:     066DFF495454657287165222&lt;br /&gt;
  flash:      524288 (pagesize: 16384)&lt;br /&gt;
  sram:       196608&lt;br /&gt;
  chipid:     0x413&lt;br /&gt;
  dev-type:   STM32F4x5_F4x7&lt;br /&gt;
1024+0 records in&lt;br /&gt;
1024+0 records out&lt;br /&gt;
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00555526 s, 189 MB/s&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:03 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
file random.bin md5 checksum: dcd4cae158a72174cf828026717b6d4b, stlink checksum: 0x07f88bb5&lt;br /&gt;
2026-08-05T18:17:03 INFO common_flash.c: Attempting to write 1048576 (0x100000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Sector:0x0 Size:0x4000 -&amp;gt; Flash page at 0x8000000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x1 Size:0x4000 -&amp;gt; Flash page at 0x8004000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x2 Size:0x4000 -&amp;gt; Flash page at 0x8008000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x3 Size:0x4000 -&amp;gt; Flash page at 0x800c000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x4 Size:0x10000 -&amp;gt; Flash page at 0x8010000 erased (size: 0x10000)&lt;br /&gt;
EraseFlash - Sector:0x5 Size:0x20000 -&amp;gt; Flash page at 0x8020000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x6 Size:0x20000 -&amp;gt; Flash page at 0x8040000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x7 Size:0x20000 -&amp;gt; Flash page at 0x8060000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x8 Size:0x20000 -&amp;gt; Flash page at 0x8080000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x9 Size:0x20000 -&amp;gt; Flash page at 0x80a0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xa Size:0x20000 -&amp;gt; Flash page at 0x80c0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xb Size:0x20000 -&amp;gt; Flash page at 0x80e0000 erased (size: 0x20000)&lt;br /&gt;
&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: enabling 32-bit flash writes&lt;br /&gt;
2026-08-05T18:17:36 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2026-08-05T18:17:46 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: Go to Thumb mode&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: read from address 0x08000000 size 1048576&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random.bin&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random2.bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://ipfs-pin.com/ipfs/QmcYpvigogWESmwTEFM5GYZc6st2SJRAoqwKWJ8ZDtgiXb/stm32l432kb.pdf STM32L432 Datasheet]&lt;br /&gt;
* [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html Bluepill Diagnostics Tool]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8030</id>
		<title>STM32 Hidden Flash</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8030"/>
		<updated>2026-08-05T10:30:59Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:STM32]][[Category:Flash]][[Category:STM32 Hardware]][[Category:STM32 Documentation]][[Category:STM32 Development]]{{metadesc|STM32L432Kx Flash Size}}&lt;br /&gt;
== STM32L432 ==&lt;br /&gt;
[[File:FidoKey rev. a - top view.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
The STM32L432Kx is available with two different flash sizes.  The STM32L432KB has got 128 kB while the STM32L432KC has got 256 kB.&lt;br /&gt;
I recently created a USB &amp;quot;key&amp;quot; using the STM32L432.  The reason for using this specific [[STM32]] [[MCU]] was twofold:&lt;br /&gt;
&lt;br /&gt;
# It is small&lt;br /&gt;
# It's got a built-in 48 MHz oscillator precise enough to use USB without an external crystal&lt;br /&gt;
&lt;br /&gt;
Unfortunately, while I wanted the 256 kB version, only the 128 kB version was available.&lt;br /&gt;
&lt;br /&gt;
[[File:STM32L432 Part Numbering.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The [[STM32]] [[Blue Pill]] boards mostly use Chinese clone [[MCU]]s but there has been a lot of writing about the original ones having 128 kB of flash rather than the 64 kB specified by the datasheet.  There is even a [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html test tool] available which can test for the hidden flash.&lt;br /&gt;
&lt;br /&gt;
Inspired by this, I decided to test the STM32L432KB on my own board.  As per the datasheet this processor is supposed to have 128 kB of flash ranging from 0x8000000 to 0x801FFFF.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
[[File:Flash Size Test Setup.jpg|thumb|300px|STM32L432 Test Setup]] &lt;br /&gt;
&lt;br /&gt;
=== Checking device ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-info --probe&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J45S31&lt;br /&gt;
  serial:     066CFF3933584B3043184346&lt;br /&gt;
  flash:      131072 (pagesize: 2048)&lt;br /&gt;
  sram:       49152&lt;br /&gt;
  chipid:     0x435&lt;br /&gt;
  dev-type:   STM32L41x_L42x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the device reports 128 kB of flash - as is expected.&lt;br /&gt;
&lt;br /&gt;
=== Generating Test Data ===&lt;br /&gt;
&lt;br /&gt;
First step is to create a 256 kB file with random data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ dd if=/dev/urandom of=random.bin bs=1k count=256&lt;br /&gt;
256+0 records in&lt;br /&gt;
256+0 records out&lt;br /&gt;
262144 bytes (262 kB, 256 KiB) copied, 0.0012241 s, 214 MB/s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing data to MCU ===&lt;br /&gt;
&lt;br /&gt;
The random.bin file is of a size which should only be possible to flash on STM32L432KC.&lt;br /&gt;
&lt;br /&gt;
First step is to flash normal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:01 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:01 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
2024-09-02T10:30:01 ERROR common_flash.c: The size exceeds the size of the flash (0x00020000 bytes available)&lt;br /&gt;
stlink_fwrite_flash() == -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As expected this failed.  The [[MCU]] reports 128 kB of flash and we attempt to write 256 kB.  We can however instruct st-flash to ignore that and attempt to write the entire file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:26 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:26 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Page:0x10 Size:0x800 -&amp;gt; Flash page at 0x8008000 erased (size: 0x800EraseFlash - Page:0x11 Size:0x800 -&amp;gt; Flash page at 0x8008800 erased (size: 0x800EraseFlash - Page:0x12 Size:0x800 -&amp;gt; Flash page at 0x8009000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x13 Size:0x800 -&amp;gt; Flash page at 0x8009800 erased (size: 0x800EraseFlash - Page:0x14 Size:0x800 -&amp;gt; Flash page at 0x800a000 erased (size: 0x800EraseFlash - Page:0x15 Size:0x800 -&amp;gt; Flash page at 0x800a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x16 Size:0x800 -&amp;gt; Flash page at 0x800b000 erased (size: 0x800EraseFlash - Page:0x17 Size:0x800 -&amp;gt; Flash page at 0x800b800 erased (size: 0x800EraseFlash - Page:0x18 Size:0x800 -&amp;gt; Flash page at 0x800c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x19 Size:0x800 -&amp;gt; Flash page at 0x800c800 erased (size: 0x800EraseFlash - Page:0x1a Size:0x800 -&amp;gt; Flash page at 0x800d000 erased (size: 0x800EraseFlash - Page:0x1b Size:0x800 -&amp;gt; Flash page at 0x800d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1c Size:0x800 -&amp;gt; Flash page at 0x800e000 erased (size: 0x800EraseFlash - Page:0x1d Size:0x800 -&amp;gt; Flash page at 0x800e800 erased (size: 0x800EraseFlash - Page:0x1e Size:0x800 -&amp;gt; Flash page at 0x800f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1f Size:0x800 -&amp;gt; Flash page at 0x800f800 erased (size: 0x800EraseFlash - Page:0x20 Size:0x800 -&amp;gt; Flash page at 0x8010000 erased (size: 0x800EraseFlash - Page:0x21 Size:0x800 -&amp;gt; Flash page at 0x8010800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x22 Size:0x800 -&amp;gt; Flash page at 0x8011000 erased (size: 0x800EraseFlash - Page:0x23 Size:0x800 -&amp;gt; Flash page at 0x8011800 erased (size: 0x800EraseFlash - Page:0x24 Size:0x800 -&amp;gt; Flash page at 0x8012000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x25 Size:0x800 -&amp;gt; Flash page at 0x8012800 erased (size: 0x800EraseFlash - Page:0x26 Size:0x800 -&amp;gt; Flash page at 0x8013000 erased (size: 0x800EraseFlash - Page:0x27 Size:0x800 -&amp;gt; Flash page at 0x8013800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x28 Size:0x800 -&amp;gt; Flash page at 0x8014000 erased (size: 0x800EraseFlash - Page:0x29 Size:0x800 -&amp;gt; Flash page at 0x8014800 erased (size: 0x800EraseFlash - Page:0x2a Size:0x800 -&amp;gt; Flash page at 0x8015000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2b Size:0x800 -&amp;gt; Flash page at 0x8015800 erased (size: 0x800EraseFlash - Page:0x2c Size:0x800 -&amp;gt; Flash page at 0x8016000 erased (size: 0x800EraseFlash - Page:0x2d Size:0x800 -&amp;gt; Flash page at 0x8016800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2e Size:0x800 -&amp;gt; Flash page at 0x8017000 erased (size: 0x800EraseFlash - Page:0x2f Size:0x800 -&amp;gt; Flash page at 0x8017800 erased (size: 0x800EraseFlash - Page:0x30 Size:0x800 -&amp;gt; Flash page at 0x8018000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x31 Size:0x800 -&amp;gt; Flash page at 0x8018800 erased (size: 0x800EraseFlash - Page:0x32 Size:0x800 -&amp;gt; Flash page at 0x8019000 erased (size: 0x800EraseFlash - Page:0x33 Size:0x800 -&amp;gt; Flash page at 0x8019800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x34 Size:0x800 -&amp;gt; Flash page at 0x801a000 erased (size: 0x800EraseFlash - Page:0x35 Size:0x800 -&amp;gt; Flash page at 0x801a800 erased (size: 0x800EraseFlash - Page:0x36 Size:0x800 -&amp;gt; Flash page at 0x801b000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x37 Size:0x800 -&amp;gt; Flash page at 0x801b800 erased (size: 0x800EraseFlash - Page:0x38 Size:0x800 -&amp;gt; Flash page at 0x801c000 erased (size: 0x800EraseFlash - Page:0x39 Size:0x800 -&amp;gt; Flash page at 0x801c800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3a Size:0x800 -&amp;gt; Flash page at 0x801d000 erased (size: 0x800EraseFlash - Page:0x3b Size:0x800 -&amp;gt; Flash page at 0x801d800 erased (size: 0x800EraseFlash - Page:0x3c Size:0x800 -&amp;gt; Flash page at 0x801e000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3d Size:0x800 -&amp;gt; Flash page at 0x801e800 erased (size: 0x800EraseFlash - Page:0x3e Size:0x800 -&amp;gt; Flash page at 0x801f000 erased (size: 0x800EraseFlash - Page:0x3f Size:0x800 -&amp;gt; Flash page at 0x801f800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x40 Size:0x800 -&amp;gt; Flash page at 0x8020000 erased (size: 0x800EraseFlash - Page:0x41 Size:0x800 -&amp;gt; Flash page at 0x8020800 erased (size: 0x800EraseFlash - Page:0x42 Size:0x800 -&amp;gt; Flash page at 0x8021000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x43 Size:0x800 -&amp;gt; Flash page at 0x8021800 erased (size: 0x800EraseFlash - Page:0x44 Size:0x800 -&amp;gt; Flash page at 0x8022000 erased (size: 0x800EraseFlash - Page:0x45 Size:0x800 -&amp;gt; Flash page at 0x8022800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x46 Size:0x800 -&amp;gt; Flash page at 0x8023000 erased (size: 0x800EraseFlash - Page:0x47 Size:0x800 -&amp;gt; Flash page at 0x8023800 erased (size: 0x800EraseFlash - Page:0x48 Size:0x800 -&amp;gt; Flash page at 0x8024000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x49 Size:0x800 -&amp;gt; Flash page at 0x8024800 erased (size: 0x800EraseFlash - Page:0x4a Size:0x800 -&amp;gt; Flash page at 0x8025000 erased (size: 0x800EraseFlash - Page:0x4b Size:0x800 -&amp;gt; Flash page at 0x8025800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4c Size:0x800 -&amp;gt; Flash page at 0x8026000 erased (size: 0x800EraseFlash - Page:0x4d Size:0x800 -&amp;gt; Flash page at 0x8026800 erased (size: 0x800EraseFlash - Page:0x4e Size:0x800 -&amp;gt; Flash page at 0x8027000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4f Size:0x800 -&amp;gt; Flash page at 0x8027800 erased (size: 0x800EraseFlash - Page:0x50 Size:0x800 -&amp;gt; Flash page at 0x8028000 erased (size: 0x800EraseFlash - Page:0x51 Size:0x800 -&amp;gt; Flash page at 0x8028800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x52 Size:0x800 -&amp;gt; Flash page at 0x8029000 erased (size: 0x800EraseFlash - Page:0x53 Size:0x800 -&amp;gt; Flash page at 0x8029800 erased (size: 0x800EraseFlash - Page:0x54 Size:0x800 -&amp;gt; Flash page at 0x802a000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x55 Size:0x800 -&amp;gt; Flash page at 0x802a800 erased (size: 0x800EraseFlash - Page:0x56 Size:0x800 -&amp;gt; Flash page at 0x802b000 erased (size: 0x800EraseFlash - Page:0x57 Size:0x800 -&amp;gt; Flash page at 0x802b800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x58 Size:0x800 -&amp;gt; Flash page at 0x802c000 erased (size: 0x800EraseFlash - Page:0x59 Size:0x800 -&amp;gt; Flash page at 0x802c800 erased (size: 0x800EraseFlash - Page:0x5a Size:0x800 -&amp;gt; Flash page at 0x802d000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5b Size:0x800 -&amp;gt; Flash page at 0x802d800 erased (size: 0x800EraseFlash - Page:0x5c Size:0x800 -&amp;gt; Flash page at 0x802e000 erased (size: 0x800EraseFlash - Page:0x5d Size:0x800 -&amp;gt; Flash page at 0x802e800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5e Size:0x800 -&amp;gt; Flash page at 0x802f000 erased (size: 0x800EraseFlash - Page:0x5f Size:0x800 -&amp;gt; Flash page at 0x802f800 erased (size: 0x800EraseFlash - Page:0x60 Size:0x800 -&amp;gt; Flash page at 0x8030000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x61 Size:0x800 -&amp;gt; Flash page at 0x8030800 erased (size: 0x800EraseFlash - Page:0x62 Size:0x800 -&amp;gt; Flash page at 0x8031000 erased (size: 0x800EraseFlash - Page:0x63 Size:0x800 -&amp;gt; Flash page at 0x8031800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x64 Size:0x800 -&amp;gt; Flash page at 0x8032000 erased (size: 0x800EraseFlash - Page:0x65 Size:0x800 -&amp;gt; Flash page at 0x8032800 erased (size: 0x800EraseFlash - Page:0x66 Size:0x800 -&amp;gt; Flash page at 0x8033000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x67 Size:0x800 -&amp;gt; Flash page at 0x8033800 erased (size: 0x800EraseFlash - Page:0x68 Size:0x800 -&amp;gt; Flash page at 0x8034000 erased (size: 0x800EraseFlash - Page:0x69 Size:0x800 -&amp;gt; Flash page at 0x8034800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6a Size:0x800 -&amp;gt; Flash page at 0x8035000 erased (size: 0x800EraseFlash - Page:0x6b Size:0x800 -&amp;gt; Flash page at 0x8035800 erased (size: 0x800EraseFlash - Page:0x6c Size:0x800 -&amp;gt; Flash page at 0x8036000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6d Size:0x800 -&amp;gt; Flash page at 0x8036800 erased (size: 0x800EraseFlash - Page:0x6e Size:0x800 -&amp;gt; Flash page at 0x8037000 erased (size: 0x800EraseFlash - Page:0x6f Size:0x800 -&amp;gt; Flash page at 0x8037800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x70 Size:0x800 -&amp;gt; Flash page at 0x8038000 erased (size: 0x800EraseFlash - Page:0x71 Size:0x800 -&amp;gt; Flash page at 0x8038800 erased (size: 0x800EraseFlash - Page:0x72 Size:0x800 -&amp;gt; Flash page at 0x8039000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x73 Size:0x800 -&amp;gt; Flash page at 0x8039800 erased (size: 0x800EraseFlash - Page:0x74 Size:0x800 -&amp;gt; Flash page at 0x803a000 erased (size: 0x800EraseFlash - Page:0x75 Size:0x800 -&amp;gt; Flash page at 0x803a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x76 Size:0x800 -&amp;gt; Flash page at 0x803b000 erased (size: 0x800EraseFlash - Page:0x77 Size:0x800 -&amp;gt; Flash page at 0x803b800 erased (size: 0x800EraseFlash - Page:0x78 Size:0x800 -&amp;gt; Flash page at 0x803c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x79 Size:0x800 -&amp;gt; Flash page at 0x803c800 erased (size: 0x800EraseFlash - Page:0x7a Size:0x800 -&amp;gt; Flash page at 0x803d000 erased (size: 0x800EraseFlash - Page:0x7b Size:0x800 -&amp;gt; Flash page at 0x803d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7c Size:0x800 -&amp;gt; Flash page at 0x803e000 erased (size: 0x800EraseFlash - Page:0x7d Size:0x800 -&amp;gt; Flash page at 0x803e800 erased (size: 0x800EraseFlash - Page:0x7e Size:0x800 -&amp;gt; Flash page at 0x803f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7f Size:0x800 -&amp;gt; Flash page at 0x803f800 erased (size: 0x800)&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2024-09-02T10:30:35 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2024-09-02T10:30:37 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That went well - no errors reported.  Now let's try to read that flash into a file:&lt;br /&gt;
&lt;br /&gt;
=== Reading data from the MCU ===&lt;br /&gt;
&lt;br /&gt;
To be absolutely certain, read the data back into a new file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k read random2.bin 0x8000000 0x40000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: read from address 0x08000000 size 262144&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No complaints!&lt;br /&gt;
&lt;br /&gt;
=== Compare data ===&lt;br /&gt;
&lt;br /&gt;
Finally we can verify that the data read from the MCU matches the data we wrote to the MCU:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ md5sum random*&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random2.bin&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are identical, so it is absolutely confirmed that this particular STM32L432KB is in fact a STM32L432KC which identifies as a STM32L432KB.&lt;br /&gt;
&lt;br /&gt;
== STM32F407 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@nb7:~/tmp$ st-info --probe &amp;amp;&amp;amp; dd if=/dev/urandom of=random.bin bs=1k count=1024 &amp;amp;&amp;amp; st-flash --flash=1024k write random.bin 0x8000000 &amp;amp;&amp;amp; st-flash --flash=1024k read random2.bin 0x8000000 0x100000 &amp;amp;&amp;amp; md5sum random.bin random2.bin&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J48S35&lt;br /&gt;
  serial:     066DFF495454657287165222&lt;br /&gt;
  flash:      524288 (pagesize: 16384)&lt;br /&gt;
  sram:       196608&lt;br /&gt;
  chipid:     0x413&lt;br /&gt;
  dev-type:   STM32F4x5_F4x7&lt;br /&gt;
1024+0 records in&lt;br /&gt;
1024+0 records out&lt;br /&gt;
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00555526 s, 189 MB/s&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:03 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
file random.bin md5 checksum: dcd4cae158a72174cf828026717b6d4b, stlink checksum: 0x07f88bb5&lt;br /&gt;
2026-08-05T18:17:03 INFO common_flash.c: Attempting to write 1048576 (0x100000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Sector:0x0 Size:0x4000 -&amp;gt; Flash page at 0x8000000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x1 Size:0x4000 -&amp;gt; Flash page at 0x8004000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x2 Size:0x4000 -&amp;gt; Flash page at 0x8008000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x3 Size:0x4000 -&amp;gt; Flash page at 0x800c000 erased (size: 0x4000)&lt;br /&gt;
EraseFlash - Sector:0x4 Size:0x10000 -&amp;gt; Flash page at 0x8010000 erased (size: 0x10000)&lt;br /&gt;
EraseFlash - Sector:0x5 Size:0x20000 -&amp;gt; Flash page at 0x8020000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x6 Size:0x20000 -&amp;gt; Flash page at 0x8040000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x7 Size:0x20000 -&amp;gt; Flash page at 0x8060000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x8 Size:0x20000 -&amp;gt; Flash page at 0x8080000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0x9 Size:0x20000 -&amp;gt; Flash page at 0x80a0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xa Size:0x20000 -&amp;gt; Flash page at 0x80c0000 erased (size: 0x20000)&lt;br /&gt;
EraseFlash - Sector:0xb Size:0x20000 -&amp;gt; Flash page at 0x80e0000 erased (size: 0x20000)&lt;br /&gt;
&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2026-08-05T18:17:21 INFO flash_loader.c: enabling 32-bit flash writes&lt;br /&gt;
2026-08-05T18:17:36 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2026-08-05T18:17:46 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: Go to Thumb mode&lt;br /&gt;
st-flash 1.8.0-121-g8c34a4e&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: STM32F4x5_F4x7: 192 KiB SRAM, 512 KiB flash in at least 16 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00100000&lt;br /&gt;
2026-08-05T18:17:46 INFO common_legacy.c: read from address 0x08000000 size 1048576&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random.bin&lt;br /&gt;
dcd4cae158a72174cf828026717b6d4b  random2.bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://ipfs-pin.com/ipfs/QmcYpvigogWESmwTEFM5GYZc6st2SJRAoqwKWJ8ZDtgiXb/stm32l432kb.pdf STM32L432 Datasheet]&lt;br /&gt;
* [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html Bluepill Diagnostics Tool]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32L432Kx_Flash_Size&amp;diff=8029</id>
		<title>STM32L432Kx Flash Size</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32L432Kx_Flash_Size&amp;diff=8029"/>
		<updated>2026-08-05T10:29:01Z</updated>

		<summary type="html">&lt;p&gt;Lth: Lth moved page STM32L432Kx Flash Size to STM32 Hidden Flash&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[STM32 Hidden Flash]]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8028</id>
		<title>STM32 Hidden Flash</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32_Hidden_Flash&amp;diff=8028"/>
		<updated>2026-08-05T10:29:01Z</updated>

		<summary type="html">&lt;p&gt;Lth: Lth moved page STM32L432Kx Flash Size to STM32 Hidden Flash&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:STM32]][[Category:Flash]][[Category:STM32 Hardware]][[Category:STM32 Documentation]][[Category:STM32 Development]]{{metadesc|STM32L432Kx Flash Size}}[[File:FidoKey rev. a - top view.jpg|thumb]]&lt;br /&gt;
The STM32L432Kx is available with two different flash sizes.  The STM32L432KB has got 128 kB while the STM32L432KC has got 256 kB.&lt;br /&gt;
I recently created a USB &amp;quot;key&amp;quot; using the STM32L432.  The reason for using this specific [[STM32]] [[MCU]] was twofold:&lt;br /&gt;
&lt;br /&gt;
# It is small&lt;br /&gt;
# It's got a built-in 48 MHz oscillator precise enough to use USB without an external crystal&lt;br /&gt;
&lt;br /&gt;
Unfortunately, while I wanted the 256 kB version, only the 128 kB version was available.&lt;br /&gt;
&lt;br /&gt;
[[File:STM32L432 Part Numbering.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The [[STM32]] [[Blue Pill]] boards mostly use Chinese clone [[MCU]]s but there has been a lot of writing about the original ones having 128 kB of flash rather than the 64 kB specified by the datasheet.  There is even a [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html test tool] available which can test for the hidden flash.&lt;br /&gt;
&lt;br /&gt;
Inspired by this, I decided to test the STM32L432KB on my own board.  As per the datasheet this processor is supposed to have 128 kB of flash ranging from 0x8000000 to 0x801FFFF.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
[[File:Flash Size Test Setup.jpg|thumb|300px|STM32L432 Test Setup]] &lt;br /&gt;
&lt;br /&gt;
=== Checking device ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-info --probe&lt;br /&gt;
Found 1 stlink programmers&lt;br /&gt;
  version:    V2J45S31&lt;br /&gt;
  serial:     066CFF3933584B3043184346&lt;br /&gt;
  flash:      131072 (pagesize: 2048)&lt;br /&gt;
  sram:       49152&lt;br /&gt;
  chipid:     0x435&lt;br /&gt;
  dev-type:   STM32L41x_L42x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the device reports 128 kB of flash - as is expected.&lt;br /&gt;
&lt;br /&gt;
=== Generating Test Data ===&lt;br /&gt;
&lt;br /&gt;
First step is to create a 256 kB file with random data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ dd if=/dev/urandom of=random.bin bs=1k count=256&lt;br /&gt;
256+0 records in&lt;br /&gt;
256+0 records out&lt;br /&gt;
262144 bytes (262 kB, 256 KiB) copied, 0.0012241 s, 214 MB/s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing data to MCU ===&lt;br /&gt;
&lt;br /&gt;
The random.bin file is of a size which should only be possible to flash on STM32L432KC.&lt;br /&gt;
&lt;br /&gt;
First step is to flash normal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:01 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:01 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
2024-09-02T10:30:01 ERROR common_flash.c: The size exceeds the size of the flash (0x00020000 bytes available)&lt;br /&gt;
stlink_fwrite_flash() == -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As expected this failed.  The [[MCU]] reports 128 kB of flash and we attempt to write 256 kB.  We can however instruct st-flash to ignore that and attempt to write the entire file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k write random.bin 0x8000000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:30:26 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
file random.bin md5 checksum: 5f7ebd5c822e7408e6279445eb1444a, stlink checksum: 0x01fe53dd&lt;br /&gt;
2024-09-02T10:30:26 INFO common_flash.c: Attempting to write 262144 (0x40000) bytes to stm32 address: 134217728 (0x8000000)&lt;br /&gt;
EraseFlash - Page:0x10 Size:0x800 -&amp;gt; Flash page at 0x8008000 erased (size: 0x800EraseFlash - Page:0x11 Size:0x800 -&amp;gt; Flash page at 0x8008800 erased (size: 0x800EraseFlash - Page:0x12 Size:0x800 -&amp;gt; Flash page at 0x8009000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x13 Size:0x800 -&amp;gt; Flash page at 0x8009800 erased (size: 0x800EraseFlash - Page:0x14 Size:0x800 -&amp;gt; Flash page at 0x800a000 erased (size: 0x800EraseFlash - Page:0x15 Size:0x800 -&amp;gt; Flash page at 0x800a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x16 Size:0x800 -&amp;gt; Flash page at 0x800b000 erased (size: 0x800EraseFlash - Page:0x17 Size:0x800 -&amp;gt; Flash page at 0x800b800 erased (size: 0x800EraseFlash - Page:0x18 Size:0x800 -&amp;gt; Flash page at 0x800c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x19 Size:0x800 -&amp;gt; Flash page at 0x800c800 erased (size: 0x800EraseFlash - Page:0x1a Size:0x800 -&amp;gt; Flash page at 0x800d000 erased (size: 0x800EraseFlash - Page:0x1b Size:0x800 -&amp;gt; Flash page at 0x800d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1c Size:0x800 -&amp;gt; Flash page at 0x800e000 erased (size: 0x800EraseFlash - Page:0x1d Size:0x800 -&amp;gt; Flash page at 0x800e800 erased (size: 0x800EraseFlash - Page:0x1e Size:0x800 -&amp;gt; Flash page at 0x800f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x1f Size:0x800 -&amp;gt; Flash page at 0x800f800 erased (size: 0x800EraseFlash - Page:0x20 Size:0x800 -&amp;gt; Flash page at 0x8010000 erased (size: 0x800EraseFlash - Page:0x21 Size:0x800 -&amp;gt; Flash page at 0x8010800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x22 Size:0x800 -&amp;gt; Flash page at 0x8011000 erased (size: 0x800EraseFlash - Page:0x23 Size:0x800 -&amp;gt; Flash page at 0x8011800 erased (size: 0x800EraseFlash - Page:0x24 Size:0x800 -&amp;gt; Flash page at 0x8012000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x25 Size:0x800 -&amp;gt; Flash page at 0x8012800 erased (size: 0x800EraseFlash - Page:0x26 Size:0x800 -&amp;gt; Flash page at 0x8013000 erased (size: 0x800EraseFlash - Page:0x27 Size:0x800 -&amp;gt; Flash page at 0x8013800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x28 Size:0x800 -&amp;gt; Flash page at 0x8014000 erased (size: 0x800EraseFlash - Page:0x29 Size:0x800 -&amp;gt; Flash page at 0x8014800 erased (size: 0x800EraseFlash - Page:0x2a Size:0x800 -&amp;gt; Flash page at 0x8015000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2b Size:0x800 -&amp;gt; Flash page at 0x8015800 erased (size: 0x800EraseFlash - Page:0x2c Size:0x800 -&amp;gt; Flash page at 0x8016000 erased (size: 0x800EraseFlash - Page:0x2d Size:0x800 -&amp;gt; Flash page at 0x8016800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x2e Size:0x800 -&amp;gt; Flash page at 0x8017000 erased (size: 0x800EraseFlash - Page:0x2f Size:0x800 -&amp;gt; Flash page at 0x8017800 erased (size: 0x800EraseFlash - Page:0x30 Size:0x800 -&amp;gt; Flash page at 0x8018000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x31 Size:0x800 -&amp;gt; Flash page at 0x8018800 erased (size: 0x800EraseFlash - Page:0x32 Size:0x800 -&amp;gt; Flash page at 0x8019000 erased (size: 0x800EraseFlash - Page:0x33 Size:0x800 -&amp;gt; Flash page at 0x8019800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x34 Size:0x800 -&amp;gt; Flash page at 0x801a000 erased (size: 0x800EraseFlash - Page:0x35 Size:0x800 -&amp;gt; Flash page at 0x801a800 erased (size: 0x800EraseFlash - Page:0x36 Size:0x800 -&amp;gt; Flash page at 0x801b000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x37 Size:0x800 -&amp;gt; Flash page at 0x801b800 erased (size: 0x800EraseFlash - Page:0x38 Size:0x800 -&amp;gt; Flash page at 0x801c000 erased (size: 0x800EraseFlash - Page:0x39 Size:0x800 -&amp;gt; Flash page at 0x801c800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3a Size:0x800 -&amp;gt; Flash page at 0x801d000 erased (size: 0x800EraseFlash - Page:0x3b Size:0x800 -&amp;gt; Flash page at 0x801d800 erased (size: 0x800EraseFlash - Page:0x3c Size:0x800 -&amp;gt; Flash page at 0x801e000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x3d Size:0x800 -&amp;gt; Flash page at 0x801e800 erased (size: 0x800EraseFlash - Page:0x3e Size:0x800 -&amp;gt; Flash page at 0x801f000 erased (size: 0x800EraseFlash - Page:0x3f Size:0x800 -&amp;gt; Flash page at 0x801f800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x40 Size:0x800 -&amp;gt; Flash page at 0x8020000 erased (size: 0x800EraseFlash - Page:0x41 Size:0x800 -&amp;gt; Flash page at 0x8020800 erased (size: 0x800EraseFlash - Page:0x42 Size:0x800 -&amp;gt; Flash page at 0x8021000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x43 Size:0x800 -&amp;gt; Flash page at 0x8021800 erased (size: 0x800EraseFlash - Page:0x44 Size:0x800 -&amp;gt; Flash page at 0x8022000 erased (size: 0x800EraseFlash - Page:0x45 Size:0x800 -&amp;gt; Flash page at 0x8022800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x46 Size:0x800 -&amp;gt; Flash page at 0x8023000 erased (size: 0x800EraseFlash - Page:0x47 Size:0x800 -&amp;gt; Flash page at 0x8023800 erased (size: 0x800EraseFlash - Page:0x48 Size:0x800 -&amp;gt; Flash page at 0x8024000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x49 Size:0x800 -&amp;gt; Flash page at 0x8024800 erased (size: 0x800EraseFlash - Page:0x4a Size:0x800 -&amp;gt; Flash page at 0x8025000 erased (size: 0x800EraseFlash - Page:0x4b Size:0x800 -&amp;gt; Flash page at 0x8025800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4c Size:0x800 -&amp;gt; Flash page at 0x8026000 erased (size: 0x800EraseFlash - Page:0x4d Size:0x800 -&amp;gt; Flash page at 0x8026800 erased (size: 0x800EraseFlash - Page:0x4e Size:0x800 -&amp;gt; Flash page at 0x8027000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x4f Size:0x800 -&amp;gt; Flash page at 0x8027800 erased (size: 0x800EraseFlash - Page:0x50 Size:0x800 -&amp;gt; Flash page at 0x8028000 erased (size: 0x800EraseFlash - Page:0x51 Size:0x800 -&amp;gt; Flash page at 0x8028800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x52 Size:0x800 -&amp;gt; Flash page at 0x8029000 erased (size: 0x800EraseFlash - Page:0x53 Size:0x800 -&amp;gt; Flash page at 0x8029800 erased (size: 0x800EraseFlash - Page:0x54 Size:0x800 -&amp;gt; Flash page at 0x802a000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x55 Size:0x800 -&amp;gt; Flash page at 0x802a800 erased (size: 0x800EraseFlash - Page:0x56 Size:0x800 -&amp;gt; Flash page at 0x802b000 erased (size: 0x800EraseFlash - Page:0x57 Size:0x800 -&amp;gt; Flash page at 0x802b800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x58 Size:0x800 -&amp;gt; Flash page at 0x802c000 erased (size: 0x800EraseFlash - Page:0x59 Size:0x800 -&amp;gt; Flash page at 0x802c800 erased (size: 0x800EraseFlash - Page:0x5a Size:0x800 -&amp;gt; Flash page at 0x802d000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5b Size:0x800 -&amp;gt; Flash page at 0x802d800 erased (size: 0x800EraseFlash - Page:0x5c Size:0x800 -&amp;gt; Flash page at 0x802e000 erased (size: 0x800EraseFlash - Page:0x5d Size:0x800 -&amp;gt; Flash page at 0x802e800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x5e Size:0x800 -&amp;gt; Flash page at 0x802f000 erased (size: 0x800EraseFlash - Page:0x5f Size:0x800 -&amp;gt; Flash page at 0x802f800 erased (size: 0x800EraseFlash - Page:0x60 Size:0x800 -&amp;gt; Flash page at 0x8030000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x61 Size:0x800 -&amp;gt; Flash page at 0x8030800 erased (size: 0x800EraseFlash - Page:0x62 Size:0x800 -&amp;gt; Flash page at 0x8031000 erased (size: 0x800EraseFlash - Page:0x63 Size:0x800 -&amp;gt; Flash page at 0x8031800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x64 Size:0x800 -&amp;gt; Flash page at 0x8032000 erased (size: 0x800EraseFlash - Page:0x65 Size:0x800 -&amp;gt; Flash page at 0x8032800 erased (size: 0x800EraseFlash - Page:0x66 Size:0x800 -&amp;gt; Flash page at 0x8033000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x67 Size:0x800 -&amp;gt; Flash page at 0x8033800 erased (size: 0x800EraseFlash - Page:0x68 Size:0x800 -&amp;gt; Flash page at 0x8034000 erased (size: 0x800EraseFlash - Page:0x69 Size:0x800 -&amp;gt; Flash page at 0x8034800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6a Size:0x800 -&amp;gt; Flash page at 0x8035000 erased (size: 0x800EraseFlash - Page:0x6b Size:0x800 -&amp;gt; Flash page at 0x8035800 erased (size: 0x800EraseFlash - Page:0x6c Size:0x800 -&amp;gt; Flash page at 0x8036000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x6d Size:0x800 -&amp;gt; Flash page at 0x8036800 erased (size: 0x800EraseFlash - Page:0x6e Size:0x800 -&amp;gt; Flash page at 0x8037000 erased (size: 0x800EraseFlash - Page:0x6f Size:0x800 -&amp;gt; Flash page at 0x8037800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x70 Size:0x800 -&amp;gt; Flash page at 0x8038000 erased (size: 0x800EraseFlash - Page:0x71 Size:0x800 -&amp;gt; Flash page at 0x8038800 erased (size: 0x800EraseFlash - Page:0x72 Size:0x800 -&amp;gt; Flash page at 0x8039000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x73 Size:0x800 -&amp;gt; Flash page at 0x8039800 erased (size: 0x800EraseFlash - Page:0x74 Size:0x800 -&amp;gt; Flash page at 0x803a000 erased (size: 0x800EraseFlash - Page:0x75 Size:0x800 -&amp;gt; Flash page at 0x803a800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x76 Size:0x800 -&amp;gt; Flash page at 0x803b000 erased (size: 0x800EraseFlash - Page:0x77 Size:0x800 -&amp;gt; Flash page at 0x803b800 erased (size: 0x800EraseFlash - Page:0x78 Size:0x800 -&amp;gt; Flash page at 0x803c000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x79 Size:0x800 -&amp;gt; Flash page at 0x803c800 erased (size: 0x800EraseFlash - Page:0x7a Size:0x800 -&amp;gt; Flash page at 0x803d000 erased (size: 0x800EraseFlash - Page:0x7b Size:0x800 -&amp;gt; Flash page at 0x803d800 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7c Size:0x800 -&amp;gt; Flash page at 0x803e000 erased (size: 0x800EraseFlash - Page:0x7d Size:0x800 -&amp;gt; Flash page at 0x803e800 erased (size: 0x800EraseFlash - Page:0x7e Size:0x800 -&amp;gt; Flash page at 0x803f000 erased (size: 0x800&lt;br /&gt;
EraseFlash - Page:0x7f Size:0x800 -&amp;gt; Flash page at 0x803f800 erased (size: 0x800)&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Successfully loaded flash loader in sram&lt;br /&gt;
2024-09-02T10:30:29 INFO flash_loader.c: Clear DFSR&lt;br /&gt;
2024-09-02T10:30:35 INFO common_flash.c: Starting verification of write complete&lt;br /&gt;
2024-09-02T10:30:37 INFO common_flash.c: Flash written and verified! jolly good!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That went well - no errors reported.  Now let's try to read that flash into a file:&lt;br /&gt;
&lt;br /&gt;
=== Reading data from the MCU ===&lt;br /&gt;
&lt;br /&gt;
To be absolutely certain, read the data back into a new file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ st-flash --flash=256k read random2.bin 0x8000000 0x40000&lt;br /&gt;
st-flash 1.8.0&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: STM32L41x_L42x: 48 KiB SRAM, 128 KiB flash in at least 2 KiB pages.&lt;br /&gt;
Forcing flash size: --flash=0x00040000&lt;br /&gt;
2024-09-02T10:31:51 INFO common.c: read from address 0x08000000 size 262144&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No complaints!&lt;br /&gt;
&lt;br /&gt;
=== Compare data ===&lt;br /&gt;
&lt;br /&gt;
Finally we can verify that the data read from the MCU matches the data we wrote to the MCU:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lth@ncpws04:~/tmp$ md5sum random*&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random2.bin&lt;br /&gt;
5f7ebd5c822e07408e6279445eb1444a  random.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are identical, so it is absolutely confirmed that this particular STM32L432KB is in fact a STM32L432KC which identifies as a STM32L432KB.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://ipfs-pin.com/ipfs/QmcYpvigogWESmwTEFM5GYZc6st2SJRAoqwKWJ8ZDtgiXb/stm32l432kb.pdf STM32L432 Datasheet]&lt;br /&gt;
* [https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-diagnostics-v1.6.html Bluepill Diagnostics Tool]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Diode&amp;diff=8027</id>
		<title>Diode</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Diode&amp;diff=8027"/>
		<updated>2026-08-05T05:30:39Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* Gallery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
[[File:Diode-closeup.jpg|thumb|300px|Random through-hole diode]]A diode can be seen as a one-way valve for electric current.&lt;br /&gt;
&lt;br /&gt;
The symbol of a diode is:&lt;br /&gt;
&lt;br /&gt;
[[File:Diode_symbol.svg|200px]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pins&amp;quot; on a diode is called the &amp;quot;anode&amp;quot; and the &amp;quot;cathode&amp;quot;.  With an appropriate voltage applied over the diode, a current can flow from the anode to the cathode, but if a voltage is applied in the opposite direction, no (or extremely little) current will flow.&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|zQDHaaK0Dow}}&lt;br /&gt;
&lt;br /&gt;
== Simulation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Diode simulation.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://stm32world.com/circuitjs/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADcRsEUQAWYwp258wgqlV60o0mAhYATPgJGD+q5T3l0AZgEMArgBsALiwDuQnr1GXOeXlHNLB2e85WOLa99+55P7n62QZBOXDxB4e6hAE52Dq4OvIQJblSioRZRifG5mXwpud45oaI8hPgeFf7emjoGJgyGdIoQ4lCwrAD2IOUOEpCk1DCQSFQ8PNgsPcQghQNDKNBjsEgQPLNTQA Simulation]&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Diode_symbol.svg|Diode symbol&lt;br /&gt;
File:LED_symbol.svg|LED symbol&lt;br /&gt;
File:Schottky_diode_symbol.svg|Schottky diode symbol&lt;br /&gt;
File:Zener_diode_symbol-2.svg|Zener diode symbol&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Diode Wikipedia article]&lt;br /&gt;
* [https://www.lcsc.com/datasheet/C917030.pdf?spm=wm.fly.bg.2.pdf___wm.ssy.tc.0.tz&amp;amp;lcsc_vid=R1NZVwIHQ1FaBFUAT1ZaVFZXQgMKUwdVRFkNVgVeRQAxVlNeQlFbV1RUT1NdVTsOAxUeFF5JWBYZEEoKFBINSQcJGk4%3D Random 1N4148 Diode datasheet]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=File:Zener_diode_symbol-2.svg&amp;diff=8026</id>
		<title>File:Zener diode symbol-2.svg</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=File:Zener_diode_symbol-2.svg&amp;diff=8026"/>
		<updated>2026-08-05T05:30:12Z</updated>

		<summary type="html">&lt;p&gt;Lth: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8025</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8025"/>
		<updated>2026-08-05T04:35:37Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
In [[DC]] circuits it is calculated with the following formula:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
P = U x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where '''P''' is the power in '''Watts''', '''U''' is the voltage in '''Volts''' and '''I''' is the current in '''Ampere'''.&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Watt Wikipedia article on Watts]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Power_(physics) Wikipedia article on Power]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Diode&amp;diff=8024</id>
		<title>Diode</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Diode&amp;diff=8024"/>
		<updated>2026-08-05T04:22:05Z</updated>

		<summary type="html">&lt;p&gt;Lth: /* Gallery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
[[File:Diode-closeup.jpg|thumb|300px|Random through-hole diode]]A diode can be seen as a one-way valve for electric current.&lt;br /&gt;
&lt;br /&gt;
The symbol of a diode is:&lt;br /&gt;
&lt;br /&gt;
[[File:Diode_symbol.svg|200px]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pins&amp;quot; on a diode is called the &amp;quot;anode&amp;quot; and the &amp;quot;cathode&amp;quot;.  With an appropriate voltage applied over the diode, a current can flow from the anode to the cathode, but if a voltage is applied in the opposite direction, no (or extremely little) current will flow.&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|zQDHaaK0Dow}}&lt;br /&gt;
&lt;br /&gt;
== Simulation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Diode simulation.svg|800px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://stm32world.com/circuitjs/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADcRsEUQAWYwp258wgqlV60o0mAhYATPgJGD+q5T3l0AZgEMArgBsALiwDuQnr1GXOeXlHNLB2e85WOLa99+55P7n62QZBOXDxB4e6hAE52Dq4OvIQJblSioRZRifG5mXwpud45oaI8hPgeFf7emjoGJgyGdIoQ4lCwrAD2IOUOEpCk1DCQSFQ8PNgsPcQghQNDKNBjsEgQPLNTQA Simulation]&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Diode_symbol.svg|Diode symbol&lt;br /&gt;
File:LED_symbol.svg|LED symbol&lt;br /&gt;
File:Schottky_diode_symbol.svg|Schottky diode symbol&lt;br /&gt;
File:Zener_diode_symbol.svg|Zener diode symbol&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Diode Wikipedia article]&lt;br /&gt;
* [https://www.lcsc.com/datasheet/C917030.pdf?spm=wm.fly.bg.2.pdf___wm.ssy.tc.0.tz&amp;amp;lcsc_vid=R1NZVwIHQ1FaBFUAT1ZaVFZXQgMKUwdVRFkNVgVeRQAxVlNeQlFbV1RUT1NdVTsOAxUeFF5JWBYZEEoKFBINSQcJGk4%3D Random 1N4148 Diode datasheet]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=File:Zener_diode_symbol.svg&amp;diff=8023</id>
		<title>File:Zener diode symbol.svg</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=File:Zener_diode_symbol.svg&amp;diff=8023"/>
		<updated>2026-08-05T04:21:31Z</updated>

		<summary type="html">&lt;p&gt;Lth: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Circuits&amp;diff=8022</id>
		<title>Circuits</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Circuits&amp;diff=8022"/>
		<updated>2026-08-05T03:49:43Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ohm's Law with Voltage source TeX.svg|300px|thumb|Simple circuit consisting of a Voltage source and a resistor.]]&lt;br /&gt;
A battery on it's own is a voltage source, however, if nothing is connected between the + and -, no current will flow.&lt;br /&gt;
&lt;br /&gt;
The simplest circuit one can imagine consist of a voltage source and a resistor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Simple circuit.png|600px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can play with this circuit in [https://stm32world.com/circuitjs/circuitjs.html CircuitJS] by clicking [https://stm32world.com/circuitjs/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADcQAWOCsFLnpzCEoo7tSqToCFgCde-BHwVdhosPBYB3AVSEjuVbHk5RtukMdNL+VszpuWTK-fZWOPnU5HOGKXi0cfbAw9PFoAzmxFAOxRHx0-BEjo-29fcLT3AJ8AB0s0LlTovWIROMlkeE1EnjsSp3SdBvrCqP4EgtLywuSmrqyknJYADwocS2I8EEJCcm4IUxRTAFUAHQBnNYBHTYAlTZHNgElR8f4vCFnTLxuQZZAABU2dzfWNo43TgHsuGe8BKQJNAOvc-tgWMZwCAAGIQKgQDTwEBMEB7OgbACWGwALgBDAB2AGM6JDplQ4aIGIVCqiAGrfAA2+IA5qSgA here]&lt;br /&gt;
&lt;br /&gt;
In any circuit, there exists a fixed relationship between the voltage, the resistance and the current.  This is expressed by Ohm's Law, which states:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
U = R x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is worth noticing that U is being used for a potential difference in most of mainland Europe, whereas the colonists prefer a V:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
V = R x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8021</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8021"/>
		<updated>2026-08-05T02:55:40Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
In [[DC]] circuits it is calculated with the following formula:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
P = U x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where '''P''' is the power in '''Watts''', '''U''' is the voltage in '''Volts''' and '''I''' is the current in '''Ampere'''.&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8020</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8020"/>
		<updated>2026-08-05T02:55:18Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
In [[DC]] circuits it is calculated with the following formula:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
P = U x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where '''P''' is the power in '''Watts''', '''U''' is the voltage in '''Volts''' and '''I''' is the current in '''Amphere'''.&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8019</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8019"/>
		<updated>2026-08-05T02:54:59Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
In [[DC]] circuits it is calculated with the following formula:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
P = U x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where '''P''' is the power in Watts, '''U''' is the voltage in '''Volts''' and '''I''' is the current in '''Amphere'''.&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Circuits&amp;diff=8018</id>
		<title>Circuits</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Circuits&amp;diff=8018"/>
		<updated>2026-08-05T02:53:34Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[File:Ohm's Law with Voltage source TeX.svg|300px|thumb|Simple circuit consisting of a Voltage source and a resistor.]]&lt;br /&gt;
A battery on it's own is a voltage source, however, if nothing is connected between the + and -, no current will flow.&lt;br /&gt;
&lt;br /&gt;
The simplest circuit one can imagine consist of a voltage source and a resistor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Simple circuit.png|600px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can play with this circuit in [https://stm32world.com/circuitjs/circuitjs.html CircuitJS] by clicking [https://stm32world.com/circuitjs/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADcQAWOCsFLnpzCEoo7tSqToCFgCde-BHwVdhosPBYB3AVSEjuVbHk5RtukMdNL+VszpuWTK-fZWOPnU5HOGKXi0cfbAw9PFoAzmxFAOxRHx0-BEjo-29fcLT3AJ8AB0s0LlTovWIROMlkeE1EnjsSp3SdBvrCqP4EgtLywuSmrqyknJYAey4QQm8BUglYFCQqflNsFmNwEAAxCCoIDXgQJhAAJToAZwBLU4AXAEMAOwBjOlW8US3RBkLCw4A1EYAbW4Ac2eQA here]&lt;br /&gt;
&lt;br /&gt;
In any circuit, there exists a fixed relationship between the voltage, the resistance and the current.  This is expressed by Ohm's Law, which states:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
U = R x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is worth noticing that U is being used for a potential difference in most of mainland Europe, whereas the colonists prefer a V:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
V = R x I&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8017</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8017"/>
		<updated>2026-08-05T02:52:55Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
In [[DC]] circuits it is calculated with the following formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electric_Power&amp;diff=8016</id>
		<title>Electric Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electric_Power&amp;diff=8016"/>
		<updated>2026-08-05T02:51:55Z</updated>

		<summary type="html">&lt;p&gt;Lth: Lth moved page Electric Power to Electrical Power&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Electrical Power]]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8015</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8015"/>
		<updated>2026-08-05T02:51:55Z</updated>

		<summary type="html">&lt;p&gt;Lth: Lth moved page Electric Power to Electrical Power&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8014</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8014"/>
		<updated>2026-08-05T02:51:37Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
[[Electrical Power]] is measured in '''Watts''' ('''W''').&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8013</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8013"/>
		<updated>2026-08-05T02:35:12Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
== Perpetual motion ==&lt;br /&gt;
&lt;br /&gt;
Let's be clear about a few things:&lt;br /&gt;
&lt;br /&gt;
# The '''only''' place perpetual motion is actually working is on Youtube.&lt;br /&gt;
# The hardest part about designing a perpetual motion machine is hiding the battery&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8012</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8012"/>
		<updated>2026-08-05T02:31:38Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8011</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8011"/>
		<updated>2026-08-05T02:31:22Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|width=1200}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8010</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8010"/>
		<updated>2026-08-05T02:30:28Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I|width=1024}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8009</id>
		<title>Electrical Power</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=Electrical_Power&amp;diff=8009"/>
		<updated>2026-08-05T02:29:54Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;Category:Electronics  {{#ev:youtube|U293YOWHa2I}}&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Electronics]]&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|U293YOWHa2I}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=TM1638&amp;diff=8008</id>
		<title>TM1638</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=TM1638&amp;diff=8008"/>
		<updated>2026-08-03T23:04:19Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Components and Modules]]{{metadesc|TM1638 LED Driver}}&lt;br /&gt;
[[File:Crazy 8 Digit Display, LED and Button module.jpg|thumb|400px|Display board using a TM1638]]&lt;br /&gt;
TM1638 is an IC dedicated to LED (light emitting diode display) drive control and equipped with a keypad scan interface.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Video == &lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|LOdNR7JfgiQ}}&lt;br /&gt;
&lt;br /&gt;
== Open Drain ==&lt;br /&gt;
&lt;br /&gt;
The [[TM1638]] board require a 5V supply voltage.  The 3 data lines STB, CLK and DIO all have a 10 kOhm pull-up resistor.&lt;br /&gt;
&lt;br /&gt;
[[File:TM1638 Module 5 pin connector.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Because of this, the module can be safely driven from a [[STM32]] [[MCU]] using &amp;quot;Open Drain&amp;quot; output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Open Drain.svg|500px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://stm32world.com/circuitjs/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADMRD8QU89OEhHnxDYU4aEhiQULAG4gALHiqK4SlaLRQeSqmGiEkBozpgJ5ovIr1Vs1rVSd7qz8ywBOIDNpSDv2mAYQvrwkCwA7gH6wdHgijbhUT76CVY2YGlJ6fE29nna2fm2OYpiUJGl5cqq5dk1StWaak6VDWXiRkIdFVFdjZ3+uImV-ZjiKTw+vXHjs-7ZXPy8-A0rM2siDWKtyb7TeGBCc+EAHt7E2DyEEIdIRDYZNgDyAK4ALiwADiCHxwdHUTYIRXfTIMJwUb+Hp-AYzWEwwHYYEVAD28U4iT0pFcsHgZC6fh04kyohY6LAV0IWLUOKkeLAgiJEBJV2wLCAA Open Drain simulation]&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://stm32world.com/images/e/ea/TM1638en.pdf TM1638 Datasheet]&lt;br /&gt;
* [https://www.handsontec.com/dataspecs/display/TM1638.pdf TM1638 LED&amp;amp;Key Module]&lt;br /&gt;
* [https://stm32world.com/images/f/f4/TM1629_EN.pdf TM1629 Datasheet]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=TM1638&amp;diff=8007</id>
		<title>TM1638</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=TM1638&amp;diff=8007"/>
		<updated>2026-08-03T23:03:02Z</updated>

		<summary type="html">&lt;p&gt;Lth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Components and Modules]]{{metadesc|TM1638 LED Driver}}&lt;br /&gt;
[[File:Crazy 8 Digit Display, LED and Button module.jpg|thumb|400px|Display board using a TM1638]]&lt;br /&gt;
TM1638 is an IC dedicated to LED (light emitting diode display) drive control and equipped with a keypad scan interface.&lt;br /&gt;
{{clear}}&lt;br /&gt;
== Open Drain ==&lt;br /&gt;
&lt;br /&gt;
The [[TM1638]] board require a 5V supply voltage.  The 3 data lines STB, CLK and DIO all have a 10 kOhm pull-up resistor.&lt;br /&gt;
&lt;br /&gt;
[[File:TM1638 Module 5 pin connector.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Because of this, the module can be safely driven from a [[STM32]] [[MCU]] using &amp;quot;Open Drain&amp;quot; output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;res-img&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Open Drain.svg|500px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://stm32world.com/circuitjs/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADMRD8QU89OEhHnxDYU4aEhiQULAG4gALHiqK4SlaLRQeSqmGiEkBozpgJ5ovIr1Vs1rVSd7qz8ywBOIDNpSDv2mAYQvrwkCwA7gH6wdHgijbhUT76CVY2YGlJ6fE29nna2fm2OYpiUJGl5cqq5dk1StWaak6VDWXiRkIdFVFdjZ3+uImV-ZjiKTw+vXHjs-7ZXPy8-A0rM2siDWKtyb7TeGBCc+EAHt7E2DyEEIdIRDYZNgDyAK4ALiwADiCHxwdHUTYIRXfTIMJwUb+Hp-AYzWEwwHYYEVAD28U4iT0pFcsHgZC6fh04kyohY6LAV0IWLUOKkeLAgiJEBJV2wLCAA Open Drain simulation]&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://stm32world.com/images/e/ea/TM1638en.pdf TM1638 Datasheet]&lt;br /&gt;
* [https://www.handsontec.com/dataspecs/display/TM1638.pdf TM1638 LED&amp;amp;Key Module]&lt;br /&gt;
* [https://stm32world.com/images/f/f4/TM1629_EN.pdf TM1629 Datasheet]&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=File:TM1629_EN.pdf&amp;diff=8006</id>
		<title>File:TM1629 EN.pdf</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=File:TM1629_EN.pdf&amp;diff=8006"/>
		<updated>2026-08-03T23:00:41Z</updated>

		<summary type="html">&lt;p&gt;Lth: TM1629 English datasheet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
TM1629 English datasheet&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=TM1638_Display_and_Button_Module&amp;diff=8005</id>
		<title>TM1638 Display and Button Module</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=TM1638_Display_and_Button_Module&amp;diff=8005"/>
		<updated>2026-08-03T08:16:38Z</updated>

		<summary type="html">&lt;p&gt;Lth: Created page with &amp;quot;{{Video |series=STM32 Tutorial Video |number=96 |title=TM1638 Display and Button Module |youtube-id=LOdNR7JfgiQ |description=In this video we will develop and describe a libra...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=STM32 Tutorial Video&lt;br /&gt;
|number=96&lt;br /&gt;
|title=TM1638 Display and Button Module&lt;br /&gt;
|youtube-id=LOdNR7JfgiQ&lt;br /&gt;
|description=In this video we will develop and describe a library for the TM1638 display&amp;amp;button module.  We will also explain how to interface a 5V module with a 3.3V STM32 and how Open Drain GPIO is actually functioning.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
	<entry>
		<id>https://stm32world.com/w/index.php?title=STM32C071_Deep_Dive&amp;diff=8004</id>
		<title>STM32C071 Deep Dive</title>
		<link rel="alternate" type="text/html" href="https://stm32world.com/w/index.php?title=STM32C071_Deep_Dive&amp;diff=8004"/>
		<updated>2026-08-03T08:16:05Z</updated>

		<summary type="html">&lt;p&gt;Lth: Undo revision 8003 by Lth (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Video&lt;br /&gt;
|series=STM32 Tutorial Video&lt;br /&gt;
|number=95&lt;br /&gt;
|title=STM32C071 Deep Dive&lt;br /&gt;
|youtube-id=typq-0unkTQ&lt;br /&gt;
|description=This video dives deep into the STM32C0xx series of MCU's - in particular the STM32C071, which is available on a Streamline MCU STM32C071.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lth</name></author>
	</entry>
</feed>