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

STM32 - CAN - Fix RTR position bit in TX mailbox register #5610

Merged
merged 1 commit into from Dec 12, 2017

Conversation

Projects
None yet
4 participants
@garivetm
Contributor

garivetm commented Nov 28, 2017

  • Bug fix
  • Target STM32, Peripheral CAN

Description

The RTR bit that defines the type of CAN message (Data or Remote) was written as bit0 in CAN_TIxR (the CAN TX mailbox).
According to Reference Manual p. 1606 of STM32L476RG, also verified for STM32F103, STM32F302 (seems to be the same for all STM32 offering CAN:

Bit 0 TXRQ: Transmit mailbox request
Set by software to request the transmission for the corresponding mailbox.
Cleared by hardware when the mailbox becomes emp

Bit 1 RTR: Remote transmission request
0: Data frame
1: Remote frame

The RTR bit has been shifted by 1 to the left in order to put it in the right place.

Consequences

Bad behavior observed : Only Data message were sent, even if CAN::write(CANMessage msg) was called with a Remote-type message as argument.

After fix : Remote messages are correctly sent.

@bcostm

bcostm approved these changes Nov 29, 2017

Thanks for the fix. LGTM.

@0xc0170 0xc0170 added the needs: CI label Nov 29, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Dec 1, 2017

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Dec 1, 2017

Build : SUCCESS

Build number : 636
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5610/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Dec 5, 2017

/morph export-build

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Dec 5, 2017

@0xc0170 0xc0170 merged commit 84192fe into ARMmbed:master Dec 12, 2017

6 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment