Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_Atmel/TARGET_SAM_CortexM0P/pwmout_api.c
- Revision:
- 171:89b338f31ef1
- Parent:
- 149:156823d33999
diff -r 19eb464bc2be -r 89b338f31ef1 targets/TARGET_Atmel/TARGET_SAM_CortexM0P/pwmout_api.c
--- a/targets/TARGET_Atmel/TARGET_SAM_CortexM0P/pwmout_api.c Thu Aug 03 13:13:39 2017 +0100
+++ b/targets/TARGET_Atmel/TARGET_SAM_CortexM0P/pwmout_api.c Wed Aug 16 18:27:13 2017 +0100
@@ -60,7 +60,7 @@
freq_hz = system_gclk_gen_get_hz(obj->clock_source);
- for (i=0; i<sizeof(tcc_prescaler); i++) {
+ for (i=0; i<sizeof(tcc_prescaler) / sizeof(tcc_prescaler[0]); i++) {
div_freq = freq_hz >> tcc_prescaler[i];
if (!div_freq) break;
us_per_cycle = 1000000.00 / div_freq;


