-
1. Re: USBUART can not receive data from HOST(PC)
AnkitaS_51 Jun 26, 2019 9:23 PM (in response to muto_1207481)Hello,
Can you please check the project attached.In this project USBUART_DataIsReady () function gives non-zero value.
Thanks,
Ankita
-
2. Re: USBUART can not receive data from HOST(PC)
muto_1207481 Jun 27, 2019 12:49 AM (in response to AnkitaS_51)Changed as follows according to the sample code
The result was the same.
if(USBUART_DataIsReady() > 0) --> if(USBUART_DataIsReady() != 0)
-
3. Re: USBUART can not receive data from HOST(PC)
AnkitaS_51 Jun 27, 2019 1:29 AM (in response to muto_1207481)I didn't meant that that changing if(USBUART_DataIsReady() > 0) to if(USBUART_DataIsReady() != 0) will help.
I meant check whether you are using USBUART_DataIsReady() at correct place in code.
Can you share your project.
-
4. Re: USBUART can not receive data from HOST(PC)
muto_1207481 Jun 27, 2019 5:57 PM (in response to AnkitaS_51)It’s ok.
I attached the circuit diagram and the project.
please confirm.
-
S270F100.lzh.zip 4.0 MB
-
Circuit.lzh.zip 450.2 K
-
-
5. Re: USBUART can not receive data from HOST(PC)
AnkitaS_51 Jun 28, 2019 3:21 AM (in response to muto_1207481)Hello,
I cannot open the PSoC Creator project attached in PSoC Creator 4.2.
Can you please open the PSoC Creator project in PSoC Creator 4.2, then right click it and choose to Archive it with option " Complete".
Then send that archived project available in Archive named Folder available within the .cydsn project folder.
Thanks,
Ankita
-
6. Re: USBUART can not receive data from HOST(PC)
muto_1207481 Jun 28, 2019 9:11 PM (in response to AnkitaS_51)Hellow
Send archive file created with Psoc 4.2.
Please check it out.
-
7. Re: USBUART can not receive data from HOST(PC)
muto_1207481 Jun 28, 2019 9:49 PM (in response to AnkitaS_51)Hellow
I have additional information.
1. Device manager in windows 10State. (Refer to attached file)
2. Currently in 106 lines while () function.There is a problem.
If bypass this function,
Line 135 from DO {}, It has been confirmed that the series of operations are working properly.
Thank you.
-
Device Mana.pdf 110.6 K
-
-
8. Re: USBUART can not receive data from HOST(PC)
AnkitaS_51 Jul 1, 2019 10:48 PM (in response to muto_1207481)Hi,
Your observation is correct.
In your project attached, you are checking USBUART_DataIsReady() only once in while (Flag) condition body, but if you move the USBUART_DataIsReady() and corresponding code to do while(1) function body, USBUART_DataIsReady() is returning non zero when it receives data from terminal.
I have verified this and attaching the modified project.
Thanks,
Ankita
-
S270F100.cyprj.Archive01.zip 3.7 MB
-
-
9. Re: USBUART can not receive data from HOST(PC)
muto_1207481 Jul 3, 2019 6:49 PM (in response to AnkitaS_51)As a result of checking the operation of the changed program, it has been confirmed that it is operating properly.
So I checked the original code again, I found a big mistake.
A series of codes in the USB_Initialize () function It was as follows.
USBUART_Start(0, USBUART_3V_OPERATION);
while(USBUART_GetConfiguration()) {};
USBUART_CDC_Init();
So I changed it as follows All solved.
;
while(0==USBUART_GetConfiguration()) {};
;
Thank you
-
10. Re: USBUART can not receive data from HOST(PC)
muto_1207481 Jul 7, 2019 5:25 PM (in response to AnkitaS_51)Hi
Finally
The process for closing this subject is What should I do?
Thanks
-
11. Re: USBUART can not receive data from HOST(PC)
AnkitaS_51 Jul 12, 2019 12:09 AM (in response to muto_1207481)Hello,
The things to be noted down is :
>> Move the USBUART_DataIsReady() and corresponding code to do while(1) function body, USBUART_DataIsReady() is returning non zero when it receives data from terminal otherwise if you check at a time instance when it has not received any data from terminal, it will return zero.
>>Use
while(0==USBUART_GetConfiguration()) {};
instead of
while(USBUART_GetConfiguration()) {};
Thanks,
Ankita