Thanks to visit codestin.com
Credit goes to github.com

Skip to content

L4 integration: Modification to mphalport. #1921

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

Closed
wants to merge 1 commit into from

Conversation

tobbad
Copy link
Contributor

@tobbad tobbad commented Mar 22, 2016

This is the 9th PR in a series (#1888, #1890, #1903, #1904, #1916, #1917, #1918, #1919, #1920 ) of PR to support the STM32L4 series in micropython. (see http://forum.micropython.org/viewtopic.php?f=12&t=1332&sid=64e2f63af49643c3edee159171f4a365)

This PR is independent of earlier PR.

@@ -104,15 +104,15 @@ void mp_hal_gpio_clock_enable(GPIO_TypeDef *gpio) {
} else if (gpio == GPIOH) {
__GPIOH_CLK_ENABLE();
#endif
#ifdef __GPIOI_CLK_ENABLE
#if defined(GPIOI) && defined(__GPIOI_CLK_ENABLE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the reason for this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__GPIOI_CLK_ENABLE on L4 is defined in h1l/l4/inc/Legacy/stm32_hal_legacy.h, line 2214 as __HAL_RCC_GPIOI_CLK_ENABLE and this is no further defined on the l4 platform. Therefore I added the test for GPIOI which is not defined on l4 platform and both functions are needed to fullfill the code. According to the Reference Manual (RM0351, P277) the port can be A.H and there is no I, J ....

An alternative would be to check for the MCU_SERIES_L4 define.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into some of these when doing the M7 port as well.
Upgrading the latest F4 HAL (and changing all of the old defintions to the new ones) would help, then we could get rid of the legacy definitions. But that's also alot of work.

@dpgeorge
Copy link
Member

Thanks for the clarification. Merged in dda1a41.

@dpgeorge dpgeorge closed this Apr 21, 2016
@tobbad tobbad deleted the l4_integration_mphalport branch May 7, 2016 14:57
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.

3 participants