-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
lib: nrf_modem: trace: fixes for uart trace backend++ #11708
Conversation
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
Isn't that an issue with how we define the |
It depends. The alternative is to let the trace backend loop forever in this case instead, and log the warning there. But it will happen in some cases that the uart aborts due to flow control, where we do not want to assert. |
b3aa432
to
e9fb361
Compare
Updated to have the uart trace backend to return an error in case writing 0 bytes. This will prevent the assert and shutdown the trace processing. If the uart trace backend is not able to send traces for 5 seconds, then the traces are probably lacking anyway (the modem will drop traces). |
e9fb361
to
4e9f00f
Compare
f5e4d4d
to
703e195
Compare
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
a2e4358
to
15edde8
Compare
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
15edde8
to
7004830
Compare
* Added CEREG event tracking to ``lte_connectivity``. | ||
|
||
Updated: | ||
|
||
* The :c:func:`nrf_modem_lib_shutdown` function to allow the modem to be in flight mode (``CFUN=4``) when shutting down the modem. | ||
* The trace backends can now return ``-EAGAIN`` if the write operation can be retried. | ||
* The trace backends ``deinit`` function is expected to succeed and can no longer return an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Added CEREG event tracking to ``lte_connectivity``. | |
Updated: | |
* The :c:func:`nrf_modem_lib_shutdown` function to allow the modem to be in flight mode (``CFUN=4``) when shutting down the modem. | |
* The trace backends can now return ``-EAGAIN`` if the write operation can be retried. | |
* The trace backends ``deinit`` function is expected to succeed and can no longer return an error. | |
* Added CEREG event tracking to ``lte_connectivity``. | |
* Updated: | |
* The :c:func:`nrf_modem_lib_shutdown` function to allow the modem to be in flight mode (``CFUN=4``) when shutting down the modem. | |
* The trace backends can now return ``-EAGAIN`` if the write operation can be retried. | |
* The trace backends ``deinit`` function is expected to succeed and can no longer return an error. |
nit
Enable ASYNC UART for the UART1 instance. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Allow the trace backend to return -EAGAIN if the operation should be retried. This is advantageous compared to the backend waiting forever as we need to shut down the tracing if the modem is shut down. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
7004830
to
242154a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment otherwise looks good
include/modem/trace_backend.h
Outdated
*/ | ||
int (*deinit)(void); | ||
void (*deinit)(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best to keep it returning an int
, even if current implementations can't fail. That is still a possibility if they change or new ones are added; by removing the return value and the log it's impossible to tell if this operation failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
242154a
to
f9193f4
Compare
Cancel work items on deinit. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
f9193f4
to
ee2c781
Compare
If the UART trace backend has flow control enabled, the trace backend might abort the current send, hence 0 bytes will be written. Return an error in this case to not assert on the trace backend returning 0 bytes.