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

Serial1.availableforwrite returns 0 #1

Closed
jayang727 opened this issue Jul 2, 2023 · 3 comments
Closed

Serial1.availableforwrite returns 0 #1

jayang727 opened this issue Jul 2, 2023 · 3 comments

Comments

@jayang727
Copy link

I discovered that Serial1.availableforwrite always returns 0. I suspect this is causing blocking and interrupting thread1 and 2 from properly receiving and saving.

Is this normal for OLA or do I need to change some config to set up a non-zero buffer to Tx?

Thank you.

@PaulZC
Copy link
Collaborator

PaulZC commented Jul 2, 2023

Hi @jayang727 ,

I cannot find Serial1.availableforwrite anywhere in the code. Did you mean Serial1.available() ? Unless this is something to do with the Print class ?

Can you please tell me which line(s) in which file you are referring to?

Best wishes,
Paul

@jayang727
Copy link
Author

jayang727 commented Jul 2, 2023 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Jul 3, 2023

Hi Hj (@jayang727 ),

With version 2 of the Apollo3 core, it looks like availableForWrite is inherited from the mbed Print class:

https://github.com/sparkfun/arduino-mbed-bridge/blob/25fe1981fe509217059f093395372e1ffcbd6335/core-api/api/Print.h#L61

But it was implemented correctly in version 1 of the core:

https://github.com/sparkfun/Arduino_Apollo3/blob/87a33ce12049ff10c6d0d7e6ab9038e4d874b36e/cores/arduino/ard_sup/uart/ap3_uart.cpp#L92-L95

Please ask your question again in the Artemis forum: https://forum.sparkfun.com/viewforum.php?f=172
paulvha knows much more about the Apollo3 (mbed) core than I do and will be able to give you a much better answer.

Best wishes,
Paul

@PaulZC PaulZC closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants