Fix to ICC communication between the amc
and amc2c
board
#491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the ICC communication mode between the
amc
andamc2c
board that was not correctly working.In details
The ICC introduced in #474 has stopped working. Only the CAN is working. That is probably due to recent additions to the features of the
amc2c
board that further reduce its idle time and prevent teh ICC communication mode to work effectively because the reduced CPU time is used by other threads. The ICC requires a tight handshaking between the CM7 (amc) and teh CM4 (amc2c) because for each communication a thread on each core is locked until teh other unlocks teh shared resource.CAN is less demanding as it uses a HW peripheral.
The solution was to rise the priority of the COMM thread in the
amc2c
as well as the IRQ priority of the HSEM interrupt handler.This PR also contains some other changes:
Tests
I have tested the change on the lego setup and it works.
Tested also on ergoCub SN002. It works.
Linked PRs
The binaries:
amc
andamc2c
board icub-firmware-build#147