Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[New series] STM32MP1xx (just Cube package)#605

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 8 commits intostm32duino:masterfromkbumsik:stm32mp1xx-package
Oct 24, 2019

Conversation

@kbumsik
Copy link
Contributor

@kbumsikkbumsik commentedAug 20, 2019
edited by fpistm
Loading

Summary

This PR adds STM32CubeMP1 package. In detail this adds the following:

  • STM32CubeMP1 CMSIS
  • STM32CubeMP1 HAL
  • OpenAMP middleware from STM32CubeMP1. This is used for serial-like communications between the host MPU (Cortex-A7) and the Arduino MCU (Cortex-M4).
  • Some simple and tedious fixes for Arduino Core

I'm currently working on STM32MP157 Discovery boards port. While the work is pretty much done and I will make a new PR for it soon (hopefully in this week), for now I would like to make a separate PR that just adds a STM32CubeMP1 package so that it will reduce excessive noises in the next PR.

I pulled STM32CubeMP1 v1.1.0 from itsGithub release directly.


This change is Reviewable

@kbumsikkbumsik changed the title[New line] STM32MP1xx (just STM32CubeMP1 package)[New line] STM32MP1xx (just Cube package)Aug 20, 2019
@kbumsikkbumsik changed the title[New line] STM32MP1xx (just Cube package)[New seris] STM32MP1xx (just Cube package)Aug 20, 2019
@fpistmfpistm added the new variantAdd support of new bard labelAug 20, 2019
@kbumsikkbumsik changed the title[New seris] STM32MP1xx (just Cube package)[New series] STM32MP1xx (just Cube package)Aug 20, 2019
@fpistmfpistm self-requested a reviewAugust 20, 2019 06:28
@fpistm
Copy link
Member

Hi@kbumsik
Thanks for this PR, I will review it soon.

@fpistm
Copy link
Member

For Astyle issue, you should addsystem/Middlewares/OpenAMP/
inhttps://github.com/stm32duino/Arduino_Core_STM32/blob/master/CI/astyle/.astyleignore

@kbumsik
Copy link
ContributorAuthor

kbumsik commentedAug 20, 2019
edited
Loading

Thanks for mentioning about Astyle.

BTW I need to discuss one thing for the upcoming PR. As STM32MP1 is indeed a special board among other STM32 MCUs, it is necessary to include a new README document on how to use STM32MP1 Discovery board with Arduino IDE. For example, instructions about a special upload tool (STM32Prog is not supported) and some warnings regarding collision of Arduino binary and Linux device tree.

Where is the best place to put the READMEs? Maybe inArduino_Core_STM32/variants/__STM32MP1_Boards__?

@fpistm
Copy link
Member

Where is the best place to put the READMEs? Maybe inArduino_Core_STM32/variants/__STM32MP1_Boards__?

Good question, I guess, as a first step, this could be add in the variant.

kbumsik reacted with thumbs up emoji

@fpistm
Copy link
Member

Hi@kbumsik

I'm currently working on STM32MP157 Discovery boards port. While the work is pretty much done and I will make a new PR for it soon (hopefully in this week)

Do you succeed?

@kbumsik
Copy link
ContributorAuthor

kbumsik commentedSep 27, 2019
edited
Loading

@fpistm Pretty much, except I2C is not working properly for unknown reasons and that is the only reason I haven't made a PR for weeks :(
I think it's the time I should just open a PR as a WIP for now to show the progress. I will open it after the weekend, since this will be pretty big PR. Are you planning to review the current PR after that?

@fpistm
Copy link
Member

OK thanks for the quick feedback.
I will try to get a board then I will be able to review and test.

@kbumsik
Copy link
ContributorAuthor

kbumsik commentedSep 27, 2019
edited
Loading

Great, I got another person who can test the actual hardware :D I will soon make a PR then.

fpistm reacted with thumbs up emoji

@fpistm
Copy link
Member

Hi@kbumsik
I will made a new PR with the latest CubeFw and updated path as the HAL/LL source files are now in a built-in library.

@fpistmfpistm added this to the1.8.0 milestoneOct 15, 2019
@aedancullen
Copy link

If you need another person to test on hardware, I also have a STM32MP157C-DK2 board and will be working on getting this up and running.

kbumsik reacted with thumbs up emoji

@fpistm
Copy link
Member

Hi@aedancullen
thanks for your proposition, any help are welcome.
I will update the MP1 Cube package because there is a new version and the way it is integrated in the core has changed since this PR was done.
Anyway,@kbumsik variant is always correct, so I'm waiting his PR for the variant.

@kbumsikkbumsik mentioned this pull requestOct 22, 2019
2 tasks
@kbumsik
Copy link
ContributorAuthor

kbumsik commentedOct 22, 2019
edited
Loading

@fpistm@aedancullen I was quite busy for a moment but now I can make a PR:#717 :)
I updated the Cube library to 1.1.0.
The weird thing is, that the some issues with peripherals like I2C I mentioned suddenly disappeared after I updated the Cube library and rebasing it to the latest master. Now all peripherals looks fine...😮 I don't know what happened but it is a good thing anyway.

#717 also has the same commits as this PR. I will clean up#717 after this PR is merged.

Though the hardware issues seems to be resolved, I would appreciate if anyone test my PR :)

fpistm reacted with thumbs up emoji

@fpistm
Copy link
Member

fpistm commentedOct 24, 2019
edited
Loading

Thanks@kbumsik for the update

It misses the HAL version in thehttps://github.com/stm32duino/Arduino_Core_STM32/blob/master/system/Drivers/STM32YYxx_HAL_Driver_version.md

During my review I found 3 files diff in the HAL (compare to the one installed by CubeMX 5.4.0):

3 files diff

--- Arduino_Core_STM32/system/Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_hal_tim_ex.h+++ STM32Cube/Repository/STM32Cube_FW_MP1_V1.1.0/Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_hal_tim_ex.h@@ -261,7 +261,13 @@ #define IS_TIM_BREAKINPUT(__BREAKINPUT__)  (((__BREAKINPUT__) == TIM_BREAKINPUT_BRK)  || \                                             ((__BREAKINPUT__) == TIM_BREAKINPUT_BRK2))+#if defined(COMP1) && defined(COMP2)+#define IS_TIM_BREAKINPUTSOURCE(__SOURCE__)  (((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN)  || \+                                              ((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP1) || \+                                              ((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP2))+#else #define IS_TIM_BREAKINPUTSOURCE(__SOURCE__)  ((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN)+#endif /* COMP1 && COMP2 */  #define IS_TIM_BREAKINPUTSOURCE_STATE(__STATE__)  (((__STATE__) == TIM_BREAKINPUTSOURCE_DISABLE)  || \                                                    ((__STATE__) == TIM_BREAKINPUTSOURCE_ENABLE))
--- Arduino_Core_STM32/system/Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_ll_tim.h+++ STM32Cube/Repository/STM32Cube_FW_MP1_V1.1.0/Drivers/STM32MP1xx_HAL_Driver/Inc/stm32mp1xx_ll_tim.h@@ -122,13 +122,13 @@ /* Generic bit definitions for TIMx_AF1 register */ #define TIMx_AF1_BKINE          TIM1_AF1_BKINE       /*!< BRK BKINE input enable */ #if defined(DFSDM1_Channel0)-#define TIMx_AF1_BKDFBKE        TIM1_AF1_BKDF1BK0E     /*!< BRK DFSDM1_BREAK[0] enable */+#define TIMx_AF1_BKDFBKE        TIM1_AF1_BKDFBKE     /*!< BRK DFSDM1_BREAK[0] enable */ #endif /* DFSDM1_Channel0 */ #define TIMx_AF1_BKINP        TIM1_AF1_BKINP       /*!< BRK BKIN input polarity */ /* Generic bit definitions for TIMx_AF2 register */ #define TIMx_AF2_BK2INE         TIM1_AF2_BK2INE      /*!< BRK B2KINE input enable */ #if defined(DFSDM1_Channel0)-#define TIMx_AF2_BK2DFBKE       TIM1_AF2_BK2DF1BK1E    /*!< BRK DFSDM_BREAK[0] enable */+#define TIMx_AF2_BK2DFBKE       TIM1_AF2_BK2DFBKE    /*!< BRK DFSDM_BREAK[0] enable */ #endif /* DFSDM1_Channel0 */ #define TIMx_AF2_BK2INP       TIM1_AF2_BK2INP      /*!< BRK BK2IN input polarity */ #define TIMx_AF1_ETRSEL    TIM1_AF1_ETRSEL    /*!< TIMx ETR source selection */@@ -1058,6 +1058,8 @@   * @{   */ #define LL_TIM_BKIN_SOURCE_BKIN                TIM1_AF1_BKINE      /*!< BKIN input from AF controller */+#define LL_TIM_BKIN_SOURCE_BKCOMP1             TIM1_AF1_BKCMP1E    /*!< internal signal: COMP1 output */+#define LL_TIM_BKIN_SOURCE_BKCOMP2             TIM1_AF1_BKCMP2E    /*!< internal signal: COMP2 output */ #define LL_TIM_BKIN_SOURCE_DF1BK               TIM1_AF1_BKDF1BK0E  /*!< internal signal: DFSDM1 break output */ /**   * @}@@ -3731,8 +3733,12 @@   * @note Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether   *       or not a timer instance allows for break input selection.   * @rmtoll AF1          BKINE         LL_TIM_EnableBreakInputSource\n+  *         AF1          BKCMP1E       LL_TIM_EnableBreakInputSource\n+  *         AF1          BKCMP2E       LL_TIM_EnableBreakInputSource\n   *         AF1          BKDF1BK0E     LL_TIM_EnableBreakInputSource\n   *         AF2          BK2INE        LL_TIM_EnableBreakInputSource\n+  *         AF2          BK2CMP1E      LL_TIM_EnableBreakInputSource\n+  *         AF2          BK2CMP2E      LL_TIM_EnableBreakInputSource\n   *         AF2          BK2DF1BK1E    LL_TIM_EnableBreakInputSource   * @param  TIMx Timer instance   * @param  BreakInput This parameter can be one of the following values:@@ -3740,6 +3746,8 @@   *         @arg @ref LL_TIM_BREAK_INPUT_BKIN2   * @param  Source This parameter can be one of the following values:   *         @arg @ref LL_TIM_BKIN_SOURCE_BKIN+  *         @arg @ref LL_TIM_BKIN_SOURCE_BKCOMP1+  *         @arg @ref LL_TIM_BKIN_SOURCE_BKCOMP2   *         @arg @ref LL_TIM_BKIN_SOURCE_DF1BK   * @retval None   */@@ -3754,8 +3762,12 @@   * @note Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether   *       or not a timer instance allows for break input selection.   * @rmtoll AF1          BKINE         LL_TIM_DisableBreakInputSource\n+  *         AF1          BKCMP1E       LL_TIM_DisableBreakInputSource\n+  *         AF1          BKCMP2E       LL_TIM_DisableBreakInputSource\n   *         AF1          BKDF1BK0E     LL_TIM_DisableBreakInputSource\n   *         AF2          BK2INE        LL_TIM_DisableBreakInputSource\n+  *         AF2          BK2CMP1E      LL_TIM_DisableBreakInputSource\n+  *         AF2          BK2CMP2E      LL_TIM_DisableBreakInputSource\n   *         AF2          BK2DF1BK1E    LL_TIM_DisableBreakInputSource   * @param  TIMx Timer instance   * @param  BreakInput This parameter can be one of the following values:@@ -3763,6 +3775,8 @@   *         @arg @ref LL_TIM_BREAK_INPUT_BKIN2   * @param  Source This parameter can be one of the following values:   *         @arg @ref LL_TIM_BKIN_SOURCE_BKIN+  *         @arg @ref LL_TIM_BKIN_SOURCE_BKCOMP1+  *         @arg @ref LL_TIM_BKIN_SOURCE_BKCOMP2   *         @arg @ref LL_TIM_BKIN_SOURCE_DF1BK   * @retval None   */@@ -3777,14 +3791,19 @@   * @note Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether   *       or not a timer instance allows for break input selection.   * @rmtoll AF1          BKINP         LL_TIM_SetBreakInputSourcePolarity\n+  *         AF1          BKCMP1P       LL_TIM_SetBreakInputSourcePolarity\n+  *         AF1          BKCMP2P       LL_TIM_SetBreakInputSourcePolarity\n   *         AF2          BK2INP        LL_TIM_SetBreakInputSourcePolarity\n+  *         AF2          BK2CMP1P      LL_TIM_SetBreakInputSourcePolarity\n+  *         AF2          BK2CMP2P      LL_TIM_SetBreakInputSourcePolarity   * @param  TIMx Timer instance   * @param  BreakInput This parameter can be one of the following values:   *         @arg @ref LL_TIM_BREAK_INPUT_BKIN   *         @arg @ref LL_TIM_BREAK_INPUT_BKIN2   * @param  Source This parameter can be one of the following values:   *         @arg @ref LL_TIM_BKIN_SOURCE_BKIN-  *         @arg @ref LL_TIM_BKIN_SOURCE_DF1BK+  *         @arg @ref LL_TIM_BKIN_SOURCE_BKCOMP1+  *         @arg @ref LL_TIM_BKIN_SOURCE_BKCOMP2   * @param  Polarity This parameter can be one of the following values:   *         @arg @ref LL_TIM_BKIN_POLARITY_LOW   *         @arg @ref LL_TIM_BKIN_POLARITY_HIGH
--- Arduino_Core_STM32/system/Drivers/STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_tim_ex.c+++ STM32Cube/Repository/STM32Cube_FW_MP1_V1.1.0/Drivers/STM32MP1xx_HAL_Driver/Src/stm32mp1xx_hal_tim_ex.c@@ -1826,6 +1826,24 @@       bkin_polarity_bitpos = TIM1_AF1_BKINP_Pos;       break;     }+#if defined(COMP1) && defined(COMP2)+    case TIM_BREAKINPUTSOURCE_COMP1:+    {+      bkin_enable_mask = TIM1_AF1_BKCMP1E;+      bkin_enable_bitpos = TIM1_AF1_BKCMP1E_Pos;+      bkin_polarity_mask = TIM1_AF1_BKCMP1P;+      bkin_polarity_bitpos = TIM1_AF1_BKCMP1P_Pos;+      break;+    }+    case TIM_BREAKINPUTSOURCE_COMP2:+    {+      bkin_enable_mask = TIM1_AF1_BKCMP2E;+      bkin_enable_bitpos = TIM1_AF1_BKCMP2E_Pos;+      bkin_polarity_mask = TIM1_AF1_BKCMP2P;+      bkin_polarity_bitpos = TIM1_AF1_BKCMP2P_Pos;+      break;+    }+#endif /* COMP1 && COMP2 */      default:     {

@fpistm
Copy link
Member

fpistm commentedOct 24, 2019
edited
Loading

I think I found the issue they made some update after GitHub release 1.1.0:
STMicroelectronics/STM32CubeMP1@0e09d0c
So in fact you added the 1.1.0 + 1 commit ;)

That's fine.

@fpistmfpistm merged commit8110ed4 intostm32duino:masterOct 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fpistmfpistmfpistm approved these changes

Assignees

@kbumsikkbumsik

Labels

new variantAdd support of new bard

Projects

None yet

Milestone

1.8.0🎄 🎅

Development

Successfully merging this pull request may close these issues.

3 participants

@kbumsik@fpistm@aedancullen

[8]ページ先頭

©2009-2025 Movatter.jp