Changes from review of last PR
This commit is contained in:
parent
250b9d5597
commit
59f626313d
@ -12392,6 +12392,8 @@
|
|||||||
banks. This fixes a race condition where the HW fills a FIFO bank
|
banks. This fixes a race condition where the HW fills a FIFO bank
|
||||||
while the SW is busy, resulting in out of sequence USB packets
|
while the SW is busy, resulting in out of sequence USB packets
|
||||||
(2016-07-23).
|
(2016-07-23).
|
||||||
|
* Freedom-K64F: Add PWM support. From Jordan MacIntyre (2016-07-25).
|
||||||
|
|
||||||
|
|
||||||
7.18 2016-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
7.18 2016-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
|
||||||
|
@ -418,6 +418,9 @@ config KINETIS_PIT
|
|||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
menu "Kinetis FTM PWM Configuration"
|
||||||
|
depends on KINETIS_FTM0 || KINETIS_FTM1 || KINETIS_FTM2
|
||||||
|
|
||||||
config KINETIS_FTM0_PWM
|
config KINETIS_FTM0_PWM
|
||||||
bool "FTM0 PWM"
|
bool "FTM0 PWM"
|
||||||
default n
|
default n
|
||||||
@ -481,6 +484,8 @@ config KINETIS_FTM2_CHANNEL
|
|||||||
If FTM2 is enabled for PWM usage, you also need specifies the timer output
|
If FTM2 is enabled for PWM usage, you also need specifies the timer output
|
||||||
channel {0,..,1}
|
channel {0,..,1}
|
||||||
|
|
||||||
|
endmenu # Kinetis FTM PWM Configuration
|
||||||
|
|
||||||
menu "Kinetis GPIO Interrupt Configuration"
|
menu "Kinetis GPIO Interrupt Configuration"
|
||||||
|
|
||||||
config KINETIS_GPIOIRQ
|
config KINETIS_GPIOIRQ
|
||||||
|
@ -134,7 +134,6 @@
|
|||||||
# define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3)
|
# define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* PWM Configuration */
|
/* PWM Configuration */
|
||||||
/* FTM0 Channels */
|
/* FTM0 Channels */
|
||||||
/* Channels can be modified using kinetis_k64pinmux.h */
|
/* Channels can be modified using kinetis_k64pinmux.h */
|
||||||
@ -146,7 +145,6 @@
|
|||||||
#define GPIO_FTM0_CH4OUT PIN_FTM0_CH4_1
|
#define GPIO_FTM0_CH4OUT PIN_FTM0_CH4_1
|
||||||
#define GPIO_FTM0_CH5OUT PIN_FTM0_CH5_1
|
#define GPIO_FTM0_CH5OUT PIN_FTM0_CH5_1
|
||||||
|
|
||||||
|
|
||||||
/* LED definitions ******************************************************************/
|
/* LED definitions ******************************************************************/
|
||||||
/* The Freedom K64F has a single RGB LED driven by the K64F as follows:
|
/* The Freedom K64F has a single RGB LED driven by the K64F as follows:
|
||||||
*
|
*
|
||||||
|
@ -12,10 +12,6 @@ CONFIG_HOST_LINUX=y
|
|||||||
# CONFIG_HOST_OSX is not set
|
# CONFIG_HOST_OSX is not set
|
||||||
# CONFIG_HOST_WINDOWS is not set
|
# CONFIG_HOST_WINDOWS is not set
|
||||||
# CONFIG_HOST_OTHER is not set
|
# CONFIG_HOST_OTHER is not set
|
||||||
# CONFIG_WINDOWS_NATIVE is not set
|
|
||||||
# CONFIG_WINDOWS_CYGWIN is not set
|
|
||||||
# CONFIG_WINDOWS_MSYS is not set
|
|
||||||
# CONFIG_WINDOWS_OTHER is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build Configuration
|
# Build Configuration
|
||||||
@ -139,15 +135,11 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y
|
|||||||
# CONFIG_ARMV7M_HAVE_DCACHE is not set
|
# CONFIG_ARMV7M_HAVE_DCACHE is not set
|
||||||
# CONFIG_ARMV7M_HAVE_ITCM is not set
|
# CONFIG_ARMV7M_HAVE_ITCM is not set
|
||||||
# CONFIG_ARMV7M_HAVE_DTCM is not set
|
# CONFIG_ARMV7M_HAVE_DTCM is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set
|
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set
|
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set
|
|
||||||
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y
|
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set
|
|
||||||
# CONFIG_ARMV7M_HAVE_STACKCHECK is not set
|
# CONFIG_ARMV7M_HAVE_STACKCHECK is not set
|
||||||
# CONFIG_ARMV7M_ITMSYSLOG is not set
|
# CONFIG_ARMV7M_ITMSYSLOG is not set
|
||||||
|
|
||||||
@ -232,6 +224,10 @@ CONFIG_KINETIS_FTM0=y
|
|||||||
# CONFIG_KINETIS_CRC is not set
|
# CONFIG_KINETIS_CRC is not set
|
||||||
# CONFIG_KINETIS_PDB is not set
|
# CONFIG_KINETIS_PDB is not set
|
||||||
# CONFIG_KINETIS_PIT is not set
|
# CONFIG_KINETIS_PIT is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Kinetis FTM PWM Configuration
|
||||||
|
#
|
||||||
CONFIG_KINETIS_FTM0_PWM=y
|
CONFIG_KINETIS_FTM0_PWM=y
|
||||||
CONFIG_KINETIS_FTM0_CHANNEL=2
|
CONFIG_KINETIS_FTM0_CHANNEL=2
|
||||||
|
|
||||||
@ -425,12 +421,6 @@ CONFIG_SIG_SIGUSR2=2
|
|||||||
CONFIG_SIG_SIGALARM=3
|
CONFIG_SIG_SIGALARM=3
|
||||||
CONFIG_SIG_SIGCONDTIMEDOUT=16
|
CONFIG_SIG_SIGCONDTIMEDOUT=16
|
||||||
CONFIG_SIG_SIGWORK=17
|
CONFIG_SIG_SIGWORK=17
|
||||||
|
|
||||||
#
|
|
||||||
# POSIX Message Queue Options
|
|
||||||
#
|
|
||||||
CONFIG_PREALLOC_MQ_MSGS=4
|
|
||||||
CONFIG_MQ_MAXMSGSIZE=32
|
|
||||||
# CONFIG_MODULE is not set
|
# CONFIG_MODULE is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -621,7 +611,6 @@ CONFIG_SYSLOG_CONSOLE=y
|
|||||||
CONFIG_FS_READABLE=y
|
CONFIG_FS_READABLE=y
|
||||||
CONFIG_FS_WRITABLE=y
|
CONFIG_FS_WRITABLE=y
|
||||||
# CONFIG_FS_NAMED_SEMAPHORES is not set
|
# CONFIG_FS_NAMED_SEMAPHORES is not set
|
||||||
CONFIG_FS_MQUEUE_MPATH="/var/mqueue"
|
|
||||||
# CONFIG_FS_RAMMAP is not set
|
# CONFIG_FS_RAMMAP is not set
|
||||||
CONFIG_FS_FAT=y
|
CONFIG_FS_FAT=y
|
||||||
CONFIG_FAT_LCNAMES=y
|
CONFIG_FAT_LCNAMES=y
|
||||||
@ -673,7 +662,6 @@ CONFIG_MM_REGIONS=1
|
|||||||
# Binary Loader
|
# Binary Loader
|
||||||
#
|
#
|
||||||
# CONFIG_BINFMT_DISABLE is not set
|
# CONFIG_BINFMT_DISABLE is not set
|
||||||
# CONFIG_BINFMT_EXEPATH is not set
|
|
||||||
# CONFIG_NXFLAT is not set
|
# CONFIG_NXFLAT is not set
|
||||||
# CONFIG_ELF is not set
|
# CONFIG_ELF is not set
|
||||||
CONFIG_BUILTIN=y
|
CONFIG_BUILTIN=y
|
||||||
@ -690,7 +678,6 @@ CONFIG_BUILTIN=y
|
|||||||
CONFIG_STDIO_BUFFER_SIZE=64
|
CONFIG_STDIO_BUFFER_SIZE=64
|
||||||
CONFIG_STDIO_LINEBUFFER=y
|
CONFIG_STDIO_LINEBUFFER=y
|
||||||
CONFIG_NUNGET_CHARS=2
|
CONFIG_NUNGET_CHARS=2
|
||||||
CONFIG_LIB_HOMEDIR="/"
|
|
||||||
# CONFIG_LIBM is not set
|
# CONFIG_LIBM is not set
|
||||||
# CONFIG_NOPRINTF_FIELDWIDTH is not set
|
# CONFIG_NOPRINTF_FIELDWIDTH is not set
|
||||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||||
@ -709,7 +696,6 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
|
|||||||
CONFIG_LIBC_TMPDIR="/tmp"
|
CONFIG_LIBC_TMPDIR="/tmp"
|
||||||
CONFIG_LIBC_MAX_TMPFILE=32
|
CONFIG_LIBC_MAX_TMPFILE=32
|
||||||
CONFIG_ARCH_LOWPUTC=y
|
CONFIG_ARCH_LOWPUTC=y
|
||||||
# CONFIG_LIBC_LOCALTIME is not set
|
|
||||||
# CONFIG_TIME_EXTENDED is not set
|
# CONFIG_TIME_EXTENDED is not set
|
||||||
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||||
# CONFIG_ARCH_ROMGETC is not set
|
# CONFIG_ARCH_ROMGETC is not set
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/pwm.h>
|
#include <nuttx/drivers/pwm.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
@ -53,23 +53,8 @@
|
|||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "kinetis_pwm.h"
|
#include "kinetis_pwm.h"
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
************************************************************************************/
|
|
||||||
/* Configuration *******************************************************************/
|
|
||||||
/* PWM
|
|
||||||
*
|
|
||||||
* The Kinetis Freedom board provides a LED on GPIO.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_PWM
|
#ifdef CONFIG_PWM
|
||||||
|
|
||||||
extern struct pwm_lowerhalf_s *kinetis_pwminitialize(int timer);
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
@ -85,8 +70,8 @@ extern struct pwm_lowerhalf_s *kinetis_pwminitialize(int timer);
|
|||||||
|
|
||||||
int board_pwm_setup(void)
|
int board_pwm_setup(void)
|
||||||
{
|
{
|
||||||
|
FAR struct pwm_lowerhalf_s *pwm;
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
struct pwm_lowerhalf_s *pwm;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Have we already initialized? */
|
/* Have we already initialized? */
|
||||||
|
Loading…
Reference in New Issue
Block a user