{"id":2567,"date":"2024-06-07T05:22:33","date_gmt":"2024-06-07T05:22:33","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=2567"},"modified":"2024-06-07T05:22:34","modified_gmt":"2024-06-07T05:22:34","slug":"working-with-stm32-and-i2s-part-2-configuration-and-sending-data","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=2567","title":{"rendered":"Working with STM32 and I2S Part 2: Configuration and Sending Data"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"150\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Inter-IC-Sound.jpg\" alt=\"\" class=\"wp-image-2568\" \/><\/figure><\/div>\n\n\n\n<p>In the previous guide (<a rel=\"noreferrer noopener\" href=\"https:\/\/blog.embeddedexpert.io\/?p=2553\" data-type=\"URL\" data-id=\"https:\/\/blog.embeddedexpert.io\/?p=2553\" target=\"_blank\">here<\/a>), we took a look what is I2S and how it works and it&#8217;s features. In this guide, we shall configure the I2S and send data using polling mode.<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>I2S Clock Configuration.<\/li><li>I2S Configuration.<\/li><li>I2S Send data polling mode.<\/li><li>Results.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. I2S Clock Configuration:<\/h2>\n\n\n\n<p>Before we start configuration of the I2S, we need to enable the I2S clock in the RCC (Reset and Clock Control).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>From the CubeMX, we can find that using PLLI2S N value of 172 and R of 2, we can achieve accurate 96KHz frequency for the audio:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"137\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-1024x137.jpg\" alt=\"\" class=\"wp-image-2569\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-1024x137.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-300x40.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-768x103.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-1536x206.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-2048x274.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-1150x154.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-750x100.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-400x54.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-51-250x33.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"893\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-1024x893.jpg\" alt=\"\" class=\"wp-image-2570\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-1024x893.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-300x262.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-768x670.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-750x654.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-400x349.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22-250x218.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-49-22.jpg 1114w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Hence, we can configure the clock as following:<\/p>\n\n\n\n<p>Within sys_init source file, at the end of <strong>void<\/strong> <strong>SystemInit<\/strong>(<strong>void<\/strong>) function:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-1024x462.jpg\" alt=\"\" class=\"wp-image-2571\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-1024x462.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-300x135.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-768x347.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-1536x693.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-2048x924.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-1150x519.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-750x338.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-400x181.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-53-19-250x113.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">  \/*I2S clock configuration*\/\n  RCC-&gt;PLLI2SCFGR=(0xAC&lt;&lt;RCC_PLLI2SCFGR_PLLI2SN_Pos)|(2&lt;&lt;RCC_PLLI2SCFGR_PLLI2SR_Pos);<\/pre><\/div>\n\n\n\n<p>Enable I2S clock:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"394\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-1024x394.jpg\" alt=\"\" class=\"wp-image-2572\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-1024x394.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-300x115.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-768x296.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-1536x591.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-1150x442.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-750x289.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-400x154.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15-250x96.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_07-55-15.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">  RCC-&gt;CR|=RCC_CR_PLLI2SON;\n\n  \/*Wait until the clock is enabled*\/\n\n  while(!(RCC-&gt;CR &amp; RCC_CR_PLLI2SRDY));<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Thats all for the i2s clock configuration.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. I2S Configuration:<\/h2>\n\n\n\n<p>Create new source and header file with name of i2s.c and i2s.h respectively.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Within the header file:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Include the header guard:<\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#ifndef I2S_H_\n#define I2S_H_\n\n\n\n#endif \/* I2S_H_ *\/<\/pre><\/div>\n\n\n\n<p>Within the header guard:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Include stdint library:<\/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;&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>Declare the following functions:<\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void I2S3_Pins_Init(void);\nvoid I2S3_Init(void);\nvoid I2S_SendData(uint16_t *data, uint16_t len);<\/pre><\/div>\n\n\n\n<p>Thats all for the header file.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Within the source file:<\/p>\n\n\n\n<p>Include the following header file:<\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;i2s.h&quot;\n#include &quot;stm32f4xx.h&quot;<\/pre><\/div>\n\n\n\n<p>From the schematic of STM32F407-discovery board:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"502\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-1024x502.jpg\" alt=\"\" class=\"wp-image-2573\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-1024x502.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-300x147.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-768x376.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-1536x753.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-2048x1004.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-1150x564.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-750x368.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-400x196.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-00-21-250x123.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We can find the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>PC7 as master clock output.<\/li><li>PC10 as Serial clock.<\/li><li>PC12 as Serial Data.<\/li><li>PA4 as Word Select (channel select left or right).<\/li><\/ul>\n\n\n\n<p>Note also that they all connected to I2S3 which is SPI3 (since I2S and SPI share same hardware).<\/p>\n\n\n\n<p>Hence, for the pin initialization 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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void I2S3_Pins_Init(void)\n{\n\t#define I2S_AF 0x06\n\n\tRCC-&gt;AHB1ENR|=RCC_AHB1ENR_GPIOCEN|RCC_AHB1ENR_GPIOAEN;\n\n\tGPIOA-&gt;MODER|=GPIO_MODER_MODE4_1;\n\tGPIOA-&gt;MODER&amp;=~GPIO_MODER_MODE4_0;\n\n\tGPIOA-&gt;AFR[0]|=(I2S_AF&lt;&lt;GPIO_AFRL_AFSEL4_Pos);\n\n\tGPIOC-&gt;MODER|=GPIO_MODER_MODE7_1|GPIO_MODER_MODE10_1|GPIO_MODER_MODE12_1;\n\n\tGPIOC-&gt;MODER&amp;=~(GPIO_MODER_MODE7_0|GPIO_MODER_MODE10_0|GPIO_MODER_MODE12_0);\n\n\tGPIOC-&gt;AFR[0]|=(I2S_AF&lt;&lt;GPIO_AFRL_AFSEL7_Pos);\n\n\tGPIOC-&gt;AFR[1]|=(I2S_AF&lt;&lt;GPIO_AFRH_AFSEL10_Pos)|(I2S_AF&lt;&lt;GPIO_AFRH_AFSEL12_Pos);\n\n\n}<\/pre><\/div>\n\n\n\n<p>Note also the alternate function is the same for SPI3.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>For the i2s intialization sequence:<\/p>\n\n\n\n<p>First, we need to enable clock access to SPI3 as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"874\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-1024x874.jpg\" alt=\"\" class=\"wp-image-2574\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-1024x874.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-300x256.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-768x655.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-1150x981.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-750x640.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-400x341.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46-250x213.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-05-46.jpg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since SPI3 is connected to APB1, we can enable it as following:<\/p>\n\n\n\n<p><\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void I2S3_Init(void)\n{\n\t\/*Enable clock access to SPI3\/I2S3*\/\n\n\tRCC-&gt;APB1ENR|=RCC_APB1ENR_SPI3EN;<\/pre><\/div>\n\n\n\n<p>Set the mode to be I2S as following:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"237\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-1024x237.jpg\" alt=\"\" class=\"wp-image-2575\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-1024x237.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-300x69.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-768x177.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-1536x355.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-1150x266.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-750x173.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-400x92.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33-250x58.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-08-33.jpg 2000w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t\/*Set SPI into I2S Mode*\/\n\tSPI3-&gt;I2SCFGR|=SPI_I2SCFGR_I2SMOD;<\/pre><\/div>\n\n\n\n<p>Set the mode to master transmit:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"264\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-1024x264.jpg\" alt=\"\" class=\"wp-image-2576\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-1024x264.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-300x77.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-768x198.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-1536x396.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-1150x297.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-750x194.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-400x103.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07-250x65.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-07.jpg 1930w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"934\" height=\"276\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34.jpg\" alt=\"\" class=\"wp-image-2577\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34.jpg 934w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34-300x89.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34-768x227.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34-750x222.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34-400x118.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-10-34-250x74.jpg 250w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/><\/figure>\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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t\/*Set the mode to master transmit*\/\n\tSPI3-&gt;I2SCFGR|=SPI_I2SCFGR_I2SCFG_1;<\/pre><\/div>\n\n\n\n<p>Set the prescaler and odd value:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"117\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-1024x117.jpg\" alt=\"\" class=\"wp-image-2579\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-1024x117.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-300x34.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-768x88.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-1536x175.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-2048x233.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-1150x131.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-750x85.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-400x46.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-13-02-250x28.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since we are generating the master clock and the data is 16-bit.<\/p>\n\n\n\n<p>By using I2SxCLK of 172Mhz, and FS of 96KHz we can I2SDIV as following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>I2SDIV of 4 when ODD is 0.<\/li><li>I2SDIV of 3 when ODD is 1.<\/li><\/ul>\n\n\n\n<p>Either one will work just fine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"263\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-1024x263.jpg\" alt=\"\" class=\"wp-image-2580\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-1024x263.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-300x77.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-768x197.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-1536x395.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-1150x296.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-750x193.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-400x103.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36-250x64.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-15-36.jpg 1540w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t\/*Set the prescaler and ODD values*\/\n\tSPI3-&gt;I2SPR=(3&lt;&lt;SPI_I2SPR_I2SDIV_Pos)|(1&lt;&lt;SPI_I2SPR_ODD_Pos);<\/pre><\/div>\n\n\n\n<p>Enable Master clock output:<\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t\/*Enable Master Clock output*\/\n\tSPI3-&gt;I2SPR|=SPI_I2SPR_MCKOE;\n<\/pre><\/div>\n\n\n\n<p>Enable I2S peripheral:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"247\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-1024x247.jpg\" alt=\"\" class=\"wp-image-2581\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-1024x247.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-300x72.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-768x185.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-1150x277.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-750x181.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-400x96.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07-250x60.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/2024-06-07_08-17-07.jpg 1528w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t\/*Enable I2S*\/\n\n\tSPI3-&gt;I2SCFGR|=SPI_I2SCFGR_I2SE;<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Thats all for the intialization.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. I2S Send Data using Polling Mode:<\/h2>\n\n\n\n<p>For sending the data over I2S, it is the same as SPI transmit mode:<\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void I2S_SendData(uint16_t *data, uint16_t len)\n{\n\tuint32_t i=0;\n\n\twhile(i&lt;len)\n\t{\n\t\t\/*Wait until TXE is set*\/\n\t\twhile(!(SPI3-&gt;SR &amp; (SPI_SR_TXE))){}\n\n\t\t\/*Write the data to the data register*\/\n\t\tSPI3-&gt;DR = data[i];\n\t\ti++;\n\t}\n\t\/*Wait until TXE is set*\/\n\twhile(!(SPI3-&gt;SR &amp; (SPI_SR_TXE))){}\n\n\t\/*Wait for BUSY flag to reset*\/\n\twhile((SPI3-&gt;SR &amp; (SPI_SR_BSY))){}\n\n\t\/*Clear OVR flag*\/\n\t(void)SPI3-&gt;DR;\n\t(void)SPI3-&gt;SR;\n}<\/pre><\/div>\n\n\n\n<p>Thats all for the I2S.c source file.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In main.c file for testing purposes:<\/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;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;delay.h&quot;\n#include &quot;stdlib.h&quot;\n#include &quot;i2s.h&quot;\n\n#define dataSize 10\nuint16_t data[dataSize] = {0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888, 0x9999, 0xAAAA};\n\n\nint main(void)\n{\n\tdelay_init(168000000);\n\tI2S3_Pins_Init();\n\tI2S3_Init();\n\n\twhile(1)\n\t{\n\t\tI2S_SendData(data, dataSize);\n\t\tdelay(1);\n\t}\n\n\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">11. Results:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>By connecting logic analyzer to the clock, data and word select, you should get the following:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"182\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-1024x182.png\" alt=\"\" class=\"wp-image-2582\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-1024x182.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-300x53.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-768x136.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-1536x272.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-2048x363.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-1150x204.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-750x133.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-400x71.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/06\/Screenshot-2024-06-06-at-8.17.43\u202fAM-250x44.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since have successfully transmitted data over I2S bus.<\/p>\n\n\n\n<p>Next, we shall use DMA to keeo transmitting the data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous guide (here), we took a look what is I2S and how it works and it&#8217;s features. In this guide, we shall configure the I2S and send data using polling mode. In this guide, we shall cover the following: I2S Clock Configuration. I2S Configuration. I2S Send data polling mode. Results. 8. I2S Clock [&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,11,12],"tags":[],"class_list":["post-2567","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-peripheral-drivers","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2567"}],"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=2567"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2567\/revisions"}],"predecessor-version":[{"id":2583,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2567\/revisions\/2583"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}