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

add board: DshanMCU Pitaya Lite #1882

Merged
merged 4 commits into from Mar 17, 2023
Merged

add board: DshanMCU Pitaya Lite #1882

merged 4 commits into from Mar 17, 2023

Conversation

koendv
Copy link
Contributor

@koendv koendv commented Feb 2, 2023

Describe the PR
This PR adds support for DshanMCU Pitaya Lite and Blue Pill boards with MM32F3273 cpu.

Additional context
I have tested tinyusb on:

  • DshanMCU Pitaya Lite with MM32F3273G8P
  • WeAct Blue Pill boards with the STM32F103 replaced by a MM32F3273G6P

tinyusb works, but care has to be taken to choose the correct SYSCLK_FREQ.

For the MM32F3273 with a 12 MHz crystal, in tinyusb/hw/mcu/mindmotion/mm32sdk/mm32f327x/MM32F327x/Source/system_mm32f327x.c choose

#define SYSCLK_FREQ_XXMHz  (HSE_VALUE*8)      //96000000 based HSE_VALUE = 12000000

For the MM32F3273 with a 8 MHz crystal, choose

#define SYSCLK_FREQ_XXMHz  (HSE_VALUE*12)      //96000000 based HSE_VALUE = 8000000

Thank you for your useful software.

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

thank you very much for the PR, regarding the HSE_VALUE which is 12Mhz on some boards. I have updated the mm32sdk to add ifndef around the defined of SYSCLK_FREQ_XXMHz/SYSCLK_HSI_XXMHz and also add 1-DHSE_VALUE=` to board.mk that matches its hardware. This should solve this issue https://github.com/hathach/tinyusb/pull/1882/files#diff-d115a2b59f4f8d51aef8da0070cea68b35df06cb687b844eba59de2f7db7baa9R2

To be honest, mm32 isn't doing its work to maintain the driver. Requiring chaning the system_*.c file and header file to get the HSE_VALUE is a bit under par.

@hathach hathach merged commit 65ee11f into hathach:master Mar 17, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants