add support for at32f415 and at32f413 #6626
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add support for artery at32f415 and at32f413 . They are almost fully compatible with stm32f103 ,but have higher clock and little difference. The at32f413 need to set RCC_CFGR_PLLRANGE in RCC_CFGR register when PLL range great than 72Mhz . The RCC_CFGR_PLLRANGE bit is reserved in stm32f103 series . While at32f415 do not need to set RCC_CFGR_PLLRANGE bit . They can run stably at 120Mhz . The RCC_CFGR_USBPRE_DIV2_5 use bit 23 which is also reserved in stm32f103 series .
at32f413 can run usb and canbus ,but need to make small change in usbfs.c .
at32f415 can only run canbus at now .
There are some changes in i2c.c for at32f413/at32f415 running i2c at the speed of 100k and 400k .
signed-off-by: Albert Lin [email protected]