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

STM32f407_evk Board Config Issues #3

Open
Ryzee119 opened this issue Jan 16, 2020 · 2 comments
Open

STM32f407_evk Board Config Issues #3

Ryzee119 opened this issue Jan 16, 2020 · 2 comments

Comments

@Ryzee119
Copy link

Hello, great project, it is working very well for me. I did notice these small issues when working with the STM32F40 that may be worth looking at:

Confusing comment

/**USART3 GPIO Configuration
PC7 ------> USART6_RX
PC6 ------> USART6_TX
*/
GPIOC->MODER &= ~ (MODE(3,10) | MODE(3,11));
GPIOC->MODER |= (MODE(2,10) | MODE(2,11));
GPIOC->OTYPER &= ~(TYPE(1,10) | TYPE(1,11));
GPIOC->OSPEEDR |= (MODE(3,10) | MODE(3,11));
GPIOC->AFR[1] &= ~(AF(0xf,10) | AF(0xf,11));
GPIOC->AFR[1] |= (AF(GPIO_AF7_USART3,10) | AF(GPIO_AF7_USART3,11));

This comment does not reflect the actual pin numbers. Should be UART3 and PC11 and PC10

HOST_PORT_POWER_ON_FS should be active low?

#define HOST_PORT_POWER_ON_FS() \
do{\
__HAL_RCC_GPIOC_CLK_ENABLE();\
GPIOC->MODER &= ~(GPIO_MODER_MODER0 << (1*2));\
GPIOC->MODER |= (GPIO_MODER_MODER0_0 << (1*2));\
GPIOC->BSRR = GPIO_PIN_1<<16;\
}while(0)

Refer user manual page 30/34. I had to change this section of code to enable VBUS at the USB connector.

Thank you!
Regards
Ryan

@xtoolbox
Copy link
Owner

My 407 Evk board is this one, Waveshare EVK407I. The power switch use active low logic.

Thanks

@Ryzee119
Copy link
Author

Thank you, yes looks correct to that board. Nice work.

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

2 participants