Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event.size in UART_BREAK is sometimes strange/wrong (IDFGH-11129) #12299

Closed
3 tasks done
Bloeckchengrafik opened this issue Sep 24, 2023 · 5 comments
Closed
3 tasks done
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@Bloeckchengrafik
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

CMD

Development Kit.

ftSwarm [https://elektrofuzzis.github.io/en/index.html]

Power Supply used.

External 3.3V

What is the expected behavior?

Working with uart, I get UART_BREAK events with the correct event.size provided.

What is the actual behavior?

Sometimes event.size has values above MAX_BUF_SIZE, sometimes up to MAX_INT.

Steps to reproduce.

  1. uart_set_mode( [UARTNUM] , UART_MODE_RS485_COLLISION_DETECT)
  2. xQueueReceive(RS485_queue, (void * )&event, 10000 )
  3. do:
switch (event.type) {
    case UART_BREAK:
        if (event.size > 512) {
            printf("%ul", event.size);
        }
}
  1. run some communication

Debug Logs.

No response

More Information.

No response

@Bloeckchengrafik Bloeckchengrafik added the Type: Bug bugs in IDF label Sep 24, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Sep 24, 2023
@github-actions github-actions bot changed the title event.size in UART_BREAK is sometimes strange/wrong event.size in UART_BREAK is sometimes strange/wrong (IDFGH-11129) Sep 24, 2023
@songruo
Copy link
Collaborator

songruo commented Sep 25, 2023

Hi @Bloeckchengrafik, event.size field is meaningless with UART_BREAK event type. The value you got is just an uninitialized number, which I am now aware of. I will fix this by initializing it to 0 in the driver to reduce confusion.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels Oct 7, 2023
@AxelLin
Copy link
Contributor

AxelLin commented Dec 6, 2023

@songruo Why it takes such long time for this trivial fix?

@igrr
Copy link
Member

igrr commented Dec 6, 2023

@AxelLin This bug has been evaluated as having low impact. The fix has been added to another (larger) change of UART driver, and that change is still being reviewed. If this bug causes trouble in your project, please let us know and we can split it and merge it separately. I think it is an easy thing to work around in the application, though.

@AxelLin
Copy link
Contributor

AxelLin commented Dec 7, 2023

@igrr
I agree this is a minor issue.
However, IMHO, you should split this fix from other rework.
One fix per issue, no matter it's high or low priority. (Not just for this issue)

When people notice the status changed to Reviewing state, people expect it to be fix soon.
But now the "Status" field becomes meaningless, because the fix is stuck due to unrelated rework.
Non-espressif people has no idea about what's going on for a trivial fix taking very long time to review.
e.g.
Is the fix get forgotten?
Or is the fix actually discovers other side-effects and is actually more complex so it takes longer time?

@AxelLin
Copy link
Contributor

AxelLin commented Apr 23, 2024

Hi @Bloeckchengrafik, event.size field is meaningless with UART_BREAK event type. The value you got is just an uninitialized number, which I am now aware of. I will fix this by initializing it to 0 in the driver to reduce confusion.

@songruo
So when will you fix this?

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Reviewing Issue is being reviewed labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

5 participants