Misc updates to STL32L15X logic
This commit is contained in:
parent
39cb8ea999
commit
57e83aafd0
@ -161,7 +161,7 @@ GNU Toolchain Options
|
|||||||
toolchain options.
|
toolchain options.
|
||||||
|
|
||||||
1. The CodeSourcery GNU toolchain,
|
1. The CodeSourcery GNU toolchain,
|
||||||
2. The Atollic Toolchain,
|
2. The Atollic Toolchain,
|
||||||
3. The devkitARM GNU toolchain,
|
3. The devkitARM GNU toolchain,
|
||||||
4. Raisonance GNU toolchain, or
|
4. Raisonance GNU toolchain, or
|
||||||
5. The NuttX buildroot Toolchain (see below).
|
5. The NuttX buildroot Toolchain (see below).
|
||||||
@ -240,7 +240,7 @@ GNU Toolchain Options
|
|||||||
In order to compile successfully. Otherwise, you will get errors like:
|
In order to compile successfully. Otherwise, you will get errors like:
|
||||||
|
|
||||||
"C++ Compiler only available in TrueSTUDIO Professional"
|
"C++ Compiler only available in TrueSTUDIO Professional"
|
||||||
|
|
||||||
The make may then fail in some of the post link processing because of some of
|
The make may then fail in some of the post link processing because of some of
|
||||||
the other missing tools. The Make.defs file replaces the ar and nm with
|
the other missing tools. The Make.defs file replaces the ar and nm with
|
||||||
the default system x86 tool versions and these seem to work okay. Disable all
|
the default system x86 tool versions and these seem to work okay. Disable all
|
||||||
@ -262,7 +262,7 @@ IDEs
|
|||||||
|
|
||||||
NuttX is built using command-line make. It can be used with an IDE, but some
|
NuttX is built using command-line make. It can be used with an IDE, but some
|
||||||
effort will be required to create the project.
|
effort will be required to create the project.
|
||||||
|
|
||||||
Makefile Build
|
Makefile Build
|
||||||
--------------
|
--------------
|
||||||
Under Eclipse, it is pretty easy to set up an "empty makefile project" and
|
Under Eclipse, it is pretty easy to set up an "empty makefile project" and
|
||||||
@ -359,7 +359,7 @@ NXFLAT Toolchain
|
|||||||
tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can
|
tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can
|
||||||
be downloaded from the NuttX SourceForge download site
|
be downloaded from the NuttX SourceForge download site
|
||||||
(https://sourceforge.net/projects/nuttx/files/).
|
(https://sourceforge.net/projects/nuttx/files/).
|
||||||
|
|
||||||
This GNU toolchain builds and executes in the Linux or Cygwin environment.
|
This GNU toolchain builds and executes in the Linux or Cygwin environment.
|
||||||
|
|
||||||
1. You must have already configured Nuttx in <some-dir>/nuttx.
|
1. You must have already configured Nuttx in <some-dir>/nuttx.
|
||||||
@ -440,6 +440,10 @@ used if either the LCD or the on-board LEDs are disabled.
|
|||||||
PC10 USART3_TX LCD SEG22 P2, pin 15
|
PC10 USART3_TX LCD SEG22 P2, pin 15
|
||||||
PC11 USART3_RX LCD SEG23 P2, pin 14
|
PC11 USART3_RX LCD SEG23 P2, pin 14
|
||||||
|
|
||||||
|
GND and (external) 5V are available on both P1 and P2. Note: These signals
|
||||||
|
may be at lower voltage levels and, hence, may not properly drive an external
|
||||||
|
RS-232 transceiver.
|
||||||
|
|
||||||
A USB serial console is another option.
|
A USB serial console is another option.
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
@ -501,7 +505,7 @@ STM32L-Discovery-specific Configuration Options
|
|||||||
configuration features.
|
configuration features.
|
||||||
|
|
||||||
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n
|
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n
|
||||||
|
|
||||||
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
|
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
|
||||||
hence, the board that supports the particular chip or SoC.
|
hence, the board that supports the particular chip or SoC.
|
||||||
|
|
||||||
@ -562,7 +566,7 @@ STM32L-Discovery-specific Configuration Options
|
|||||||
CONFIG_STM32_FLITF
|
CONFIG_STM32_FLITF
|
||||||
CONFIG_STM32_DMA1
|
CONFIG_STM32_DMA1
|
||||||
CONFIG_STM32_DMA2
|
CONFIG_STM32_DMA2
|
||||||
|
|
||||||
APB2
|
APB2
|
||||||
----
|
----
|
||||||
CONFIG_STM32_SYSCFG
|
CONFIG_STM32_SYSCFG
|
||||||
@ -613,7 +617,7 @@ STM32L-Discovery-specific Configuration Options
|
|||||||
configuration settings:
|
configuration settings:
|
||||||
|
|
||||||
CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4}
|
CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4}
|
||||||
|
|
||||||
NOTE: The STM32 timers are each capable of generating different signals on
|
NOTE: The STM32 timers are each capable of generating different signals on
|
||||||
each of the four channels with different duty cycles. That capability is
|
each of the four channels with different duty cycles. That capability is
|
||||||
not supported by this driver: Only one output channel per timer.
|
not supported by this driver: Only one output channel per timer.
|
||||||
@ -685,13 +689,10 @@ Where <subdir> is one of the following:
|
|||||||
|
|
||||||
nsh:
|
nsh:
|
||||||
---
|
---
|
||||||
Configures the NuttShell (nsh) located at apps/examples/nsh. The
|
Configures the NuttShell (nsh) located at apps/examples/nsh.
|
||||||
Configuration enables the serial interfaces on UART2. Support for
|
|
||||||
builtin applications is enabled, but in the base configuration no
|
|
||||||
builtin applications are selected (see NOTES below).
|
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
|
||||||
1. This configuration uses the mconf-based configuration tool. To
|
1. This configuration uses the mconf-based configuration tool. To
|
||||||
change this configuration using that tool, you should:
|
change this configuration using that tool, you should:
|
||||||
|
|
||||||
@ -701,7 +702,14 @@ Where <subdir> is one of the following:
|
|||||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
reconfiguration process.
|
reconfiguration process.
|
||||||
|
|
||||||
2. By default, this configuration uses the CodeSourcery toolchain
|
2. The serial console is on UART1 and NuttX LED support is enabled.
|
||||||
|
Therefore, you will need an external RS232 driver or TTL serial-to-
|
||||||
|
USB converter. The UART1 TX and RX pins should be available on
|
||||||
|
PA9 and PA10, respectively.
|
||||||
|
|
||||||
|
3. Support for NSH built-in applications is *not* enabled.
|
||||||
|
|
||||||
|
4. By default, this configuration uses the CodeSourcery toolchain
|
||||||
for Windows and builds under Cygwin (or probably MSYS). That
|
for Windows and builds under Cygwin (or probably MSYS). That
|
||||||
can easily be reconfigured, of course.
|
can easily be reconfigured, of course.
|
||||||
|
|
||||||
@ -709,7 +717,14 @@ Where <subdir> is one of the following:
|
|||||||
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin
|
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin
|
||||||
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows
|
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows
|
||||||
|
|
||||||
3. This configuration includes USB Support (CDC/ACM device)
|
5. This configuration can support USB (CDC/ACM device)
|
||||||
|
|
||||||
|
a) Enable NSH builtin application support
|
||||||
|
|
||||||
|
CONFIG_BUILTIN=y
|
||||||
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
|
|
||||||
|
b) Enable USB device and CDC/ACM class support
|
||||||
|
|
||||||
CONFIG_STM32_USB=y : STM32 USB device support
|
CONFIG_STM32_USB=y : STM32 USB device support
|
||||||
CONFIG_USBDEV=y : USB device support must be enabled
|
CONFIG_USBDEV=y : USB device support must be enabled
|
||||||
@ -717,14 +732,16 @@ Where <subdir> is one of the following:
|
|||||||
CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled
|
CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled
|
||||||
CONFIG_NSH_ARCHINIT=y : To perform USB initialization
|
CONFIG_NSH_ARCHINIT=y : To perform USB initialization
|
||||||
|
|
||||||
The CDC/ACM example is included as two NSH "built-in" commands.\
|
c) Enable the CDC/ACM example
|
||||||
|
|
||||||
|
The CDC/ACM example is included as two NSH "built-in" commands.
|
||||||
|
|
||||||
CONFIG_EXAMPLES_CDCACM=y : Enable apps/examples/cdcacm
|
CONFIG_EXAMPLES_CDCACM=y : Enable apps/examples/cdcacm
|
||||||
|
|
||||||
The two commands are:
|
The two commands are:
|
||||||
|
|
||||||
sercon : Connect the serial device a create /dev/ttyACM0
|
sercon : Connect the serial device a create /dev/ttyACM0
|
||||||
serdis : Disconnect the serial device.
|
serdis : Disconnect the serial device.
|
||||||
|
|
||||||
NOTE: The serial connections/disconnections do not work as advertised.
|
NOTE: The serial connections/disconnections do not work as advertised.
|
||||||
This is because the STM32L-Discovery board does not provide circuitry for
|
This is because the STM32L-Discovery board does not provide circuitry for
|
||||||
@ -735,25 +752,8 @@ Where <subdir> is one of the following:
|
|||||||
1) Start NSH with USB disconnected
|
1) Start NSH with USB disconnected
|
||||||
2) enter to 'sercon' command to start the CDC/ACM device, then
|
2) enter to 'sercon' command to start the CDC/ACM device, then
|
||||||
3) Connect the USB device to the host.
|
3) Connect the USB device to the host.
|
||||||
|
|
||||||
and to close the connection:
|
and to close the connection:
|
||||||
|
|
||||||
4) Disconnect the USB device from the host
|
4) Disconnect the USB device from the host
|
||||||
5) Enter the 'serdis' command
|
5) Enter the 'serdis' command
|
||||||
|
|
||||||
4. This example can support the watchdog timer test (apps/examples/watchdog)
|
|
||||||
but this must be enabled by selecting:
|
|
||||||
|
|
||||||
CONFIG_EXAMPLES_WATCHDOG=y : Enable the apps/examples/watchdog
|
|
||||||
CONFIG_WATCHDOG=y : Enables watchdog timer driver support
|
|
||||||
CONFIG_STM32_WWDG=y : Enables the WWDG timer facility, OR
|
|
||||||
CONFIG_STM32_IWDG=y : Enables the IWDG timer facility (but not both)
|
|
||||||
|
|
||||||
The WWDG watchdog is driven off the (fast) 42MHz PCLK1 and, as result,
|
|
||||||
has a maximum timeout value of 49 milliseconds. for WWDG watchdog, you
|
|
||||||
should also add the fillowing to the configuration file:
|
|
||||||
|
|
||||||
CONFIG_EXAMPLES_WATCHDOG_PINGDELAY=20
|
|
||||||
CONFIG_EXAMPLES_WATCHDOG_TIMEOUT=49
|
|
||||||
|
|
||||||
The IWDG timer has a range of about 35 seconds and should not be an issue.
|
|
||||||
|
@ -136,10 +136,10 @@
|
|||||||
#define STM32_APB2_TIM10_CLKIN (STM32_PCLK2_FREQUENCY)
|
#define STM32_APB2_TIM10_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||||
#define STM32_APB2_TIM11_CLKIN (STM32_PCLK2_FREQUENCY)
|
#define STM32_APB2_TIM11_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||||
|
|
||||||
/* APB1 clock (PCLK1) is HCLK/2 (36MHz) */
|
/* APB1 clock (PCLK1) is HCLK (32MHz) */
|
||||||
|
|
||||||
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2
|
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLK
|
||||||
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY)
|
||||||
|
|
||||||
/* APB1 timers 2-7 will receive PCLK1 */
|
/* APB1 timers 2-7 will receive PCLK1 */
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ CONFIG_ARCH_HAVE_RAMVECTORS=y
|
|||||||
#
|
#
|
||||||
# Board Settings
|
# Board Settings
|
||||||
#
|
#
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=6522
|
CONFIG_BOARD_LOOPSPERMSEC=2500
|
||||||
# CONFIG_ARCH_CALIBRATION is not set
|
# CONFIG_ARCH_CALIBRATION is not set
|
||||||
CONFIG_DRAM_START=0x20000000
|
CONFIG_DRAM_START=0x20000000
|
||||||
CONFIG_DRAM_SIZE=16384
|
CONFIG_DRAM_SIZE=16384
|
||||||
@ -293,9 +293,9 @@ CONFIG_ARCH_BOARD="stm32ldiscovery"
|
|||||||
# Common Board Options
|
# Common Board Options
|
||||||
#
|
#
|
||||||
CONFIG_ARCH_HAVE_LEDS=y
|
CONFIG_ARCH_HAVE_LEDS=y
|
||||||
# CONFIG_ARCH_LEDS is not set
|
CONFIG_ARCH_LEDS=y
|
||||||
CONFIG_ARCH_HAVE_BUTTONS=y
|
CONFIG_ARCH_HAVE_BUTTONS=y
|
||||||
CONFIG_ARCH_BUTTONS=y
|
# CONFIG_ARCH_BUTTONS is not set
|
||||||
CONFIG_ARCH_HAVE_IRQBUTTONS=y
|
CONFIG_ARCH_HAVE_IRQBUTTONS=y
|
||||||
# CONFIG_ARCH_IRQBUTTONS is not set
|
# CONFIG_ARCH_IRQBUTTONS is not set
|
||||||
CONFIG_NSH_MMCSDMINOR=0
|
CONFIG_NSH_MMCSDMINOR=0
|
||||||
|
Loading…
Reference in New Issue
Block a user