You are here

Executing a function on 4200L involving USBUART causes the code to hang? | Cypress Semiconductor

Executing a function on 4200L involving USBUART causes the code to hang?

Summary: 5 Replies, Latest post by Eirrol on 21 Nov 2016 07:37 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
user_466193552's picture
User
12 posts

Hello,

I am trying to monitor some sensor data detecting X and Y position input using USBUART. However, if I execute the function sending the data, the code will break and stop functioning. If I remove the line that executes the function, the code will run normally. I am not sure if I violated any rules using USBFS?

I have provided the main.c file as attachment below, please help!

 

 

user_1377889's picture
User
9606 posts

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

 

Bob

user_466193552's picture
User
12 posts

Here it is attached.

 

Attachments: 
user_1377889's picture
User
9606 posts

Increase the heap size (Workspace explorer -> Design wide resources -> System) to 0x0200.

 

Bob

user_466193552's picture
User
12 posts

Unfortunately this does not fix the issue... The code will execute for one iteration and stop after that. Putting it in debug mode with a line break at line 205 (count++) shows that the variable count does not increment.

user_466193552's picture
User
12 posts

Actually I figured out. I changed the statement for USBUART_CDCIsReady from while loop to a if statement and it worked. Thanks!

Log in to post new comments.