diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-19 10:38:23 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-19 10:38:23 -0600 |
commit | 91d76cec3450de3f1684b8e0f7ae5722e4ad9378 (patch) | |
tree | 890e701840490da674c365117c37698daef7e47c | |
parent | 5bd22ff09dbb97d2766573cb1ad6bb87d5856388 (diff) | |
download | px4-nuttx-91d76cec3450de3f1684b8e0f7ae5722e4ad9378.tar.gz px4-nuttx-91d76cec3450de3f1684b8e0f7ae5722e4ad9378.tar.bz2 px4-nuttx-91d76cec3450de3f1684b8e0f7ae5722e4ad9378.zip |
Add instructions to enable RTC in the nsh/ configuration; RTC enabled by default in the demo configuration
-rw-r--r-- | nuttx/ChangeLog | 4 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/README.txt | 76 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/demo/defconfig | 36 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/nsh/defconfig | 18 |
4 files changed, 103 insertions, 31 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index d800535c6..acfd1bc87 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -5819,4 +5819,6 @@ * arch/arm/src/sama5/chip/sam_gpbr.h: Add SAMA5 GPBR register definitions (2013-10-19). * Kconfig: Add support for CONFIG_DEBUG_RTC (2013-10-19). - + * configs/sama5d3x-ek/README.txt, demo/defconfig: Describe how to + enable RTC support for the nsh/ configuration; RTC is now enabled by + default in the demo configuration (2013-10-19). diff --git a/nuttx/configs/sama5d3x-ek/README.txt b/nuttx/configs/sama5d3x-ek/README.txt index 6f3fe4a96..a13f9ac1c 100644 --- a/nuttx/configs/sama5d3x-ek/README.txt +++ b/nuttx/configs/sama5d3x-ek/README.txt @@ -925,6 +925,9 @@ Configurations to the SAMA5D3-EK. Since it now passes that test, the configuration has little further use other than for reference. + There may be issues with some of these configurations. See the details + before of the status of individual configurations. + Now for the gory details: demo: @@ -995,11 +998,23 @@ Configurations System Type->Heap Configuration CONFIG_SAMA5_DDRCS_HEAP=y : Add the SDRAM to the heap + CONFIG_SAMA5_DDRCS_HEAP_OFFSET=0 + CONFIG_SAMA5_DDRCS_HEAP_SIZE=268435456 Memory Management CONFIG_MM_REGIONS=2 : Two heap memory regions: ISRAM and SDRAM - 5. The Embest or Ronetix CPU module includes an Atmel AT25DF321A, + 5. The Real Time Clock/Calendar RTC) is enabled. These are the relevant + settings: + + System Type: + CONFIG_SAMA5_RTC=y : Enable the RTC driver + + Drivers (these values will be selected automatically): + CONFIG_RTC=y : Use the RTC for system time + CONFIG_RTC_DATETIME=y : RTC supports data/time + + 6. The Embest or Ronetix CPU module includes an Atmel AT25DF321A, 32-megabit, 2.7-volt SPI serial flash. Support for that serial FLASH can is enabled in this configuration. These are the relevant configuration settings: @@ -1054,7 +1069,7 @@ Configurations NOTE: It appears that if Linux runs out of NAND, it will destroy the contents of the AT25. - 6. Support for HSMCI car slots. The SAMA5D3x-EK provides a two SD memory + 7. Support for HSMCI car slots. The SAMA5D3x-EK provides a two SD memory card slots: (1) a full size SD card slot (J7 labeled MCI0), and (2) a microSD memory card slot (J6 labeled MCI1). The full size SD card slot connects via HSMCI0; the microSD connects vi HSMCI1. Relevant @@ -1128,7 +1143,7 @@ Configurations volume when it is removed. But those callbacks are not used in this configuration. - 7. Support the USB high-speed device (UDPHS) driver is enabled. + 8. Support the USB high-speed device (UDPHS) driver is enabled. These are the relevant NuttX configuration settings: Device Drivers -> USB Device Driver Support @@ -1187,7 +1202,7 @@ Configurations first have to use mkrd to create the RAM disk and mkfatfs to put a FAT file system on it. - 8. The USB high-speed EHCI and the low-/full- OHCI host drivers are supported + 9. The USB high-speed EHCI and the low-/full- OHCI host drivers are supported in this configuration. Here are the relevant configuration options that enable EHCI support: @@ -1263,7 +1278,17 @@ Configurations The following features are *not* enabled in the demo configuration but might be of some use to you: - 9. Debugging USB. There is normal console debug output available that + 10. The RTC supports an alarm that may be enable with the following settings. + However, there is nothing in the system that currently makes use of this + alarm. + + Drivers: + CONFIG_RTC_ALARM=y : Enable the RTC alarm + + Library Routines + CONFIG_SCHED_WORKQUEUE=y : Alarm needs work queue support + + 11. Debugging USB. There is normal console debug output available that can be enabled with CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB operation is very time critical and enabling this debug output WILL interfere with some operation. USB tracing is a less invasive way @@ -1444,22 +1469,24 @@ Configurations configuration file: System Type->ATSAMA5 Peripheral Support - CONFIG_SAMA5_MPDDRC=y : Enable the DDR controller + CONFIG_SAMA5_MPDDRC=y : Enable the DDR controller System Type->External Memory Configuration - CONFIG_SAMA5_DDRCS=y : Tell the system that DRAM is at the DDR CS - CONFIG_SAMA5_DDRCS_SIZE=268435456 : 2Gb DRAM -> 256GB - CONFIG_SAMA5_DDRCS_LPDDR2=y : Its DDR2 - CONFIG_SAMA5_MT47H128M16RT=y : This is the type of DDR2 + CONFIG_SAMA5_DDRCS=y : Tell the system that DRAM is at the DDR CS + CONFIG_SAMA5_DDRCS_SIZE=268435456 : 2Gb DRAM -> 256GB + CONFIG_SAMA5_DDRCS_LPDDR2=y : Its DDR2 + CONFIG_SAMA5_MT47H128M16RT=y : This is the type of DDR2 Now that you have SDRAM enabled, what are you going to do with it? One thing you can is add it to the heap System Type->Heap Configuration - CONFIG_SAMA5_DDRCS_HEAP=y : Add the SDRAM to the heap + CONFIG_SAMA5_DDRCS_HEAP=y : Add the SDRAM to the heap + CONFIG_SAMA5_DDRCS_HEAP_OFFSET=0 + CONFIG_SAMA5_DDRCS_HEAP_SIZE=268435456 Memory Management - CONFIG_MM_REGIONS=2 : Two memory regions: ISRAM and SDRAM + CONFIG_MM_REGIONS=2 : Two memory regions: ISRAM and SDRAM Another thing you could do is to enable the RAM test built-in application: @@ -1469,15 +1496,15 @@ Configurations it can be tested without crashing programs using the memory: System Type->Heap Configuration - CONFIG_SAMA5_DDRCS_HEAP=n : Don't add the SDRAM to the heap + CONFIG_SAMA5_DDRCS_HEAP=n : Don't add the SDRAM to the heap Memory Management - CONFIG_MM_REGIONS=1 : One memory regions: ISRAM + CONFIG_MM_REGIONS=1 : One memory regions: ISRAM Then enable the RAM test built-in application: Application Configuration->System NSH Add-Ons->Ram Test - CONFIG_SYSTEM_RAMTEST=y + CONFIG_SYSTEM_RAMTEST=y In this configuration, the SDRAM is not added to heap and so is not excessible to the applications. So the RAM test can be freely @@ -2124,6 +2151,25 @@ Configurations Defaults should be okay for all related settings. + 17. The Real Time Clock/Calendar RTC) may be enabled with these settings: + + System Type: + CONFIG_SAMA5_RTC=y : Enable the RTC driver + + Drivers (these values will be selected automatically): + CONFIG_RTC=y : Use the RTC for system time + CONFIG_RTC_DATETIME=y : RTC supports data/time + + The RTC supports an alarm that may be enable with the following settings. + However, there is nothing in the system that currently makes use of this + alarm. + + Drivers: + CONFIG_RTC_ALARM=y : Enable the RTC alarm + + Library Routines + CONFIG_SCHED_WORKQUEUE=y : Alarm needs work queue support + STATUS: PCK FREQUENCY diff --git a/nuttx/configs/sama5d3x-ek/demo/defconfig b/nuttx/configs/sama5d3x-ek/demo/defconfig index 65201b441..912fe21fe 100644 --- a/nuttx/configs/sama5d3x-ek/demo/defconfig +++ b/nuttx/configs/sama5d3x-ek/demo/defconfig @@ -119,6 +119,15 @@ CONFIG_USBHOST_ISOC_DISABLE=y # # ATSAMA5 Configuration Options # +# CONFIG_SAMA5_HAVE_UART0 is not set +# CONFIG_SAMA5_HAVE_UART1 is not set +# CONFIG_SAMA5_HAVE_CAN0 is not set +# CONFIG_SAMA5_HAVE_CAN1 is not set +CONFIG_SAMA5_HAVE_LCDC=y +CONFIG_SAMA5_HAVE_GMAC=y +# CONFIG_SAMA5_HAVE_EMAC is not set +# CONFIG_SAMA5_HAVE_HSMCI2 is not set +# CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_ARCH_CHIP_ATSAMA5D31 is not set CONFIG_ARCH_CHIP_ATSAMA5D33=y # CONFIG_ARCH_CHIP_ATSAMA5D34 is not set @@ -130,10 +139,9 @@ CONFIG_ARCH_CHIP_ATSAMA5D33=y # CONFIG_SAMA5_DBGU is not set # CONFIG_SAMA5_PIT is not set # CONFIG_SAMA5_WDT is not set +CONFIG_SAMA5_RTC=y CONFIG_SAMA5_HSMC=y # CONFIG_SAMA5_SMD is not set -# CONFIG_SAMA5_UART0 is not set -# CONFIG_SAMA5_UART1 is not set # CONFIG_SAMA5_USART0 is not set CONFIG_SAMA5_USART1=y # CONFIG_SAMA5_USART2 is not set @@ -143,11 +151,9 @@ CONFIG_SAMA5_USART1=y # CONFIG_SAMA5_TWI2 is not set CONFIG_SAMA5_HSMCI0=y CONFIG_SAMA5_HSMCI1=y -# CONFIG_SAMA5_HSMCI2 is not set CONFIG_SAMA5_SPI0=y # CONFIG_SAMA5_SPI1 is not set # CONFIG_SAMA5_TC0 is not set -# CONFIG_SAMA5_TC1 is not set # CONFIG_SAMA5_PWM is not set # CONFIG_SAMA5_ADC is not set CONFIG_SAMA5_DMAC0=y @@ -174,8 +180,6 @@ CONFIG_SAMA5_PIO_IRQ=y # CONFIG_SAMA5_PIOC_IRQ is not set CONFIG_SAMA5_PIOD_IRQ=y # CONFIG_SAMA5_PIOE_IRQ is not set -CONFIG_SAMA5_HAVE_GMAC=y -# CONFIG_SAMA5_HAVE_EMAC is not set # # SPI device driver options @@ -239,6 +243,8 @@ CONFIG_SAMA5_BOOT_CS0FLASH=y # CONFIG_SAMA5_ISRAM_HEAP=y CONFIG_SAMA5_DDRCS_HEAP=y +CONFIG_SAMA5_DDRCS_HEAP_OFFSET=0 +CONFIG_SAMA5_DDRCS_HEAP_SIZE=268435456 # # Architecture Options @@ -389,7 +395,9 @@ CONFIG_SPI=y CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_BITBANG is not set -# CONFIG_RTC is not set +CONFIG_RTC=y +CONFIG_RTC_DATETIME=y +# CONFIG_RTC_ALARM is not set # CONFIG_WATCHDOG is not set # CONFIG_ANALOG is not set # CONFIG_AUDIO_DEVICES is not set @@ -405,6 +413,7 @@ CONFIG_MMCSD_HAVECARDDETECT=y # CONFIG_MMCSD_SPI is not set CONFIG_ARCH_HAVE_SDIO=y CONFIG_MMCSD_SDIO=y +# CONFIG_SDIO_PREFLIGHT is not set # CONFIG_SDIO_MUXBUS is not set CONFIG_SDIO_BLOCKSETUP=y CONFIG_MTD=y @@ -644,7 +653,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CAN is not set -# CONFIG_SYSTEM_COMPOSITE is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set @@ -741,11 +749,13 @@ CONFIG_NSH_BUILTIN_APPS=y # # Disable Individual commands # +# CONFIG_NSH_DISABLE_ADDROUTE is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set # CONFIG_NSH_DISABLE_CP is not set # CONFIG_NSH_DISABLE_CMP is not set # CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set # CONFIG_NSH_DISABLE_ECHO is not set # CONFIG_NSH_DISABLE_EXEC is not set # CONFIG_NSH_DISABLE_EXIT is not set @@ -811,6 +821,14 @@ CONFIG_NSH_ARCHINIT=y # # +# USB CDC/ACM Device Commands +# + +# +# USB Composite Device Commands +# + +# # Custom Free Memory Command # # CONFIG_SYSTEM_FREE is not set @@ -869,7 +887,7 @@ CONFIG_READLINE_ECHO=y # # -# USB Mass Storage Class +# USB Mass Storage Device Commands # CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 diff --git a/nuttx/configs/sama5d3x-ek/nsh/defconfig b/nuttx/configs/sama5d3x-ek/nsh/defconfig index 174d91183..f93aba976 100644 --- a/nuttx/configs/sama5d3x-ek/nsh/defconfig +++ b/nuttx/configs/sama5d3x-ek/nsh/defconfig @@ -114,6 +114,15 @@ CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y # # ATSAMA5 Configuration Options # +# CONFIG_SAMA5_HAVE_UART0 is not set +# CONFIG_SAMA5_HAVE_UART1 is not set +# CONFIG_SAMA5_HAVE_CAN0 is not set +# CONFIG_SAMA5_HAVE_CAN1 is not set +CONFIG_SAMA5_HAVE_LCDC=y +CONFIG_SAMA5_HAVE_GMAC=y +# CONFIG_SAMA5_HAVE_EMAC is not set +# CONFIG_SAMA5_HAVE_HSMCI2 is not set +# CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_ARCH_CHIP_ATSAMA5D31 is not set CONFIG_ARCH_CHIP_ATSAMA5D33=y # CONFIG_ARCH_CHIP_ATSAMA5D34 is not set @@ -125,10 +134,9 @@ CONFIG_ARCH_CHIP_ATSAMA5D33=y # CONFIG_SAMA5_DBGU is not set # CONFIG_SAMA5_PIT is not set # CONFIG_SAMA5_WDT is not set +# CONFIG_SAMA5_RTC is not set CONFIG_SAMA5_HSMC=y # CONFIG_SAMA5_SMD is not set -# CONFIG_SAMA5_UART0 is not set -# CONFIG_SAMA5_UART1 is not set # CONFIG_SAMA5_USART0 is not set CONFIG_SAMA5_USART1=y # CONFIG_SAMA5_USART2 is not set @@ -138,11 +146,9 @@ CONFIG_SAMA5_USART1=y # CONFIG_SAMA5_TWI2 is not set # CONFIG_SAMA5_HSMCI0 is not set # CONFIG_SAMA5_HSMCI1 is not set -# CONFIG_SAMA5_HSMCI2 is not set # CONFIG_SAMA5_SPI0 is not set # CONFIG_SAMA5_SPI1 is not set # CONFIG_SAMA5_TC0 is not set -# CONFIG_SAMA5_TC1 is not set # CONFIG_SAMA5_PWM is not set # CONFIG_SAMA5_ADC is not set # CONFIG_SAMA5_DMAC0 is not set @@ -164,8 +170,6 @@ CONFIG_SAMA5_USART1=y # CONFIG_SAMA5_FUSE is not set # CONFIG_SAMA5_MPDDRC is not set # CONFIG_SAMA5_PIO_IRQ is not set -CONFIG_SAMA5_HAVE_GMAC=y -# CONFIG_SAMA5_HAVE_EMAC is not set # # External Memory Configuration @@ -600,11 +604,13 @@ CONFIG_NSH_BUILTIN_APPS=y # # Disable Individual commands # +# CONFIG_NSH_DISABLE_ADDROUTE is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set # CONFIG_NSH_DISABLE_CP is not set # CONFIG_NSH_DISABLE_CMP is not set # CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set # CONFIG_NSH_DISABLE_ECHO is not set # CONFIG_NSH_DISABLE_EXEC is not set # CONFIG_NSH_DISABLE_EXIT is not set |