{"id":4339,"date":"2026-04-09T08:14:55","date_gmt":"2026-04-09T08:14:55","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=4339"},"modified":"2026-04-09T08:14:57","modified_gmt":"2026-04-09T08:14:57","slug":"stm32f429-discovery-display-guide-part-4-touch-initialization-and-read-device-id","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=4339","title":{"rendered":"STM32F429 Discovery Display Guide \u2013 Part 4: Touch Initialization and Read Device ID"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-1024x559.png\" alt=\"\" class=\"wp-image-4341\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-1024x559.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-300x164.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-768x419.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-1150x627.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-750x409.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-400x218.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb-250x136.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6djb3t6djb3t6djb.png 1408w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Part 4 focuses on initializing the touch controller and establishing communication between the STM32 and the touch interface hardware. It also demonstrates how to read the controller\u2019s device ID to verify correct configuration and ensure the touch controller is responding properly.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we shall cover the following: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>STM32CubeMX configuration.<\/li>\n\n\n\n<li>Firmware Development.<\/li>\n\n\n\n<li>Results.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1. STM32CubeMX Configuration:<\/h2>\n\n\n\n<p>Open the previous project in STM32CubeMX.<\/p>\n\n\n\n<p>First from the schematic of the board, we can determine the pins for the touch controller as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-1024x536.jpg\" alt=\"\" class=\"wp-image-4342\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-1024x536.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-300x157.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-768x402.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-1536x804.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-2048x1072.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-1150x602.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-750x392.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-400x209.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-33-12-250x131.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Note: Currently, we are not enabling the interrupt capability of the touch controller.<\/p>\n\n\n\n<p>Hence, we need to enable PA8 and PC9 as I2C3_SCL and I2C3_SDA respectively as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"614\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-1024x614.jpg\" alt=\"\" class=\"wp-image-4343\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-1024x614.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-300x180.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-768x461.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-1536x921.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-2048x1228.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-1150x690.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-750x450.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-400x240.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-16-250x150.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Next, from the connectivity, enable I2C3 and keep the parameters as default as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"662\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-1024x662.jpg\" alt=\"\" class=\"wp-image-4344\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-1024x662.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-300x194.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-768x497.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-1536x993.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-2048x1324.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-1150x744.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-750x485.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-400x259.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-36-56-250x162.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Thats all for the configuration.<\/p>\n\n\n\n<p>Click on Generate Code to generate the new configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"102\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-1024x102.jpg\" alt=\"\" class=\"wp-image-4345\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-1024x102.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-300x30.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-768x76.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-1536x153.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-2048x203.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-1150x114.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-750x75.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-400x40.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-39-58-250x25.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Firmware Development:<\/h2>\n\n\n\n<p>First, we need to create new source and header files.<\/p>\n\n\n\n<p>To create Source file, right click on Src folder and add new source file as following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"753\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-1024x753.jpg\" alt=\"\" class=\"wp-image-4311\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-1024x753.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-300x221.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-768x565.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-1536x1130.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-1150x846.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-750x552.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-400x294.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08-250x184.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/03\/2026-03-26_12-18-08.jpg 1770w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Give a name for the source file, we shall name it as STMPE811.c as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"734\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-1024x734.jpg\" alt=\"\" class=\"wp-image-4346\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-1024x734.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-300x215.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-768x550.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-1150x824.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-750x538.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-400x287.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39-250x179.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-42-39.jpg 1172w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In similar manner, right click on Inc folder and add new header file with name of STMPE811.h as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"734\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-1024x734.jpg\" alt=\"\" class=\"wp-image-4347\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-1024x734.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-300x215.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-768x550.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-1150x824.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-750x538.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-400x287.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04-250x179.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_10-43-04.jpg 1172w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In STMPE811.h, include the following header files:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;stdint.h&quot;<\/pre><\/div>\n\n\n\n<p>Next, declare a macro that holds the address of the touch controller as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#define deviceAddress 0x41&lt;&lt;1<\/pre><\/div>\n\n\n\n<p>Note: the address is mentioned in the schematic of the board.<\/p>\n\n\n\n<p>The reason behind shift left by 1 to accommodate the read\/write bit.<\/p>\n\n\n\n<p>Next, declare enum to hold touched and untouched states as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">typedef enum TouchDetect\n{\n\ttouched =1,\n\tno_touch=0\n\n}TouchDetect_t;<\/pre><\/div>\n\n\n\n<p>Next, macros that will hold registers of the touch controller as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#define STMPE811_REG_CHIP_ID\t\t\t0x00 \/*Chip ID Register*\/\n#define STMPE811_REG_ID_VER\t\t\t\t0x01 \/*ID Revision Register*\/\n#define STMPE811_REG_SYS_CTRL2 \t\t\t0x04 \/*Clock control*\/\n#define STMPE811_REG_SYS_CTRL1 \t\t\t0x03 \/*Reset control*\/\n#define STMPE811_REG_IO_AF              0x17 \/*Alternate function register*\/\n#define STMPE811_REG_ADC_CTRL1          0x20 \/*ADC control*\/\n#define STMPE811_REG_ADC_CTRL2          0x21 \/*ADC control*\/\n#define STMPE811_REG_TSC_CFG            0x41 \/*Touch Configuration*\/\n#define STMPE811_REG_FIFO_TH            0x4A \/*FIFO threshold*\/\n#define STMPE811_REG_FIFO_STA           0x4B \/*FIFO status*\/\n#define STMPE811_REG_TSC_FRACT_XYZ      0x56 \/*Touchscreen controller FRACTION_Z*\/\n#define STMPE811_REG_TSC_I_DRIVE        0x58 \/*Touchscreen controller drive*\/\n#define STMPE811_REG_TSC_CTRL           0x40 \/*touchscreen controller control register*\/\n#define STMPE811_REG_INT_CTRL\t\t\t0x09 \/*Interrupt control register*\/\n#define STMPE811_REG_INT_EN\t\t\t\t0x0A \/*Interrupt enable register*\/\n#define STMPE811_REG_INT_STA            0x0B \/*Interrupt status register*\/\n#define STMPE811_REG_TSC_DATA_INC       0x57 \/*Touchscreen controller DATA Incremental*\/\n#define STMPE811_REG_TSC_DATA_NON_INC   0xD7 \/*Touchscreen controller DATA Non-Incremental*\/\n#define STMPE811_REG_FIFO_SIZE          0x4C \/*FIFO size*\/\n\n\/*IO expander facilities*\/\n#define STMPE811_ADC_FCT                0x01\n#define STMPE811_TS_FCT                 0x02\n#define STMPE811_IO_FCT                 0x04\n#define STMPE811_TEMPSENS_FCT           0x08\n\n\n\n\/* Touch Screen Pins definition *\/\n#define STMPE811_TOUCH_YD               STMPE811_PIN_7\n#define STMPE811_TOUCH_XD               STMPE811_PIN_6\n#define STMPE811_TOUCH_YU               STMPE811_PIN_5\n#define STMPE811_TOUCH_XU               STMPE811_PIN_4\n#define STMPE811_TOUCH_IO_ALL           0x00\n\n\/* IO Pins definition *\/\n#define STMPE811_PIN_0                  0x01\n#define STMPE811_PIN_1                  0x02\n#define STMPE811_PIN_2                  0x04\n#define STMPE811_PIN_3                  0x08\n#define STMPE811_PIN_4                  0x10\n#define STMPE811_PIN_5                  0x20\n#define STMPE811_PIN_6                  0x40\n#define STMPE811_PIN_7                  0x80\n#define STMPE811_PIN_ALL                0xFF\n\n#define STMPE811_TS_CTRL_ENABLE         0x01\n#define STMPE811_TS_CTRL_STATUS         0x80<\/pre><\/div>\n\n\n\n<p>Next, declare touch enable function, which will initialize the touch controller as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void STMPE811_Touch_Enable(void);<\/pre><\/div>\n\n\n\n<p>Finally, a function to get the device ID as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">uint16_t getID(void);<\/pre><\/div>\n\n\n\n<p>That&#8217;s all for the header file.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Next, in STMPE811.c, include the following header files:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;STMPE811.h&quot;\n\n#include &quot;i2c.h&quot;<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Declare the following which will allow us to read\/write from\/to chip by calling simple function as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">static void STMPE811_WriteReg(uint8_t reg, uint8_t data)\n{\n    HAL_I2C_Mem_Write(&amp;hi2c3,deviceAddress,reg,I2C_MEMADD_SIZE_8BIT,&amp;data,1,HAL_MAX_DELAY);\n}\n\nstatic void STMPE811_ReadReg(uint8_t reg, uint8_t *data)\n{\n    HAL_I2C_Mem_Read(&amp;hi2c3,deviceAddress,reg,I2C_MEMADD_SIZE_8BIT,data,1,HAL_MAX_DELAY);\n}\n\nstatic void STMPE811_ReadMulti(uint8_t reg, uint8_t *data, uint16_t len)\n{\n\tHAL_I2C_Mem_Read(&amp;hi2c3,deviceAddress ,reg,I2C_MEMADD_SIZE_8BIT,data,len,HAL_MAX_DELAY);\n}<\/pre><\/div>\n\n\n\n<p>Next, touch enable function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void STMPE811_Touch_Enable(void)\n{\n    uint8_t mode;\n\n    \/* Power Down the STMPE811 *\/\n    STMPE811_WriteReg(STMPE811_REG_SYS_CTRL1, 0x02);\n    HAL_Delay(10);\n\n    \/* Power On (reset registers) *\/\n    STMPE811_WriteReg(STMPE811_REG_SYS_CTRL1, 0x00);\n    HAL_Delay(2);\n\n    \/* Disable GPIO clock *\/\n    STMPE811_ReadReg(STMPE811_REG_SYS_CTRL2, &amp;mode);\n    mode &amp;= ~(STMPE811_IO_FCT);\n    STMPE811_WriteReg(STMPE811_REG_SYS_CTRL2, mode);\n\n    \/* Select TSC pins in alternate mode *\/\n    STMPE811_WriteReg(STMPE811_REG_IO_AF, STMPE811_TOUCH_IO_ALL);\n\n    \/* Enable ADC and Touch *\/\n    mode &amp;= ~(STMPE811_TS_FCT | STMPE811_ADC_FCT);\n    STMPE811_WriteReg(STMPE811_REG_SYS_CTRL2, mode);\n\n    \/* ADC configuration *\/\n    STMPE811_WriteReg(STMPE811_REG_ADC_CTRL1, 0x49);\n    HAL_Delay(2);\n\n    STMPE811_WriteReg(STMPE811_REG_ADC_CTRL2, 0x01);\n\n    \/* Touch configuration\n       AVG = 8 samples\n       Delay = 500us\n       Panel driver = 500us\n    *\/\n    STMPE811_WriteReg(STMPE811_REG_TSC_CFG, 0xDA);\n\n    \/* FIFO threshold = 1 *\/\n    STMPE811_WriteReg(STMPE811_REG_FIFO_TH, 0x01);\n\n    \/* Reset FIFO *\/\n    STMPE811_WriteReg(STMPE811_REG_FIFO_STA, 0x01);\n    STMPE811_WriteReg(STMPE811_REG_FIFO_STA, 0x00);\n\n    \/* Pressure measurement configuration *\/\n    STMPE811_WriteReg(STMPE811_REG_TSC_FRACT_XYZ, 0x07);\n\n    \/* Drive current = 50mA *\/\n    STMPE811_WriteReg(STMPE811_REG_TSC_I_DRIVE, 0x01);\n\n    \/* Enable Touch Screen Controller *\/\n    STMPE811_WriteReg(STMPE811_REG_TSC_CTRL, 0x01);\n\n    \/* Clear interrupts *\/\n    STMPE811_WriteReg(STMPE811_REG_INT_STA, 0xFF);\n\n    HAL_Delay(5);\n}<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-1024x559.png\" alt=\"\" class=\"wp-image-4348\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-1024x559.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-300x164.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-768x419.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-1150x627.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-750x409.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-400x218.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg-250x136.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_ombgpxombgpxombg.png 1408w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This initialization function prepares the&nbsp;<strong>STMPE811<\/strong>&nbsp;to act as a dedicated touch co-processor, offloading the heavy lifting of signal processing from your STM32.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">Functional Breakdown<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reset &amp; Power:<\/strong>\u00a0It performs a hardware reset via\u00a0<code>SYS_CTRL1<\/code>\u00a0and enables the internal clocks for the\u00a0<strong>ADC<\/strong>\u00a0and\u00a0<strong>Touch<\/strong>\u00a0subsystems, while disabling unused GPIO functions to save power.<\/li>\n\n\n\n<li><strong>Signal Conditioning:<\/strong>\u00a0It configures the controller to\u00a0<strong>average 8 samples<\/strong>\u00a0per touch point. This is vital for resistive screens to filter out electrical noise and provide stable, &#8220;jitter-free&#8221; coordinates.<\/li>\n\n\n\n<li><strong>Hardware Mapping:<\/strong>\u00a0It switches the necessary pins from general-purpose mode to\u00a0<strong>Alternate Function<\/strong>\u00a0mode, physically connecting the resistive panel layers to the internal sensing circuitry.<\/li>\n\n\n\n<li><strong>Data Management:<\/strong>\u00a0It resets the internal\u00a0<strong>FIFO buffer<\/strong>\u00a0and sets a threshold of 1, ensuring the STM32 is notified immediately when a new, valid touch coordinate is available.<\/li>\n\n\n\n<li><strong>Final Activation:<\/strong>\u00a0After setting the panel drive current (50mA) and pressure sensitivity, it enables the\u00a0<strong>Touch Screen Controller (TSC)<\/strong>\u00a0and clears all interrupt flags to start with a clean state.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">Why these delays matter?<\/h3>\n\n\n\n<p>The&nbsp;<code>HAL_Delay<\/code>&nbsp;calls allow the internal analog components (like the voltage reference and charge pumps) to stabilize. Without them, the first few touch coordinates would likely be inaccurate or &#8220;ghost&#8221; touches.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Finally, the getID function as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">uint16_t getID(void)\n{\n    uint8_t data[2];\n\n    STMPE811_ReadMulti(STMPE811_REG_CHIP_ID, data, 2);\n\n    return (data[0] &lt;&lt; 8) | data[1];\n}<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In main.c, include STMPE811 header file as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;STMPE811.h&quot;<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In main function, enable the touch as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">STMPE811_Touch_Enable();<\/pre><\/div>\n\n\n\n<p>Get the ID as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">uint16_t ID=0; \/\/Global variable<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\"> ID=getID();<\/pre><\/div>\n\n\n\n<p>Thats all for the firmware.<\/p>\n\n\n\n<p>Save, build the project and run it as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"34\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-1024x34.png\" alt=\"\" class=\"wp-image-4349\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-1024x34.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-300x10.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-768x26.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-1536x51.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-1150x38.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-750x25.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-400x13.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1-250x8.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/image-1.png 1986w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Results:<\/h2>\n\n\n\n<p>Start a debug session and add ID variable to the live expression and you should get the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"25\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-1024x25.jpg\" alt=\"\" class=\"wp-image-4350\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-1024x25.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-300x7.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-768x19.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-1150x28.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-750x18.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-400x10.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41-250x6.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_09-45-41.jpg 1220w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Which match the one in the datasheet of the touch controller:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"92\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-1024x92.jpg\" alt=\"\" class=\"wp-image-4351\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-1024x92.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-300x27.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-768x69.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-1536x138.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-1150x104.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-750x68.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-400x36.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08-250x23.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2026\/04\/2026-04-09_11-14-08.jpg 1620w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In part 5, we shall get the touch values.<\/p>\n\n\n\n<p>Stay tuned.<\/p>\n\n\n\n<p>Happy coding \ud83d\ude09<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part 4 focuses on initializing the touch controller and establishing communication between the STM32 and the touch interface hardware. It also demonstrates how to read the controller\u2019s device ID to verify correct configuration and ensure the touch controller is responding properly. In this guide, we shall cover the following: 1. STM32CubeMX Configuration: Open the previous [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,19,11,12],"tags":[],"class_list":["post-4339","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-lcd","category-peripheral-drivers","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/4339"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4339"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/4339\/revisions"}],"predecessor-version":[{"id":4352,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/4339\/revisions\/4352"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}