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

Invalid read operation on inverted pin #5

Open
vnodeng opened this issue Apr 19, 2015 · 0 comments
Open

Invalid read operation on inverted pin #5

vnodeng opened this issue Apr 19, 2015 · 0 comments

Comments

@vnodeng
Copy link

vnodeng commented Apr 19, 2015

On STM32, it seems that unshifted port inversion mask applied to the shifted value upon PinRead() function. For example, if the following pin list used:
Pa1Inv, Pb2Inv, Pb3Inv, Pb4Inv, Pb5Inv, Pc10Inv, Pc11Inv, Pc12Inv,
it could be noted, that after read of PortC, value of three bits copied to the right position, then masked (we get 0xe0 in the case of all ones) and then inverted using 0x1c00 mask which is wrong and looks like unshifted PortC mask.

Compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303 (release) [ARM/embedded-4_9-branch revision 221220]

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

No branches or pull requests

1 participant