 We continue in the next end zone. The VCP 0-inch packet is the name for the extension of our first end zone of the CDC VCP. Here we will demonstrate the ability of the USB bulk transfer, which as you can see in the specification, has to be ended with the packet which is smaller than the maximum packet size or a 0-inch packet. Otherwise, the system is not considering the transfer as complete and the communication, the data, are not propagated to the upper layer. And as Windows is strictly following this rule, we will be able to see in the terminal that if we want to follow this rule correctly, the communication won't be propagated. So, we will again jump into the QPEMX. We have the same configuration like before for the CDC VCP. So if you skip the first end zones, please return to it and go through. Otherwise, we won't be able to continue here. But as you already did, we use the exactly same MX file and exactly same settings. Just add the PA-13 as GPIO input. PA-13 is a button on the nuclear board. So here we will have this functionality to control the flow inside of the application. So generate the project and open in IDE. So we have the same like before. In the interface file, we have already the line coding failed from previous project. So we can directly continue with adding the code. So first, we will add the include of the CDC interface file to be able to call CDC transmit function. And here we will prepare the buffers which will be used for the communication. So first, we will define the length of the buffer as we will change it during the demonstration. And now buffers itself counting variable. And for getting the state of the USB peripheral, we will need also the handler, which is inside of the USB device that see. So we will copy the handler and use in main with extern. And now we can just add the code. So first, we are waiting for the button press. So read the pin GPIO C GPIO pin 13. And we are waiting as long as the pin is the reset state. So like that, after that, we will limit the program to five iteration. So use the count variable and smaller than five. And in this iteration, first, we want to check that there is no ongoing transfer. So for this purpose, we will use the state variable inside of the handler, which is changed in the library file connected to the class CDC. So in the source USB D that CDC. And here we have it already on open. So from the previous demonstration, so it's CDC data in and in this callback, which is called once the data are successfully received by the host, we have the TX state, which is zeroed. That means that there is no ongoing transfer and we can call again CDC transmit. And the data will be propagated to the buffers file for and so on. So here we will copy part of the code. So we can reuse them. So but the PDF needs to be replies here by the handler. And we are waiting for the TX state and the TX state needs to be zero. That means there is no ongoing transfer. And when this is fulfilled, we can call the CDC transmit buffer is already initialized and we will use the link which was initialized also because we will change it during the example. And we want to be sure this was executed correctly. And once executed correctly, we will increase the count. So this is the code we need for the first part of the example. Okay, good. And we can load into the microcontroller. So application is ready to be to run. And before that, we will use also the USB analyzer. So I will be able to demonstrate you that the data were correctly sent by the microcontroller but are not visible for the system as the zero and packet or the packet with smaller size was not sent as the specification requires. So we will start the recording. Now I start the program inside of the debug of the microcontroller and connect to virtual comport nine, which is the USB of the microcontroller. And by pressing the button, data are sent, but I'm not able to see any change it. So let's take a look inside of the analyzer data. If there were any communication on the data endpoints, a few moments for the analyzer software. And here we are able to see that there is 320 bytes on the endpoint one. But it's the communication. It's noted completed because there were no zero and packet or packet with smaller size. So microcontroller send the data PC was able to receive but was not propagated to the upper layer as all the condition were not fulfilled. So let's try to change to 63 bytes. And in this configuration, everything should be visible without any kind of problem for the application. Okay, we need to close before it will be open. Also, I restart the analyzer and we can run the application. So it's connected. And now I'm pressing the button and I'm able to see that the data are correctly received by the PC application. And inside in the analyzer communication, I'm able to see one, two, three, four, five packet sent and the last transfer was not completed. So this is correct. So how we should handle to have the universal flow even with the maximum packet size to be more effective. So we change again back to use the maximum packet size for our transfers. But after that, we also need to send a zero and packet if we are as we are sending the maximum data size. In the application, it should be checked more automatically not to send a zero and packet every time. But for the demonstration purpose, we want to simplify. So again, we want to check that previous transfer was finished. So in the while, the Tx state is not equal zero. We are waiting in a loop. And after that, we send a message with zero length. So this should show us that four five packet with 64 bytes were sent. And also we should be able to see them in the application. So let's reconnect and run the application in the termite. We will connect everything is set. So let's press the button data are here. And in the analyzer communication in a few moments, we are able to see again 320 bytes. So everything was set and also transferred to upper layer. So now the PC is capable to see all the communication coming from the microcontroller. So this is all about the zero and packet behavior for the USB. So please be aware.