Skip to content

Fix alternate function for LTDC pins PB0 PB1 #700

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

Merged
merged 2 commits into from
Nov 27, 2023
Merged

Fix alternate function for LTDC pins PB0 PB1 #700

merged 2 commits into from
Nov 27, 2023

Conversation

ierturk
Copy link
Contributor

@ierturk ierturk commented Nov 24, 2023

There is conflict between the Table 10 and Table 12 in the STM32F429 datasheet.

PB0 and PB0 have alternate function 14 according to Table 10, but they are not documented on Table 12 correctly.

PB0 -> LCD_R3
PB1 -> LCD_R6

https://www.st.com/resource/en/datasheet/stm32f429zi.pdf

Ibrahim ERTURK added 2 commits November 24, 2023 16:59
Fix alternate function for LTDC pins PB0 PB1
@burrbull
Copy link
Member

Could you link (or screenshot) datasheet with these pinouts?

@ierturk
Copy link
Contributor Author

ierturk commented Nov 27, 2023

Here is the screenshots
table10
table12

@burrbull
Copy link
Member

are there other mistakes?

@ierturk
Copy link
Contributor Author

ierturk commented Nov 27, 2023

The other LTDC pins are correct.

@burrbull burrbull added this pull request to the merge queue Nov 27, 2023
Merged via the queue into stm32-rs:master with commit 2f76eb9 Nov 27, 2023
@burrbull
Copy link
Member

burrbull commented Nov 27, 2023

What about PB0/PB1 AF9?

@burrbull
Copy link
Member

Looks like I need to revert this PR as incorrect.

@ierturk
Copy link
Contributor Author

ierturk commented Nov 27, 2023

Do we need to correct the lines in LTDC with <9> as well? There are some other lines with <9> in LTDC alternate definitions.
PA3<9>,

Without the fix, following error arises

into-alternate

@burrbull
Copy link
Member

burrbull commented Nov 27, 2023

I don't understand why you try use AF14 there. All datasheets say LTDC require PB0/PB1 and some other pins to be set in AF9. And in AF14 for other LTDC related pins.

@ierturk
Copy link
Contributor Author

ierturk commented Nov 27, 2023

Sorry, Thank you. This is my fault I did not noticed that for PB0 and PB1 needs to be set AF9 for LTDC. Please revert the merge.

@burrbull
Copy link
Member

If you trying to decrease boilerplate in user code instead of ltdc_pin macro preferred way is using enums from gpio::alt::ltdc.
See

impl Into<Self::Sck>,

or more complex case like yours: https://github.com/stm32-rs/stm32f4xx-hal/blob/master/src/fsmc_lcd/pins.rs#L222

burrbull added a commit that referenced this pull request Nov 27, 2023
@ierturk
Copy link
Contributor Author

ierturk commented Nov 27, 2023

Ok. Thank you. I'll check them.

burrbull added a commit that referenced this pull request Nov 27, 2023
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.

2 participants