-
Notifications
You must be signed in to change notification settings - Fork 3k
[Disco_F429ZI] extensions of interrupt vectors, pin names and pin functions #544
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
Conversation
Added some missing F429 interrupt vectors
Added mostly all pin function (ADC, I2C, SPI, UART, PWM). The basis of the target was DISCO_F407. The 429 has some additional pin functions which are added with this commit. Also ports, pins and pin functions of the larger packages are added not only the available of the F429ZI package.
Changed mcu names in comments from original F407 ot F429.
Hello, in the commit 70b576d, you changed startup_stm32f429xx.s by yourself or copied the file from somewhere? Isn't that file part of ST package (driver?) ?? I am asking because we should avoid any changes in files which come from MCU partners (like that startup file is part of a library created by ST). |
// {PA_3, PWM_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9)}, // TIM9_CH2 | ||
{PA_5, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH1 | ||
// {PA_5, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM8)}, // TIM8_CH1N |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are some definitions commented out? If they are not available or there is no comment which explains why they are commented out, please remove them and provide details in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do the same thing in all Nucleos HALs in order to see all the different possibilities on the IOs. This way, it is more easy for someone to change the pinout in case the selected choice is not good for its application instead of looking deeply in the product datasheet...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate? I don't understand. Why are they commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. For example you can see that on PA_5 you can have a PWM using either Timer2/Channel1 or Timer8/Channel1N. Today I have decided to use Timer2/Channel1. But you can also notice that Timer2/Channel1 is also used on PA_0. That means that today you cannot output two different PWM signals on PA_0 and PA_5 at the same time. If someone wants this, he will need to change the timer that is used on PA_5. This is why I have let the other possibilities commented to make this change easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. I understand it now, and would propose to have that explanation there on top (why are those lines commented out).
… lines Some text to explain the commented pwm pin config. Remove some Timer5 based pwm config. The Timer5 lines are not allowed as pwm configs because the timer is used by the us_ticker as mentioned at the start of the block. I've overseen to remove these lines.
I've added a comment at the block start, partly using the good explanation above of @bcostm . And I had to remove some pwm configs because I've oversee that the are using the already used timer5. I used linker script and startup s-file from F407 target. My first attempt was using the original files from stm32cube firmware package. But also these files can't be used unchanged. If you would prefer unchanged linker and startup files I can try to change the hal. But I'm not sure if this is possible. |
@ohagendorf Thanks for adding the comment. I'll merge it now. |
HAL: Disco_F429ZI - extensions of interrupt vectors, pin names and pin functions
Added some missing F429 interrupt vectors, pin functions, port and pin names.
The basis of the target was DISCO_F407.
The STM32F429 has some additional pin functions which are added with these commits. Also all port names, pin names and pin functions of the larger packages are added not only the available ones of the F429ZI package.
The mcu name in linker script and startup file is changed to 429.