Skip to content

STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) #3843

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

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

bcostm
Copy link
Contributor

@bcostm bcostm commented Feb 27, 2017

Description

The APB2 clock was not set to the maximum possible value (80 MHz). The SPI clock can now go up to 40 MHz.

Discussion started in Issue #3735.

Status

READY

Migrations

NO

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2017

How was this tested?

@bcostm
Copy link
Contributor Author

bcostm commented Mar 1, 2017

I checked the SPI clock with a scope on L476RG device.

@helmut64
Copy link
Contributor

helmut64 commented Mar 1, 2017

Good morning, I tested the change by embedding it into my development.
The scope shows now the SCLK with 40 MHz instead and 20 MHz.

My SPI Winbond flash works as expected:
00:21:44.375473 FlashReadTest: number of reads: 1024 (each 4096 bytes), Rounds: 1
00:21:44.375792 Round: 1 Sector: 0
00:21:45.593603 Round: 1 Sector: 100
...
00:21:47.549900 Round: 1 Sector: 1000
4194304 bytes, 2227 ms, 1.80 MB/sec

The change works fine for me.
Regards Helmut

@bcostm (off topic), I did an code enhancements in the STM HAL_SPI_TransmitReceive function. It is not much, how can I provide my change to you/STM?

@bcostm
Copy link
Contributor Author

bcostm commented Mar 1, 2017

Thanks Helmut for the testing.

Concerning you HAL SPI change, please send a PR and we'll have a look into it. Thanks.

@bcostm bcostm changed the title STM32L4xx: set APB2 clock to 80MHz (instead of 40MHz) STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) Mar 1, 2017
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 1, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Mar 1, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1610

All builds and test passed!

@bcostm bcostm force-pushed the fix_stm32l4_apb2_80MHz branch from 66209eb to ae6899b Compare March 6, 2017 12:34
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 6, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Mar 6, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1642

All builds and test passed!

@0xc0170 0xc0170 merged commit 68dc253 into ARMmbed:master Mar 9, 2017
@bcostm bcostm deleted the fix_stm32l4_apb2_80MHz branch March 9, 2017 16:02
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files ARMmbed/mbed-os#3716
3741: STM32 remove warning in hal_tick_32b.c file ARMmbed/mbed-os#3741
3780: STM32L4 : Fix GPIO G port compatibility ARMmbed/mbed-os#3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) ARMmbed/mbed-os#3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os ARMmbed/mbed-os#3836
3840: STM32: gpio SPEED - always set High Speed by default ARMmbed/mbed-os#3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) ARMmbed/mbed-os#3844
3850: STM32: change spi error to debug warning ARMmbed/mbed-os#3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform ARMmbed/mbed-os#3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated ARMmbed/mbed-os#3880
3795: Fix pwm period calc ARMmbed/mbed-os#3795
3828: STM32 CAN API: correct format and type ARMmbed/mbed-os#3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization ARMmbed/mbed-os#3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) ARMmbed/mbed-os#3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. ARMmbed/mbed-os#3879
3902: Fix heap and stack size for NUCLEO_F746ZG ARMmbed/mbed-os#3902
3829: can_write(): return error code when no tx mailboxes are available ARMmbed/mbed-os#3829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants