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

nxp: kinetis: decrease LPUART RAM usage #2610

Merged
merged 1 commit into from Jun 1, 2021

Conversation

utzig
Copy link
Member

@utzig utzig commented May 31, 2021

Refactor LPUart driver to only allocated RAM proportional to the number of enabled Uarts; each UART uses about 230 bytes for its state, so having a single UART enabled should provide a significant reduction in RAM usage.

The driver's flash usage was also reduced, by about 20% when a single UART is being used.

@utzig utzig requested review from mlaz and kasjer May 31, 2021 15:33
@utzig utzig force-pushed the refactor-kinetis-lpuart branch 2 times, most recently from 5d83674 to d4ba161 Compare May 31, 2021 21:04
@utzig utzig changed the title nxp: kinetis: decrease RAM usage nxp: kinetis: decrease LPUART RAM usage May 31, 2021
Copy link
Contributor

@kasjer kasjer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

hw/mcu/nxp/kinetis/src/hal_lpuart.c Outdated Show resolved Hide resolved
hw/mcu/nxp/kinetis/src/hal_lpuart.c Outdated Show resolved Hide resolved
hw/mcu/nxp/kinetis/src/hal_lpuart.c Outdated Show resolved Hide resolved
hw/mcu/nxp/kinetis/src/hal_lpuart.c Outdated Show resolved Hide resolved
@utzig utzig force-pushed the refactor-kinetis-lpuart branch 2 times, most recently from b6f600f to ef58b6c Compare June 1, 2021 10:16
Refactor LPUART driver to only allocated RAM proportional to the number
of enabled Uarts; each UART uses about 230 bytes for its state, so
having a single UART enabled should provide a significant reduction in
RAM usage.

The driver's flash usage was also reduced, by about 20% when a single
UART is being used.

Signed-off-by: Fabio Utzig <utzig@apache.org>
@utzig utzig merged commit 63e14b7 into apache:master Jun 1, 2021
@utzig utzig deleted the refactor-kinetis-lpuart branch June 1, 2021 11:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants