{"id":284,"date":"2018-04-25T13:40:53","date_gmt":"2018-04-25T20:40:53","guid":{"rendered":"https:\/\/sysprogs.com\/tutorials\/?p=284"},"modified":"2018-04-27T12:35:34","modified_gmt":"2018-04-27T19:35:34","slug":"capturing-large-volumes-of-data-with-the-super-speed-explorer-kit","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/analyzer2go\/tutorials\/superspeed\/","title":{"rendered":"Capturing Large Volumes of Data with the Super Speed Explorer Kit"},"content":{"rendered":"<p>This tutorial shows how to use the <a href=\"http:\/\/www.cypress.com\/documentation\/development-kitsboards\/cyusb3kit-003-ez-usb-fx3-superspeed-explorer-kit\">Cypress Super Speed Explorer Kit<\/a> board to capture and analyze large amounts of data using Analyzer2Go. We will create a basic project for the STM32F4Discovery board that will generate large amounts of UART\u00a0data at ~8M bits per second and will show how to capture\u00a0it at a fast 200MHz sampling rate, analyze various\u00a0timings and extract the\u00a0transmitted text.<\/p>\n<p>Before you begin, connect the following inputs of the 2 boards:<\/p>\n<table>\n<tbody>\n<tr>\n<th>STM32F4Discovery pin<\/th>\n<th>SuperSpeed Explorer Kit pin<\/th>\n<\/tr>\n<tr>\n<td>\u00a0GND<\/td>\n<td>\u00a0GND<\/td>\n<\/tr>\n<tr>\n<td>\u00a0PA2<\/td>\n<td>\u00a0DQ0<\/td>\n<\/tr>\n<tr>\n<td>\u00a0PE0<\/td>\n<td>\u00a0DQ1<\/td>\n<\/tr>\n<tr>\n<td>\u00a0PE1<\/td>\n<td>\u00a0DQ2<\/td>\n<\/tr>\n<tr>\n<td>\u00a0PE2<\/td>\n<td>\u00a0DQ3<\/td>\n<\/tr>\n<tr>\n<td>\u00a0PE3<\/td>\n<td>\u00a0DQ4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li>We will start with creating a basic project for the STM32F4Discovery board that will generate the\u00a0fast UART output (pin PA2) and cycle values from 0000 (0x0) to 1111 (0xF) via 4 parallel pins (PE0 to PE3). The easiest way to do this is to\u00a0start Visual Studio with\u00a0VisualGDB and clone the UART_TwoBoards_ComPolling sample:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-285\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/01-prj.png\" alt=\"\" width=\"856\" height=\"693\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/01-prj.png 856w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/01-prj-300x243.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/01-prj-768x622.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/li>\n<li>Once the sample is created, replace the code in the main() function with the following:\n<pre class=\"\">int main(void)\r\n{\r\n\r\n \/* STM32F4xx HAL library initialization:\r\n - Configure the Flash prefetch, instruction and Data caches\r\n - Configure the Systick to generate an interrupt each 1 msec\r\n - Set NVIC Group Priority to 4\r\n - Global MSP (MCU Support Package) initialization\r\n *\/\r\n HAL_Init();\r\n \r\n \/* Configure LED3, LED4, LED5 and LED6 *\/\r\n BSP_LED_Init(LED3);\r\n BSP_LED_Init(LED4);\r\n BSP_LED_Init(LED5);\r\n BSP_LED_Init(LED6);\r\n\r\n \/* Configure the system clock to 168 MHz *\/\r\n SystemClock_Config();\r\n\r\n \/*##-1- Configure the UART peripheral ######################################*\/\r\n \/* Put the USART peripheral in the Asynchronous mode (UART Mode) *\/\r\n \/* UART1 configured as follow:\r\n - Word Length = 8 Bits\r\n - Stop Bit = One Stop bit\r\n - Parity = None\r\n - BaudRate = 9600 baud\r\n - Hardware flow control disabled (RTS and CTS signals) *\/\r\n UartHandle.Instance = USARTx;\r\n \r\n UartHandle.Init.BaudRate = 115200 * 64;\r\n UartHandle.Init.WordLength = UART_WORDLENGTH_8B;\r\n UartHandle.Init.StopBits = UART_STOPBITS_1;\r\n UartHandle.Init.Parity = UART_PARITY_NONE;\r\n UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE;\r\n UartHandle.Init.Mode = UART_MODE_TX_RX;\r\n UartHandle.Init.OverSampling = UART_OVERSAMPLING_8;\r\n \r\n if (HAL_UART_Init(&amp;UartHandle) != HAL_OK)\r\n {\r\n Error_Handler();\r\n }\r\n \r\n __GPIOE_CLK_ENABLE();\r\n GPIO_InitTypeDef GPIO_InitStruct;\r\n \r\n \/* UART TX GPIO pin configuration *\/\r\n GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;\r\n GPIO_InitStruct.Pull = GPIO_NOPULL;\r\n GPIO_InitStruct.Speed = GPIO_SPEED_FAST;\r\n GPIO_InitStruct.Pin = 0x0F;\r\n \r\n HAL_GPIO_Init(GPIOE, &amp;GPIO_InitStruct);\r\n \r\n for (int i = 0;;i++)\r\n {\r\n GPIOE-&gt;ODR = i;\r\n \r\n char tmp[512];\r\n sprintf(tmp, \"Iteration #%x\\n\", i);\r\n \r\n HAL_UART_Transmit(&amp;UartHandle, tmp, strlen(tmp), HAL_MAX_DELAY);\r\n }\r\n}<\/pre>\n<p>Also adjust the APB1 clock divider in SystemClock_Config() to be equal to 2:<\/p>\n<pre class=\"\"> RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;<\/pre>\n<\/li>\n<li>Finally press F5 to build the project and start running it:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-286\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/02-created.png\" alt=\"\" width=\"1187\" height=\"724\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/02-created.png 1187w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/02-created-300x183.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/02-created-768x468.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/02-created-1024x625.png 1024w\" sizes=\"(max-width: 1187px) 100vw, 1187px\" \/><\/li>\n<li>The\u00a0code will start running and will generate the UART output at approximately 7.76M bits per second (the baud rate will be rounded\u00a0to the\u00a0nearest divided peripheral clock). Now we will show how to capture and analyze this data with Analyzer2Go. Ensure your SuperSpeed Explorer kit is connected to a USB 3.0 SuperSpeed port and start Analyzer2Go. Select the board and press OK:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-287\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/03-explorer.png\" alt=\"\" width=\"880\" height=\"534\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/03-explorer.png 880w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/03-explorer-300x182.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/03-explorer-768x466.png 768w\" sizes=\"(max-width: 880px) 100vw, 880px\" \/><\/li>\n<li>Begin sampling the DQ0 to DQ4 ports. You will immediately see the fast UART output and the looped pattern in the DQ1-DQ4 inputs (as\u00a0the\u00a0firmware is outputting numbers from 0 to 0x0F in a parallel way, each higher bit is toggled twice slower than the lower bit):<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-288\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/04-fast.png\" alt=\"\" width=\"1369\" height=\"885\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/04-fast.png 1369w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/04-fast-300x194.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/04-fast-768x496.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/04-fast-1024x662.png 1024w\" sizes=\"(max-width: 1369px) 100vw, 1369px\" \/><\/li>\n<li>Normally Analyzer2Go will only capture 1 frame at a time\u00a0as it allows seeing the signal changes immediately. Press the &#8220;pause&#8221; button, zoom to the UART signal and select one full cycle. Analyzer2Go will compute the signal period (and the corresponding frequency). Note that the baud rate will be twice the shown frequency as one period includes 2 bits:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-289\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/05-period.png\" alt=\"\" width=\"1369\" height=\"885\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/05-period.png 1369w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/05-period-300x194.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/05-period-768x496.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/05-period-1024x662.png 1024w\" sizes=\"(max-width: 1369px) 100vw, 1369px\" \/><\/li>\n<li>Now we\u00a0will show how to record\u00a0a large amount of data. Press and hold the Reset button on the STM32F4Discovery board to ensure we capture the very first moments after reset and click the Record button in\u00a0Analyzer2Go. It will begin\u00a0making a continuous recording and will display statistics to the left from the signals:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-290\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06a-record.png\" alt=\"\" width=\"1694\" height=\"961\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06a-record.png 1694w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06a-record-300x170.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06a-record-768x436.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06a-record-1024x581.png 1024w\" sizes=\"(max-width: 1694px) 100vw, 1694px\" \/><\/li>\n<li>Release the reset button on the STM32F4Discovery board so that it will begin generating data. Once you record sufficient data, click the Stop button in Analyzer2Go:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-296\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/record.png\" alt=\"\" width=\"1600\" height=\"979\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/record.png 1600w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/record-300x184.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/record-768x470.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/record-1024x627.png 1024w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/>Analyzer2Go is optimized to handle huge amounts of data coming from the SuperSpeed Explorer Kit board (up to 200 MHz sampling rate\u00a0when using 8\u00a0channels and up to 100 MHz when using 16 channels). It will use all available CPU cores to compress it on-the-fly and will use all the available RAM (exceeding the 4GB limit if needed) to buffer the data if it&#8217;s coming too fast to be processed.<\/li>\n<li>Once the recording is complete, zoom into an arbitrary portion of the graph. See how the period signal changes relatively slowly with packets of fast UART output between the changes:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-291\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06-zoomed.png\" alt=\"\" width=\"1369\" height=\"885\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06-zoomed.png 1369w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06-zoomed-300x194.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06-zoomed-768x496.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/06-zoomed-1024x662.png 1024w\" sizes=\"(max-width: 1369px) 100vw, 1369px\" \/><\/li>\n<li>In order to interpret this data, switch to the &#8220;Protocol Analyzers&#8221; tab and add the UART and Parallel analyzers. Connect the UART analyzer to the DQ0 channel and the\u00a0Parallel analyzer to the remaining channels. Analyzer2Go will now\u00a0display meaningful text instead of the raw UART waveform. See how the\u00a0last hex digit of the message matches the\u00a0value from the parallel pins:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-294\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/09-measure.png\" alt=\"\" width=\"1600\" height=\"979\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/09-measure.png 1600w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/09-measure-300x184.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/09-measure-768x470.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/09-measure-1024x627.png 1024w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/li>\n<li>You can\u00a0export the\u00a0text recovered from the UART port by clicking the &#8220;Save&#8221; button and\u00a0see\u00a0that it contains &#8220;Iteration XXX&#8221; lines just as expected:<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-297\" src=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/10-save-1.png\" alt=\"\" width=\"1600\" height=\"979\" srcset=\"https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/10-save-1.png 1600w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/10-save-1-300x184.png 300w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/10-save-1-768x470.png 768w, https:\/\/sysprogs.com\/tutorials\/wp-content\/uploads\/2018\/04\/10-save-1-1024x627.png 1024w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/>You can also use the &#8220;Save Captured Data&#8221; button to save the\u00a0raw captured data. Once saved,\u00a0you can open it later, change the protocol analyzer settings, or\u00a0save notes attached to various parts of the\u00a0graphs.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to use the Cypress Super Speed Explorer Kit board to capture and analyze large amounts of<\/p>\n","protected":false},"author":1,"featured_media":299,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[46,47],"_links":{"self":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/284"}],"collection":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/comments?post=284"}],"version-history":[{"count":1,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/284\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/posts\/284\/revisions\/298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/media\/299"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/media?parent=284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/categories?post=284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/tutorials\/wp-json\/wp\/v2\/tags?post=284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}