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

Multiple start of MC service #176

Merged
merged 9 commits into from
Mar 25, 2021
Merged

Multiple start of MC service #176

merged 9 commits into from
Mar 25, 2021

Conversation

marcoaccame
Copy link
Contributor

@marcoaccame marcoaccame commented Mar 22, 2021

As investigated in #174, the ems, mc4plus and mc2plus need a fix which solves their disappearance when yarprobotinterface is started / stopped several times.

This PR solves the problem.

As described in #174 (comment), the change was extensively tested, so it is ready to be merged.

A dual PR on icub-firmware-build is available so that we can merge both of them at the same time.

…oder_init_indexes_flags() is called multiple times.

- added protection inside hal_quadencoder_init_indexes_flags() so that the IRQ Handler in its inside is configured and started
  only if it was not already started or if it was stopped before.
- added a new hal_quadencoder_deinit_indexes_flags() which stops the IRQ handler for a sefe use of multiple cycles of
  {init(), deinit()}.
multiple cycles of {init(), deinit()} of the spiencoder wasted heap because the cleaning phase of deinit() was
incomplete. now we either clean everything (if macro SPIENC_DEINIT_DEALLOCATE_HEAP is defined) or we try to
keep the memory in order to avoid delete / new situations in runtime. (this latter is the default mode).
The function eo_currents_watchdog_Initialise() is called several times in runtime and did not have a protection for it
and kept on allocating small chunks of memory. Solved that by using static RAM.
…der_init_indexes_flags() + memory leaks in spienc
…efined

as successfully tested on iCubGenova04 on 19mar2021
@marcoaccame
Copy link
Contributor Author

tested the binaries once more (see robotology/icub-firmware-build#25 (comment))

@marcoaccame marcoaccame merged commit 182201c into robotology:devel Mar 25, 2021
@marcoaccame marcoaccame deleted the fix/multiplestartofmc branch October 13, 2022 15:37
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.

1 participant