55. Let’s Explore Infineon MCU Memory, Specifically Flash, and Perform Erase and Write Operations

Toby
2 min readOct 3, 2023

--

Hello,

I’d like to delve into the topic of memory.

This is a brief summary of the basics of memory.

It’s an older post, but I recommend giving it a read before we start.

To summarize once again:

Memory can be broadly categorized into Flash and RAM.

RAM is volatile memory, which means that when you turn off and on the board’s power, all information is erased. However, Flash Memory is non-volatile memory, so even when you turn the power off and on, the information remains intact.

There are various types of non-volatile memory, but nowadays, Flash memory is widely used.

Flash memory can be divided into two types: NAND Type and NOR Type.

The difference lies in where the instructions are executed based on the type of Flash. NAND can’t execute instructions directly from the Flash storage location, so it copies the code to RAM before execution. On the other hand, NOR Type Flash can execute instructions directly from Flash.

While NAND used to be faster when executing from RAM, these days, NAND and NOR are quite similar in terms of speed.

Most of the Flash memory we use is NOR Type Flash.

The TC275 Infineon MCU, which we are using, is also NOR Type Flash. Therefore, you’ll notice that the code is executed from the Flash location when the MCU runs.

Infineon MCU divides its Flash memory into Program Flash and Data Flash areas.

The size is Pflash 4M.

There is a Dflash of 384Kbytes.

If there are two important things in firmware, they are:

  1. Architecture Design
  2. Memory Management

Therefore, it’s crucial to develop the skills to manage memory accurately.

Now, let’s port a Flash example and learn how to write and erase data in Flash. (You can’t just write directly; you need to use a Flash driver to write and erase.)

--

--