nuttx/arch/arm/src/stm32f7
Alan Carvalho de Assis 19fd0a5587 stm32xx: Fix RTC drift when using HSE
When using HSE to clock RTC NuttX internal time is gaining 5.5 second per
minute. Problem was NuttX using 7182 for one of the RTC division factors,
it should have been 7812. The incorrect factors used are 7182 and 0xff.

These are used in 3-4 places within Nuttx and other places as 7812 and 0xff.
However, the STMicro app note AN4759 suggests using 7999 and 124, which is
what I've used.

Explanation: These 2 factors are used to divide the HSE clock (which at this
point is 1 MHz) to 1 Hz for the RTC hardware.
To test the 2 factors, add 1 to both numbers and multiply them together.
The result needs to be as close as possible to 1 MHz.
The suggested values of 7999 and 124 => 8000*125 = 1,000,000, the prime
factors. So, the best fix for Nuttx would be these values.

Issue discovered and fixed by Peter Moody
2022-06-21 17:58:10 +03:00
..
hardware include: fix double include pre-processor guards 2022-01-16 11:11:14 -03:00
chip.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
Kconfig Remove the double blank line from source files 2022-02-20 20:10:14 +01:00
Make.defs arch/cortex-m/Make.defs: unify arch common source include 2022-04-30 21:50:16 +08:00
stm32_adc.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_adc.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_alarm.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_allocateheap.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_bbsram.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_bbsram.h arch: Author David Sidrane: update licenses to Apache 2021-03-22 19:28:38 -07:00
stm32_can.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_can.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_capture.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_capture.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_config.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32_dbgmcu.h arch: Author David Sidrane: update licenses to Apache 2021-03-22 19:28:38 -07:00
stm32_dma2d.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_dma2d.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_dma.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_dma.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_dtcm.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_dtcm.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_dumpgpio.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_ethernet.c devif: remove all devif_timer 2022-06-02 20:11:50 -03:00
stm32_ethernet.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32_exti_alarm.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_exti_gpio.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_exti_pwr.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_exti_pwr.h arch: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
stm32_exti_wakeup.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_exti.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32_flash.c progmem: eliminate PROGMEM_ERASESTATE configuration option 2022-03-22 10:01:41 -03:00
stm32_fmc.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_fmc.h
stm32_gpio.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_gpio.h Fix typos in comments and identifiers 2021-07-19 22:55:30 -03:00
stm32_i2c.c arch/i2c: Change xxx_i2c_tousecs to xxx_i2c_toticks 2022-05-15 23:22:01 +03:00
stm32_i2c.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_irq.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_lowputc.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_lowputc.h arch: arm: stm: fix nxstyle errors 2021-03-31 00:59:15 -05:00
stm32_lse.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_lsi.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_ltdc.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_ltdc.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_mpuinit.c stm32f7:Support CONFIG_MPU_RESET and CONFIG_ARM_MPU_EARLY_RESET 2021-10-23 03:58:26 -05:00
stm32_mpuinit.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32_otg.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_otgdev.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_otghost.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_pm.h arch: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
stm32_pminitialize.c pm: Move pm_initialize call from driver_initialize to xxx_pminitialize 2022-04-22 14:36:27 +03:00
stm32_pmsleep.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_pmstandby.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_pmstop.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_pwm.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_pwm.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_pwr.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_pwr.h arch: Author David Sidrane: update licenses to Apache 2021-03-22 19:28:38 -07:00
stm32_qencoder.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_qencoder.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_qspi.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_qspi.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_rcc.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_rcc.h arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_rng.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_rtc_lowerhalf.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_rtc.c stm32xx: Fix RTC drift when using HSE 2022-06-21 17:58:10 +03:00
stm32_rtc.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_sai.c Fixed the bug that prevented the code from working in uninitialized 2022-05-09 10:34:29 +08:00
stm32_sai.h Added functionality for Audio support with the STM32F746 Discoboard 2022-05-07 11:52:51 -03:00
stm32_sdmmc.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_sdmmc.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_serial.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_spi.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_spi.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_start.c nuttx: fix typos in comments 2022-05-14 23:45:52 +08:00
stm32_start.h include: fix double include pre-processor guards 2022-01-16 11:11:14 -03:00
stm32_tickless.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_tim_lowerhalf.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_tim.c arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_tim.h arch/arm: Remove FAR and CODE from chip folder(3) 2022-05-03 16:50:52 +03:00
stm32_timerisr.c arch: Merge up_arch.h into up_internal.h 2022-03-14 09:32:17 +02:00
stm32_uart.h arch: arm: stm: fix nxstyle errors 2021-03-31 00:59:15 -05:00
stm32_uid.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
stm32_uid.h include: fix double include pre-processor guards 2022-01-16 11:11:14 -03:00
stm32_usbhost.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32_userspace.c arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32_userspace.h arch: arm: stm: Author Gregory Nutt: update licenses to Apache 2021-03-31 00:59:15 -05:00
stm32f72xx73xx_rcc.c stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI. Prefer Kconfig option instead. 2021-05-16 01:02:51 -07:00
stm32f74xx75xx_rcc.c stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI. Prefer Kconfig option instead. 2021-05-16 01:02:51 -07:00
stm32f76xx77xx_rcc.c stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI. Prefer Kconfig option instead. 2021-05-16 01:02:51 -07:00