merge upstream
This commit is contained in:
commit
059fc85201
arch
arm
include/lpc43xx
src
arm
armv6-m
armv7-a
armv7-m
common
dm320
efm32
imx
kinetis
kl
lpc11xx
lpc17xx
lpc214x
lpc2378
lpc31xx
lpc43xx
nuc1xx
sam34
sama5
samdl
samv7
stm32
stm32f7
str71x
tiva
avr/src
avr
avr32
common
hc/src
mips/src
common
mips32
pic32mx
pic32mz
sh/src
common
m16c
sh1
x86/src
common
i486
qemu
z16/src
@ -78,33 +78,33 @@
|
|||||||
/* Get customizations for each supported chip.
|
/* Get customizations for each supported chip.
|
||||||
*
|
*
|
||||||
* SRAM Resources
|
* SRAM Resources
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* Local SRAM LPC4310 LPC4320 LPC4330 LPC4350 LPC4353 LPC4357
|
* Local SRAM LPC4310 LPC4320 LPC4330 LPC4350 LPC4353 LPC4357 LPC4337
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* BANK 0 (0x1000 0000) 96Kb 96Kb 128Kb 128Kb 32Kb 32Kb
|
* BANK 0 (0x1000 0000) 96Kb 96Kb 128Kb 128Kb 32Kb 32Kb 32Kb
|
||||||
* BANK 1 (0x1008 0000) 40Kb 40Kb 72Kb 72Kb 40Kb 40Kb
|
* BANK 1 (0x1008 0000) 40Kb 40Kb 72Kb 72Kb 40Kb 40Kb 40Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* SUBTOTAL 136Kb 136Kb 200Kb 200Kb 72Kb 72Kb
|
* SUBTOTAL 136Kb 136Kb 200Kb 200Kb 72Kb 72Kb 72Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* AHB SRAM LPC4310 LPC4320 LPC4330 LPC4350 LPC4353 LPC4357
|
* AHB SRAM LPC4310 LPC4320 LPC4330 LPC4350 LPC4353 LPC4357 LPC4337
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* BANK 0 (0x2000 0000) 16Kb 48Kb 48Kb 48Kb 48Kb 48Kb
|
* BANK 0 (0x2000 0000) 16Kb 48Kb 48Kb 48Kb 48Kb 48Kb 48Kb
|
||||||
* BANK 1 (0x2000 8000) NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1
|
* BANK 1 (0x2000 8000) NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1 NOTE 1
|
||||||
* BANK 2 (0x2000 c000) 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb
|
* BANK 2 (0x2000 c000) 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb 16Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* SUBTOTAL 32Kb 64Kb 64Kb 64Kb 64Kb 64Kb
|
* SUBTOTAL 32Kb 64Kb 64Kb 64Kb 64Kb 64Kb 64Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* TOTAL 168Kb 200Kb 264Kb 264Kb 136Kb 136Kb
|
* TOTAL 168Kb 200Kb 264Kb 264Kb 136Kb 136Kb 136Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
*
|
*
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* FLASH LPC4310 LPC4320 LPC4330 LPC4350 LPC4353 LPC4357
|
* FLASH LPC4310 LPC4320 LPC4330 LPC4350 LPC4353 LPC4357 LPC4337
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* BANK A (0x1a00 0000) 256Kb 512Kb
|
* BANK A (0x1a00 0000) 256Kb 512Kb 512Kb
|
||||||
* BANK B (0x1b00 8000) 256Kb 512Kb
|
* BANK B (0x1b00 8000) 256Kb 512Kb 512Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
* TOTAL None None None None 512Kb 1024Kb
|
* TOTAL None None None None 512Kb 1024Kb 1024Kb
|
||||||
* --------------------- -------- ------- ------- ------- ------- -------
|
* --------------------- -------- ------- ------- ------- ------- ------- -------
|
||||||
*
|
*
|
||||||
* NOTE 1: The 64Kb of AHB of SRAM on the LPC4350/30/20 span all AHB SRAM
|
* NOTE 1: The 64Kb of AHB of SRAM on the LPC4350/30/20 span all AHB SRAM
|
||||||
* banks but are treated as two banks of 48 an 16Kb by the NuttX memory
|
* banks but are treated as two banks of 48 an 16Kb by the NuttX memory
|
||||||
@ -321,6 +321,32 @@
|
|||||||
# define LPC43_NADC10 (2) /* Two 10-bit ADC controllers */
|
# define LPC43_NADC10 (2) /* Two 10-bit ADC controllers */
|
||||||
# define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */
|
# define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */
|
||||||
# undef LPC43_NADC12 /* No 12-bit ADC controllers */
|
# undef LPC43_NADC12 /* No 12-bit ADC controllers */
|
||||||
|
#elif defined(CONFIG_ARCH_CHIP_LPC4337JBD144)
|
||||||
|
# define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */
|
||||||
|
# define LPC43_FLASH_BANKB_SIZE (512*1025)
|
||||||
|
# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/
|
||||||
|
# define LPC43_LOCSRAM_BANK1_SIZE (40*1024)
|
||||||
|
# define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */
|
||||||
|
# define LPC43_AHBSRAM_BANK1_SIZE (0)
|
||||||
|
# define LPC43_AHBSRAM_BANK2_SIZE (16*1024)
|
||||||
|
# define LPC43_EEPROM_SIZE (16*1024) /* 16Kb EEPROM */
|
||||||
|
# define LPC43_NLCD (0) /* Has LCD controller */
|
||||||
|
# define LPC43_ETHERNET (1) /* One Ethernet controller */
|
||||||
|
# define LPC43_USB0 (1) /* Have USB0 (Host, Device, OTG) */
|
||||||
|
# define LPC43_USB1 (1) /* Have USB1 (Host, Device) */
|
||||||
|
# define LPC43_USB1_ULPI (0) /* Have USB1 (Host, Device) with ULPI I/F */
|
||||||
|
# define LPC43_MCPWM (1) /* One PWM interface */
|
||||||
|
# define LPC43_QEI (0) /* One Quadrature Encoder interface */
|
||||||
|
# define LPC43_NUSARTS (4) /* Three USARTs + 1 UART */
|
||||||
|
# define LPC43_NSSP (2) /* Two SSP controllers */
|
||||||
|
# define LPC43_NTIMERS (4) /* Four Timers */
|
||||||
|
# define LPC43_NI2C (2) /* Two I2C controllers */
|
||||||
|
# define LPC43_NI2S (2) /* Two I2S controllers */
|
||||||
|
# define LPC43_NCAN (2) /* Two CAN controllers */
|
||||||
|
# define LPC43_NDAC (1) /* One 10-bit DAC */
|
||||||
|
# define LPC43_NADC10 (2) /* Two 10-bit ADC controllers */
|
||||||
|
# define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */
|
||||||
|
# undef LPC43_NADC12 /* No 12-bit ADC controllers */
|
||||||
#elif defined(CONFIG_ARCH_CHIP_LPC4350FBD208)
|
#elif defined(CONFIG_ARCH_CHIP_LPC4350FBD208)
|
||||||
# define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */
|
# define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */
|
||||||
# define LPC43_FLASH_BANKB_SIZE (0)
|
# define LPC43_FLASH_BANKB_SIZE (0)
|
||||||
|
@ -316,9 +316,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -343,7 +343,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
void up_doirq(int irq, uint32_t *regs)
|
void up_doirq(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -130,5 +130,5 @@ void up_doirq(int irq, uint32_t *regs)
|
|||||||
|
|
||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ __start:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
bl board_led_initialize
|
bl board_autoled_initialize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
|
@ -93,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -132,7 +132,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,9 +371,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
uint32_t *up_doirq(int irq, uint32_t *regs)
|
uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -116,6 +116,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
|||||||
|
|
||||||
current_regs = savestate;
|
current_regs = savestate;
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -143,7 +143,7 @@ void up_sigdeliver(void)
|
|||||||
* execution.
|
* execution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,9 +371,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
uint32_t *arm_doirq(int irq, uint32_t *regs)
|
uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -128,6 +128,6 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
|||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -132,7 +132,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,9 +380,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -407,7 +407,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
uint32_t *up_doirq(int irq, uint32_t *regs)
|
uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -116,6 +116,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
|||||||
|
|
||||||
current_regs = savestate;
|
current_regs = savestate;
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -146,7 +146,7 @@ void up_sigdeliver(void)
|
|||||||
* execution.
|
* execution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,14 +142,14 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -227,7 +227,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size);
|
up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,5 +275,5 @@ void up_initialize(void)
|
|||||||
/* Initialize the L2 cache if present and selected */
|
/* Initialize the L2 cache if present and selected */
|
||||||
|
|
||||||
up_l2ccinitialize();
|
up_l2ccinitialize();
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = (DM320_SDRAM_VADDR + CONFIG_RAM_SIZE) - g_idle_topstack;
|
*heap_size = (DM320_SDRAM_VADDR + CONFIG_RAM_SIZE) - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -225,8 +225,9 @@ void up_boot(void)
|
|||||||
/* Set up the board-specific LEDs */
|
/* Set up the board-specific LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_initialize();
|
board_autoled_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = (IMX_SDRAM_VSECTION + CONFIG_RAM_SIZE) - g_idle_topstack;
|
*heap_size = (IMX_SDRAM_VSECTION + CONFIG_RAM_SIZE) - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -216,8 +216,9 @@ void up_boot(void)
|
|||||||
/* Set up the board-specific LEDs */
|
/* Set up the board-specific LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_initialize();
|
board_autoled_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
|
@ -131,7 +131,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -249,7 +249,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,8 +55,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -592,7 +592,7 @@ __start:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
bl board_led_initialize
|
bl board_autoled_initialize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Then jump to OS entry */
|
/* Then jump to OS entry */
|
||||||
|
@ -193,7 +193,7 @@ __start:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
bl board_led_initialize
|
bl board_autoled_initialize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Then jump to OS entry */
|
/* Then jump to OS entry */
|
||||||
|
@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = LPC31_HEAP_VEND - g_idle_topstack;
|
*heap_size = LPC31_HEAP_VEND - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,9 @@ config ARCH_CHIP_LPC4330FET180
|
|||||||
config ARCH_CHIP_LPC4330FET256
|
config ARCH_CHIP_LPC4330FET256
|
||||||
bool "LPC4330FET256"
|
bool "LPC4330FET256"
|
||||||
|
|
||||||
|
config ARCH_CHIP_LPC4337JBD144
|
||||||
|
bool "LPC4337JBD144"
|
||||||
|
|
||||||
config ARCH_CHIP_LPC4350FBD208
|
config ARCH_CHIP_LPC4350FBD208
|
||||||
bool "LPC4350FBD208"
|
bool "LPC4350FBD208"
|
||||||
|
|
||||||
@ -81,6 +84,11 @@ config ARCH_FAMILY_LPC4330
|
|||||||
default y if ARCH_CHIP_LPC4330FBD144 || ARCH_CHIP_LPC4330FET100 || ARCH_CHIP_LPC4330FET180 || ARCH_CHIP_LPC4330FET256
|
default y if ARCH_CHIP_LPC4330FBD144 || ARCH_CHIP_LPC4330FET100 || ARCH_CHIP_LPC4330FET180 || ARCH_CHIP_LPC4330FET256
|
||||||
select ARCH_HAVE_TICKLESS
|
select ARCH_HAVE_TICKLESS
|
||||||
|
|
||||||
|
config ARCH_FAMILY_LPC4337
|
||||||
|
bool
|
||||||
|
default y if ARCH_CHIP_LPC4337JBD144
|
||||||
|
select ARCH_HAVE_TICKLESS
|
||||||
|
|
||||||
config ARCH_FAMILY_LPC4350
|
config ARCH_FAMILY_LPC4350
|
||||||
bool
|
bool
|
||||||
default y if ARCH_CHIP_LPC4350FBD208 || ARCH_CHIP_LPC4350FET180 || ARCH_CHIP_LPC4350FET256
|
default y if ARCH_CHIP_LPC4350FBD208 || ARCH_CHIP_LPC4350FET180 || ARCH_CHIP_LPC4350FET256
|
||||||
|
@ -97,6 +97,10 @@
|
|||||||
# define ARMV7M_PERIPHERAL_INTERRUPTS 53
|
# define ARMV7M_PERIPHERAL_INTERRUPTS 53
|
||||||
# include "chip/lpc4310203050_memorymap.h"
|
# include "chip/lpc4310203050_memorymap.h"
|
||||||
# include "chip/lpc4310203050_pinconfig.h"
|
# include "chip/lpc4310203050_pinconfig.h"
|
||||||
|
#elif defined(CONFIG_ARCH_CHIP_LPC4337JBD144)
|
||||||
|
# define ARMV7M_PERIPHERAL_INTERRUPTS 53
|
||||||
|
# include "chip/lpc435357_memorymap.h"
|
||||||
|
# include "chip/lpc4357fet256_pinconfig.h"
|
||||||
#elif defined(CONFIG_ARCH_CHIP_LPC4350FBD208)
|
#elif defined(CONFIG_ARCH_CHIP_LPC4350FBD208)
|
||||||
# define ARMV7M_PERIPHERAL_INTERRUPTS 53
|
# define ARMV7M_PERIPHERAL_INTERRUPTS 53
|
||||||
# include "chip/lpc4310203050_memorymap.h"
|
# include "chip/lpc4310203050_memorymap.h"
|
||||||
|
@ -248,7 +248,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
{
|
{
|
||||||
/* Start with the first SRAM region */
|
/* Start with the first SRAM region */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -57,8 +57,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -240,6 +240,7 @@ config ARCH_CHIP_SAM3A
|
|||||||
config ARCH_CHIP_SAM4CM
|
config ARCH_CHIP_SAM4CM
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
select ARCH_HAVE_TICKLESS
|
||||||
|
|
||||||
config ARCH_CHIP_SAM4L
|
config ARCH_CHIP_SAM4L
|
||||||
bool
|
bool
|
||||||
|
@ -230,7 +230,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -258,7 +258,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
* heap is at the end of BSS through the configured end of SDRAM.
|
* heap is at the end of BSS through the configured end of SDRAM.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)&_ebss;
|
*heap_start = (FAR void *)&_ebss;
|
||||||
*heap_size = SAMA5_PRIMARY_HEAP_END - (size_t)&_ebss;
|
*heap_size = SAMA5_PRIMARY_HEAP_END - (size_t)&_ebss;
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
* IDLE stack through the configured end of ISRAM.
|
* IDLE stack through the configured end of ISRAM.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = SAMA5_PRIMARY_HEAP_END - g_idle_topstack;
|
*heap_size = SAMA5_PRIMARY_HEAP_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
@ -237,7 +237,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -109,18 +109,26 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* USARTs *******************************************************************/
|
/* USARTs *******************************************************************/
|
||||||
/* If the USART is not being used as a UART, then it really isn't enabled
|
/* If the USART is not being used as a UART or for SPI, then it really isn't
|
||||||
* for our purposes.
|
* enabled for our purposes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_USART0_ISUART
|
#if !defined(CONFIG_USART0_ISUART) && !defined(CONFIG_USART0_ISSPI)
|
||||||
# undef CONFIG_SAMV7_USART0
|
# undef CONFIG_SAMV7_USART0
|
||||||
|
# undef CONFIG_USART0_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_USART0_IFLOWCONTROL
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_USART1_ISUART
|
|
||||||
|
#if !defined(CONFIG_USART1_ISUART) && !defined(CONFIG_USART1_ISSPI)
|
||||||
# undef CONFIG_SAMV7_USART1
|
# undef CONFIG_SAMV7_USART1
|
||||||
|
# undef CONFIG_USART1_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_USART1_IFLOWCONTROL
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_USART2_ISUART
|
|
||||||
|
#if !defined(CONFIG_USART2_ISUART) && !defined(CONFIG_USART2_ISSPI)
|
||||||
# undef CONFIG_SAMV7_USART2
|
# undef CONFIG_SAMV7_USART2
|
||||||
|
# undef CONFIG_USART2_SERIAL_CONSOLE
|
||||||
|
# undef CONFIG_USART2_IFLOWCONTROL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Don't enable USARTs not supported by the chip. */
|
/* Don't enable USARTs not supported by the chip. */
|
||||||
@ -153,10 +161,10 @@
|
|||||||
#undef CONFIG_UART3_IFLOWCONTROL
|
#undef CONFIG_UART3_IFLOWCONTROL
|
||||||
#undef CONFIG_UART4_IFLOWCONTROL
|
#undef CONFIG_UART4_IFLOWCONTROL
|
||||||
|
|
||||||
/* Hardware flow control requires using DMAC channel (not yet supported) */
|
/* Hardware flow control requires using a DMAC channel (not yet supported) */
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
||||||
# warning PDC or DMAC support is required for RTS hardware flow control
|
# warning XDMAC support is required for RTS hardware flow control
|
||||||
# undef CONFIG_SERIAL_IFLOWCONTROL
|
# undef CONFIG_SERIAL_IFLOWCONTROL
|
||||||
# undef CONFIG_USART0_IFLOWCONTROL
|
# undef CONFIG_USART0_IFLOWCONTROL
|
||||||
# undef CONFIG_USART1_IFLOWCONTROL
|
# undef CONFIG_USART1_IFLOWCONTROL
|
||||||
|
@ -123,13 +123,13 @@
|
|||||||
# elif defined(CONFIG_SAMV7_UART4)
|
# elif defined(CONFIG_SAMV7_UART4)
|
||||||
# define TTYS0_DEV g_uart4port /* UART4 is ttyS0 */
|
# define TTYS0_DEV g_uart4port /* UART4 is ttyS0 */
|
||||||
# define UART4_ASSIGNED 1
|
# define UART4_ASSIGNED 1
|
||||||
# elif defined(CONFIG_SAMV7_USART0)
|
# elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART)
|
||||||
# define TTYS0_DEV g_usart0port /* USART0 is ttyS0 */
|
# define TTYS0_DEV g_usart0port /* USART0 is ttyS0 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
# elif defined(CONFIG_SAMV7_USART1)
|
# elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART)
|
||||||
# define TTYS0_DEV g_usart1port /* USART1 is ttyS0 */
|
# define TTYS0_DEV g_usart1port /* USART1 is ttyS0 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
# elif defined(CONFIG_SAMV7_USART2)
|
# elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART)
|
||||||
# define TTYS0_DEV g_usart2port /* USART2 is ttyS0 */
|
# define TTYS0_DEV g_usart2port /* USART2 is ttyS0 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
# endif
|
# endif
|
||||||
@ -154,13 +154,16 @@
|
|||||||
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
||||||
# define TTYS1_DEV g_uart4port /* UART4 is ttyS1 */
|
# define TTYS1_DEV g_uart4port /* UART4 is ttyS1 */
|
||||||
# define UART4_ASSIGNED 1
|
# define UART4_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART0) && !defined(USART0_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \
|
||||||
|
!defined(USART0_ASSIGNED)
|
||||||
# define TTYS1_DEV g_usart0port /* USART0 is ttyS1 */
|
# define TTYS1_DEV g_usart0port /* USART0 is ttyS1 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS1_DEV g_usart1port /* USART1 is ttyS1 */
|
# define TTYS1_DEV g_usart1port /* USART1 is ttyS1 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS1_DEV g_usart2port /* USART2 is ttyS1 */
|
# define TTYS1_DEV g_usart2port /* USART2 is ttyS1 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -182,13 +185,16 @@
|
|||||||
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
||||||
# define TTYS2_DEV g_uart4port /* UART4 is ttyS2 */
|
# define TTYS2_DEV g_uart4port /* UART4 is ttyS2 */
|
||||||
# define UART4_ASSIGNED 1
|
# define UART4_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART0) && !defined(USART0_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \
|
||||||
|
!defined(USART0_ASSIGNED)
|
||||||
# define TTYS2_DEV g_usart0port /* USART0 is ttyS2 */
|
# define TTYS2_DEV g_usart0port /* USART0 is ttyS2 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS2_DEV g_usart1port /* USART1 is ttyS2 */
|
# define TTYS2_DEV g_usart1port /* USART1 is ttyS2 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS2_DEV g_usart2port /* USART2 is ttyS2 */
|
# define TTYS2_DEV g_usart2port /* USART2 is ttyS2 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -207,13 +213,16 @@
|
|||||||
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
||||||
# define TTYS3_DEV g_uart4port /* UART4 is ttyS3 */
|
# define TTYS3_DEV g_uart4port /* UART4 is ttyS3 */
|
||||||
# define UART4_ASSIGNED 1
|
# define UART4_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART0) && !defined(USART0_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \
|
||||||
|
!defined(USART0_ASSIGNED)
|
||||||
# define TTYS3_DEV g_usart0port /* USART0 is ttyS3 */
|
# define TTYS3_DEV g_usart0port /* USART0 is ttyS3 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS3_DEV g_usart1port /* USART1 is ttyS3 */
|
# define TTYS3_DEV g_usart1port /* USART1 is ttyS3 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS3_DEV g_usart2port /* USART2 is ttyS3 */
|
# define TTYS3_DEV g_usart2port /* USART2 is ttyS3 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -229,13 +238,16 @@
|
|||||||
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
||||||
# define TTYS4_DEV g_uart4port /* UART4 is ttyS4 */
|
# define TTYS4_DEV g_uart4port /* UART4 is ttyS4 */
|
||||||
# define UART4_ASSIGNED 1
|
# define UART4_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART0) && !defined(USART0_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \
|
||||||
|
!defined(USART0_ASSIGNED)
|
||||||
# define TTYS4_DEV g_usart0port /* USART0 is ttyS4 */
|
# define TTYS4_DEV g_usart0port /* USART0 is ttyS4 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS4_DEV g_usart1port /* USART1 is ttyS4 */
|
# define TTYS4_DEV g_usart1port /* USART1 is ttyS4 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS4_DEV g_usart2port /* USART2 is ttyS4 */
|
# define TTYS4_DEV g_usart2port /* USART2 is ttyS4 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -248,13 +260,16 @@
|
|||||||
#if defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
#if defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED)
|
||||||
# define TTYS5_DEV g_uart4port /* UART4 is ttyS5 */
|
# define TTYS5_DEV g_uart4port /* UART4 is ttyS5 */
|
||||||
# define UART4_ASSIGNED 1
|
# define UART4_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART0) && !defined(USART0_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \
|
||||||
|
!defined(USART0_ASSIGNED)
|
||||||
# define TTYS5_DEV g_usart0port /* USART0 is ttyS5 */
|
# define TTYS5_DEV g_usart0port /* USART0 is ttyS5 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS5_DEV g_usart1port /* USART1 is ttyS5 */
|
# define TTYS5_DEV g_usart1port /* USART1 is ttyS5 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS5_DEV g_usart2port /* USART2 is ttyS5 */
|
# define TTYS5_DEV g_usart2port /* USART2 is ttyS5 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -264,13 +279,16 @@
|
|||||||
* One of USART0-2 could also be the console.
|
* One of USART0-2 could also be the console.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_SAMV7_USART0) && !defined(USART0_ASSIGNED)
|
#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \
|
||||||
|
!defined(USART0_ASSIGNED)
|
||||||
# define TTYS6_DEV g_usart0port /* USART0 is ttyS6 */
|
# define TTYS6_DEV g_usart0port /* USART0 is ttyS6 */
|
||||||
# define USART0_ASSIGNED 1
|
# define USART0_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS6_DEV g_usart1port /* USART1 is ttyS6 */
|
# define TTYS6_DEV g_usart1port /* USART1 is ttyS6 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS6_DEV g_usart2port /* USART2 is ttyS6 */
|
# define TTYS6_DEV g_usart2port /* USART2 is ttyS6 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -280,10 +298,12 @@
|
|||||||
* One of of USART1-2 could also be the console.
|
* One of of USART1-2 could also be the console.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_SAMV7_USART1) && !defined(USART1_ASSIGNED)
|
#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \
|
||||||
|
!defined(USART1_ASSIGNED)
|
||||||
# define TTYS7_DEV g_usart1port /* USART1 is ttyS7 */
|
# define TTYS7_DEV g_usart1port /* USART1 is ttyS7 */
|
||||||
# define USART1_ASSIGNED 1
|
# define USART1_ASSIGNED 1
|
||||||
#elif defined(CONFIG_SAMV7_USART2) && !defined(USART2_ASSIGNED)
|
#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \
|
||||||
|
!defined(USART2_ASSIGNED)
|
||||||
# define TTYS7_DEV g_usart2port /* USART2 is ttyS7 */
|
# define TTYS7_DEV g_usart2port /* USART2 is ttyS7 */
|
||||||
# define USART2_ASSIGNED 1
|
# define USART2_ASSIGNED 1
|
||||||
#endif
|
#endif
|
||||||
@ -349,13 +369,13 @@ static int sam_uart3_interrupt(int irq, void *context);
|
|||||||
#ifdef CONFIG_SAMV7_UART4
|
#ifdef CONFIG_SAMV7_UART4
|
||||||
static int sam_uart4_interrupt(int irq, void *context);
|
static int sam_uart4_interrupt(int irq, void *context);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART0
|
#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART)
|
||||||
static int sam_usart0_interrupt(int irq, void *context);
|
static int sam_usart0_interrupt(int irq, void *context);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART1
|
#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART)
|
||||||
static int sam_usart1_interrupt(int irq, void *context);
|
static int sam_usart1_interrupt(int irq, void *context);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART2
|
#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART)
|
||||||
static int sam_usart2_interrupt(int irq, void *context);
|
static int sam_usart2_interrupt(int irq, void *context);
|
||||||
#endif
|
#endif
|
||||||
static int sam_ioctl(struct file *filep, int cmd, unsigned long arg);
|
static int sam_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||||
@ -412,15 +432,15 @@ static char g_uart3txbuffer[CONFIG_UART3_TXBUFSIZE];
|
|||||||
static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE];
|
static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE];
|
||||||
static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
|
static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART0
|
#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART)
|
||||||
static char g_usart0rxbuffer[CONFIG_USART0_RXBUFSIZE];
|
static char g_usart0rxbuffer[CONFIG_USART0_RXBUFSIZE];
|
||||||
static char g_usart0txbuffer[CONFIG_USART0_TXBUFSIZE];
|
static char g_usart0txbuffer[CONFIG_USART0_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART1
|
#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART)
|
||||||
static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
|
static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE];
|
||||||
static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
|
static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART2
|
#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART)
|
||||||
static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
|
static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE];
|
||||||
static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
|
static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
@ -582,7 +602,7 @@ static uart_dev_t g_uart4port =
|
|||||||
|
|
||||||
/* This describes the state of the USART0 port. */
|
/* This describes the state of the USART0 port. */
|
||||||
|
|
||||||
#ifdef CONFIG_SAMV7_USART0
|
#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART)
|
||||||
static struct sam_dev_s g_usart0priv =
|
static struct sam_dev_s g_usart0priv =
|
||||||
{
|
{
|
||||||
.usartbase = SAM_USART0_BASE,
|
.usartbase = SAM_USART0_BASE,
|
||||||
@ -616,7 +636,7 @@ static uart_dev_t g_usart0port =
|
|||||||
|
|
||||||
/* This describes the state of the USART1 port. */
|
/* This describes the state of the USART1 port. */
|
||||||
|
|
||||||
#ifdef CONFIG_SAMV7_USART1
|
#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART)
|
||||||
static struct sam_dev_s g_usart1priv =
|
static struct sam_dev_s g_usart1priv =
|
||||||
{
|
{
|
||||||
.usartbase = SAM_USART1_BASE,
|
.usartbase = SAM_USART1_BASE,
|
||||||
@ -650,7 +670,7 @@ static uart_dev_t g_usart1port =
|
|||||||
|
|
||||||
/* This describes the state of the USART2 port. */
|
/* This describes the state of the USART2 port. */
|
||||||
|
|
||||||
#ifdef CONFIG_SAMV7_USART2
|
#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART)
|
||||||
static struct sam_dev_s g_usart2priv =
|
static struct sam_dev_s g_usart2priv =
|
||||||
{
|
{
|
||||||
.usartbase = SAM_USART2_BASE,
|
.usartbase = SAM_USART2_BASE,
|
||||||
@ -1095,19 +1115,19 @@ static int sam_uart4_interrupt(int irq, void *context)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SAMV7_USART0
|
#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART)
|
||||||
static int sam_usart0_interrupt(int irq, void *context)
|
static int sam_usart0_interrupt(int irq, void *context)
|
||||||
{
|
{
|
||||||
return sam_interrupt(&g_usart0port);
|
return sam_interrupt(&g_usart0port);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART1
|
#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART)
|
||||||
static int sam_usart1_interrupt(int irq, void *context)
|
static int sam_usart1_interrupt(int irq, void *context)
|
||||||
{
|
{
|
||||||
return sam_interrupt(&g_usart1port);
|
return sam_interrupt(&g_usart1port);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV7_USART2
|
#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART)
|
||||||
static int sam_usart2_interrupt(int irq, void *context)
|
static int sam_usart2_interrupt(int irq, void *context)
|
||||||
{
|
{
|
||||||
return sam_interrupt(&g_usart2port);
|
return sam_interrupt(&g_usart2port);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -698,6 +698,10 @@
|
|||||||
#define ATIM_CCMR_MODE_OCREFHI (5) /* 101: OCxREF forced high */
|
#define ATIM_CCMR_MODE_OCREFHI (5) /* 101: OCxREF forced high */
|
||||||
#define ATIM_CCMR_MODE_PWM1 (6) /* 110: PWM mode 1 */
|
#define ATIM_CCMR_MODE_PWM1 (6) /* 110: PWM mode 1 */
|
||||||
#define ATIM_CCMR_MODE_PWM2 (7) /* 111: PWM mode 2 */
|
#define ATIM_CCMR_MODE_PWM2 (7) /* 111: PWM mode 2 */
|
||||||
|
#define ATIM_CCMR_MODE_COMBINED1 (12) /* 1100: Combined PWM mode 1 */
|
||||||
|
#define ATIM_CCMR_MODE_COMBINED2 (13) /* 1101: Combined PWM mode 2 */
|
||||||
|
#define ATIM_CCMR_MODE_ASYMMETRIC1 (14) /* 1110: Asymmetric PWM mode 1 */
|
||||||
|
#define ATIM_CCMR_MODE_ASYMMETRIC2 (15) /* 1111: Asymmetric PWM mode 2 */
|
||||||
|
|
||||||
/* Capture/compare mode register 1 -- Input capture mode */
|
/* Capture/compare mode register 1 -- Input capture mode */
|
||||||
|
|
||||||
@ -764,8 +768,8 @@
|
|||||||
#define ATIM_CCMR2_OC4CE (1 << 15) /* Bit 15: Output Compare 4 Clear Enable */
|
#define ATIM_CCMR2_OC4CE (1 << 15) /* Bit 15: Output Compare 4 Clear Enable */
|
||||||
|
|
||||||
#ifdef CONFIG_STM32_STM32F30XX
|
#ifdef CONFIG_STM32_STM32F30XX
|
||||||
# define ATIM_CCMR1_OC3M 1 << 16) /* Bit 16: Output Compare 3 mode - bit 3 */
|
# define ATIM_CCMR2_OC3M (1 << 16) /* Bit 16: Output Compare 3 mode - bit 3 */
|
||||||
# define ATIM_CCMR1_OC4M 1 << 24) /* Bit 24: Output Compare 4 mode - bit 3 */
|
# define ATIM_CCMR2_OC4M (1 << 24) /* Bit 24: Output Compare 4 mode - bit 3 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Capture/compare mode register 2 - Input Capture Mode */
|
/* Capture/compare mode register 2 - Input Capture Mode */
|
||||||
|
@ -511,7 +511,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -526,7 +526,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = SRAM1_END - g_idle_topstack;
|
*heap_size = SRAM1_END - g_idle_topstack;
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
|
||||||
# define BEGIN_IDLE() board_led_on(LED_IDLE)
|
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
|
||||||
# define END_IDLE() board_led_off(LED_IDLE)
|
# define END_IDLE() board_autoled_off(LED_IDLE)
|
||||||
#else
|
#else
|
||||||
# define BEGIN_IDLE()
|
# define BEGIN_IDLE()
|
||||||
# define END_IDLE()
|
# define END_IDLE()
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,9 @@
|
|||||||
* arch/arm/src/stm32/stm32_pwm.h
|
* arch/arm/src/stm32/stm32_pwm.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved.
|
||||||
|
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
* Paul Alexander Patience <paul-a.patience@polymtl.ca>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -96,6 +98,15 @@
|
|||||||
#ifndef CONFIG_STM32_TIM14
|
#ifndef CONFIG_STM32_TIM14
|
||||||
# undef CONFIG_STM32_TIM14_PWM
|
# undef CONFIG_STM32_TIM14_PWM
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CONFIG_STM32_TIM15
|
||||||
|
# undef CONFIG_STM32_TIM15_PWM
|
||||||
|
#endif
|
||||||
|
#ifndef CONFIG_STM32_TIM16
|
||||||
|
# undef CONFIG_STM32_TIM16_PWM
|
||||||
|
#endif
|
||||||
|
#ifndef CONFIG_STM32_TIM17
|
||||||
|
# undef CONFIG_STM32_TIM17_PWM
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The basic timers (timer 6 and 7) are not capable of generating output pulses */
|
/* The basic timers (timer 6 and 7) are not capable of generating output pulses */
|
||||||
|
|
||||||
@ -109,11 +120,597 @@
|
|||||||
defined(CONFIG_STM32_TIM5_PWM) || defined(CONFIG_STM32_TIM8_PWM) || \
|
defined(CONFIG_STM32_TIM5_PWM) || defined(CONFIG_STM32_TIM8_PWM) || \
|
||||||
defined(CONFIG_STM32_TIM9_PWM) || defined(CONFIG_STM32_TIM10_PWM) || \
|
defined(CONFIG_STM32_TIM9_PWM) || defined(CONFIG_STM32_TIM10_PWM) || \
|
||||||
defined(CONFIG_STM32_TIM11_PWM) || defined(CONFIG_STM32_TIM12_PWM) || \
|
defined(CONFIG_STM32_TIM11_PWM) || defined(CONFIG_STM32_TIM12_PWM) || \
|
||||||
defined(CONFIG_STM32_TIM13_PWM) || defined(CONFIG_STM32_TIM14_PWM)
|
defined(CONFIG_STM32_TIM13_PWM) || defined(CONFIG_STM32_TIM14_PWM) || \
|
||||||
|
defined(CONFIG_STM32_TIM15_PWM) || defined(CONFIG_STM32_TIM16_PWM) || \
|
||||||
|
defined(CONFIG_STM32_TIM17_PWM)
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include "chip/stm32_tim.h"
|
#include "chip/stm32_tim.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_PWM_MULTICHAN
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM1_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM1_CH1OUT
|
||||||
|
# define PWM_TIM1_CH1CFG GPIO_TIM1_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM1_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM1_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM1_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM1_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM1_CH2OUT
|
||||||
|
# define PWM_TIM1_CH2CFG GPIO_TIM1_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM1_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM1_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM1_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM1_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM1_CH3OUT
|
||||||
|
# define PWM_TIM1_CH3CFG GPIO_TIM1_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM1_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM1_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM1_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM1_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM1_CH4OUT
|
||||||
|
# define PWM_TIM1_CH4CFG GPIO_TIM1_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM1_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM1_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM1_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM1_NCHANNELS (PWM_TIM1_CHANNEL1 + PWM_TIM1_CHANNEL2 + \
|
||||||
|
PWM_TIM1_CHANNEL3 + PWM_TIM1_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM2_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM2_CH1OUT
|
||||||
|
# define PWM_TIM2_CH1CFG GPIO_TIM2_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM2_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM2_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM2_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM2_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM2_CH2OUT
|
||||||
|
# define PWM_TIM2_CH2CFG GPIO_TIM2_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM2_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM2_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM2_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM2_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM2_CH3OUT
|
||||||
|
# define PWM_TIM2_CH3CFG GPIO_TIM2_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM2_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM2_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM2_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM2_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM2_CH4OUT
|
||||||
|
# define PWM_TIM2_CH4CFG GPIO_TIM2_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM2_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM2_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM2_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM2_NCHANNELS (PWM_TIM2_CHANNEL1 + PWM_TIM2_CHANNEL2 + \
|
||||||
|
PWM_TIM2_CHANNEL3 + PWM_TIM2_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM3_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM3_CH1OUT
|
||||||
|
# define PWM_TIM3_CH1CFG GPIO_TIM3_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM3_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM3_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM3_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM3_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM3_CH2OUT
|
||||||
|
# define PWM_TIM3_CH2CFG GPIO_TIM3_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM3_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM3_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM3_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM3_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM3_CH3OUT
|
||||||
|
# define PWM_TIM3_CH3CFG GPIO_TIM3_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM3_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM3_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM3_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM3_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM3_CH4OUT
|
||||||
|
# define PWM_TIM3_CH4CFG GPIO_TIM3_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM3_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM3_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM3_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM3_NCHANNELS (PWM_TIM3_CHANNEL1 + PWM_TIM3_CHANNEL2 + \
|
||||||
|
PWM_TIM3_CHANNEL3 + PWM_TIM3_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM4_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM4_CH1OUT
|
||||||
|
# define PWM_TIM4_CH1CFG GPIO_TIM4_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM4_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM4_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM4_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM4_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM4_CH2OUT
|
||||||
|
# define PWM_TIM4_CH2CFG GPIO_TIM4_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM4_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM4_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM4_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM4_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM4_CH3OUT
|
||||||
|
# define PWM_TIM4_CH3CFG GPIO_TIM4_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM4_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM4_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM4_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM4_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM4_CH4OUT
|
||||||
|
# define PWM_TIM4_CH4CFG GPIO_TIM4_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM4_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM4_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM4_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM4_NCHANNELS (PWM_TIM4_CHANNEL1 + PWM_TIM4_CHANNEL2 + \
|
||||||
|
PWM_TIM4_CHANNEL3 + PWM_TIM4_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM5_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM5_CH1OUT
|
||||||
|
# define PWM_TIM5_CH1CFG GPIO_TIM5_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM5_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM5_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM5_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM5_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM5_CH2OUT
|
||||||
|
# define PWM_TIM5_CH2CFG GPIO_TIM5_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM5_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM5_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM5_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM5_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM5_CH3OUT
|
||||||
|
# define PWM_TIM5_CH3CFG GPIO_TIM5_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM5_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM5_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM5_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM5_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM5_CH4OUT
|
||||||
|
# define PWM_TIM5_CH4CFG GPIO_TIM5_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM5_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM5_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM5_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM5_NCHANNELS (PWM_TIM5_CHANNEL1 + PWM_TIM5_CHANNEL2 + \
|
||||||
|
PWM_TIM5_CHANNEL3 + PWM_TIM5_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM8_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM8_CH1OUT
|
||||||
|
# define PWM_TIM8_CH1CFG GPIO_TIM8_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM8_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM8_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM8_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM8_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM8_CH2OUT
|
||||||
|
# define PWM_TIM8_CH2CFG GPIO_TIM8_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM8_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM8_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM8_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM8_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM8_CH3OUT
|
||||||
|
# define PWM_TIM8_CH3CFG GPIO_TIM8_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM8_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM8_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM8_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM8_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM8_CH4OUT
|
||||||
|
# define PWM_TIM8_CH4CFG GPIO_TIM8_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM8_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM8_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM8_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM8_NCHANNELS (PWM_TIM8_CHANNEL1 + PWM_TIM8_CHANNEL2 + \
|
||||||
|
PWM_TIM8_CHANNEL3 + PWM_TIM8_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM9_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM9_CH1OUT
|
||||||
|
# define PWM_TIM9_CH1CFG GPIO_TIM9_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM9_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM9_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM9_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM9_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM9_CH2OUT
|
||||||
|
# define PWM_TIM9_CH2CFG GPIO_TIM9_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM9_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM9_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM9_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM9_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM9_CH3OUT
|
||||||
|
# define PWM_TIM9_CH3CFG GPIO_TIM9_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM9_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM9_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM9_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM9_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM9_CH4OUT
|
||||||
|
# define PWM_TIM9_CH4CFG GPIO_TIM9_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM9_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM9_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM9_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM9_NCHANNELS (PWM_TIM9_CHANNEL1 + PWM_TIM9_CHANNEL2 + \
|
||||||
|
PWM_TIM9_CHANNEL3 + PWM_TIM9_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM10_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM10_CH1OUT
|
||||||
|
# define PWM_TIM10_CH1CFG GPIO_TIM10_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM10_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM10_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM10_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM10_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM10_CH2OUT
|
||||||
|
# define PWM_TIM10_CH2CFG GPIO_TIM10_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM10_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM10_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM10_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM10_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM10_CH3OUT
|
||||||
|
# define PWM_TIM10_CH3CFG GPIO_TIM10_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM10_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM10_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM10_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM10_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM10_CH4OUT
|
||||||
|
# define PWM_TIM10_CH4CFG GPIO_TIM10_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM10_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM10_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM10_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM10_NCHANNELS (PWM_TIM10_CHANNEL1 + PWM_TIM10_CHANNEL2 + \
|
||||||
|
PWM_TIM10_CHANNEL3 + PWM_TIM10_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM11_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM11_CH1OUT
|
||||||
|
# define PWM_TIM11_CH1CFG GPIO_TIM11_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM11_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM11_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM11_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM11_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM11_CH2OUT
|
||||||
|
# define PWM_TIM11_CH2CFG GPIO_TIM11_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM11_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM11_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM11_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM11_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM11_CH3OUT
|
||||||
|
# define PWM_TIM11_CH3CFG GPIO_TIM11_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM11_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM11_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM11_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM11_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM11_CH4OUT
|
||||||
|
# define PWM_TIM11_CH4CFG GPIO_TIM11_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM11_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM11_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM11_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM11_NCHANNELS (PWM_TIM11_CHANNEL1 + PWM_TIM11_CHANNEL2 + \
|
||||||
|
PWM_TIM11_CHANNEL3 + PWM_TIM11_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM12_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM12_CH1OUT
|
||||||
|
# define PWM_TIM12_CH1CFG GPIO_TIM12_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM12_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM12_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM12_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM12_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM12_CH2OUT
|
||||||
|
# define PWM_TIM12_CH2CFG GPIO_TIM12_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM12_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM12_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM12_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM12_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM12_CH3OUT
|
||||||
|
# define PWM_TIM12_CH3CFG GPIO_TIM12_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM12_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM12_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM12_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM12_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM12_CH4OUT
|
||||||
|
# define PWM_TIM12_CH4CFG GPIO_TIM12_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM12_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM12_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM12_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM12_NCHANNELS (PWM_TIM12_CHANNEL1 + PWM_TIM12_CHANNEL2 + \
|
||||||
|
PWM_TIM12_CHANNEL3 + PWM_TIM12_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM13_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM13_CH1OUT
|
||||||
|
# define PWM_TIM13_CH1CFG GPIO_TIM13_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM13_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM13_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM13_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM13_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM13_CH2OUT
|
||||||
|
# define PWM_TIM13_CH2CFG GPIO_TIM13_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM13_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM13_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM13_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM13_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM13_CH3OUT
|
||||||
|
# define PWM_TIM13_CH3CFG GPIO_TIM13_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM13_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM13_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM13_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM13_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM13_CH4OUT
|
||||||
|
# define PWM_TIM13_CH4CFG GPIO_TIM13_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM13_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM13_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM13_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM13_NCHANNELS (PWM_TIM13_CHANNEL1 + PWM_TIM13_CHANNEL2 + \
|
||||||
|
PWM_TIM13_CHANNEL3 + PWM_TIM13_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM14_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM14_CH1OUT
|
||||||
|
# define PWM_TIM14_CH1CFG GPIO_TIM14_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM14_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM14_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM14_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM14_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM14_CH2OUT
|
||||||
|
# define PWM_TIM14_CH2CFG GPIO_TIM14_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM14_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM14_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM14_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM14_CHANNEL3
|
||||||
|
# ifdef CONFIG_STM32_TIM14_CH3OUT
|
||||||
|
# define PWM_TIM14_CH3CFG GPIO_TIM14_CH3OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM14_CH3CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM14_CHANNEL3 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM14_CHANNEL3 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM14_CHANNEL4
|
||||||
|
# ifdef CONFIG_STM32_TIM14_CH4OUT
|
||||||
|
# define PWM_TIM14_CH4CFG GPIO_TIM14_CH4OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM14_CH4CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM14_CHANNEL4 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM14_CHANNEL4 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM14_NCHANNELS (PWM_TIM14_CHANNEL1 + PWM_TIM14_CHANNEL2 + \
|
||||||
|
PWM_TIM14_CHANNEL3 + PWM_TIM14_CHANNEL4)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM15_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM15_CH1OUT
|
||||||
|
# define PWM_TIM15_CH1CFG GPIO_TIM15_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM15_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM15_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM15_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_STM32_TIM15_CHANNEL2
|
||||||
|
# ifdef CONFIG_STM32_TIM15_CH2OUT
|
||||||
|
# define PWM_TIM15_CH2CFG GPIO_TIM15_CH2OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM15_CH2CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM15_CHANNEL2 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM15_CHANNEL2 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM15_NCHANNELS (PWM_TIM15_CHANNEL1 + PWM_TIM15_CHANNEL2)
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM16_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM16_CH1OUT
|
||||||
|
# define PWM_TIM16_CH1CFG GPIO_TIM16_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM16_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM16_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM16_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM16_NCHANNELS PWM_TIM16_CHANNEL1
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM17_CHANNEL1
|
||||||
|
# ifdef CONFIG_STM32_TIM17_CH1OUT
|
||||||
|
# define PWM_TIM17_CH1CFG GPIO_TIM17_CH1OUT
|
||||||
|
# else
|
||||||
|
# define PWM_TIM17_CH1CFG 0
|
||||||
|
# endif
|
||||||
|
# define PWM_TIM17_CHANNEL1 1
|
||||||
|
#else
|
||||||
|
# define PWM_TIM17_CHANNEL1 0
|
||||||
|
#endif
|
||||||
|
#define PWM_TIM17_NCHANNELS PWM_TIM17_CHANNEL1
|
||||||
|
|
||||||
|
#define PWM_MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
#define PWM_NCHANNELS PWM_MAX(PWM_TIM1_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM2_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM3_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM4_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM5_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM8_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM9_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM10_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM11_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM12_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM13_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM14_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM15_NCHANNELS, \
|
||||||
|
PWM_MAX(PWM_TIM16_NCHANNELS, \
|
||||||
|
PWM_TIM17_NCHANNELS))))))))))))))
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
/* For each timer that is enabled for PWM usage, we need the following additional
|
/* For each timer that is enabled for PWM usage, we need the following additional
|
||||||
* configuration settings:
|
* configuration settings:
|
||||||
*
|
*
|
||||||
@ -131,13 +728,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM1_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM1_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM1_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM1_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM1_CHANNEL == 1
|
# elif CONFIG_STM32_TIM1_CHANNEL == 1
|
||||||
# define PWM_TIM1_PINCFG GPIO_TIM1_CH1OUT
|
# define CONFIG_STM32_TIM1_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM1_CH1MODE CONFIG_STM32_TIM1_CHMODE
|
||||||
|
# define PWM_TIM1_CH1CFG GPIO_TIM1_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM1_CHANNEL == 2
|
# elif CONFIG_STM32_TIM1_CHANNEL == 2
|
||||||
# define PWM_TIM1_PINCFG GPIO_TIM1_CH2OUT
|
# define CONFIG_STM32_TIM1_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM1_CH2MODE CONFIG_STM32_TIM1_CHMODE
|
||||||
|
# define PWM_TIM1_CH2CFG GPIO_TIM1_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM1_CHANNEL == 3
|
# elif CONFIG_STM32_TIM1_CHANNEL == 3
|
||||||
# define PWM_TIM1_PINCFG GPIO_TIM1_CH3OUT
|
# define CONFIG_STM32_TIM1_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM1_CH3MODE CONFIG_STM32_TIM1_CHMODE
|
||||||
|
# define PWM_TIM1_CH3CFG GPIO_TIM1_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM1_CHANNEL == 4
|
# elif CONFIG_STM32_TIM1_CHANNEL == 4
|
||||||
# define PWM_TIM1_PINCFG GPIO_TIM1_CH4OUT
|
# define CONFIG_STM32_TIM1_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM1_CH4MODE CONFIG_STM32_TIM1_CHMODE
|
||||||
|
# define PWM_TIM1_CH4CFG GPIO_TIM1_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM1_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM1_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -147,13 +752,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM2_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM2_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM2_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM2_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM2_CHANNEL == 1
|
# elif CONFIG_STM32_TIM2_CHANNEL == 1
|
||||||
# define PWM_TIM2_PINCFG GPIO_TIM2_CH1OUT
|
# define CONFIG_STM32_TIM2_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM2_CH1MODE CONFIG_STM32_TIM2_CHMODE
|
||||||
|
# define PWM_TIM2_CH1CFG GPIO_TIM2_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM2_CHANNEL == 2
|
# elif CONFIG_STM32_TIM2_CHANNEL == 2
|
||||||
# define PWM_TIM2_PINCFG GPIO_TIM2_CH2OUT
|
# define CONFIG_STM32_TIM2_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM2_CH2MODE CONFIG_STM32_TIM2_CHMODE
|
||||||
|
# define PWM_TIM2_CH2CFG GPIO_TIM2_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM2_CHANNEL == 3
|
# elif CONFIG_STM32_TIM2_CHANNEL == 3
|
||||||
# define PWM_TIM2_PINCFG GPIO_TIM2_CH3OUT
|
# define CONFIG_STM32_TIM2_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM2_CH3MODE CONFIG_STM32_TIM2_CHMODE
|
||||||
|
# define PWM_TIM2_CH3CFG GPIO_TIM2_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM2_CHANNEL == 4
|
# elif CONFIG_STM32_TIM2_CHANNEL == 4
|
||||||
# define PWM_TIM2_PINCFG GPIO_TIM2_CH4OUT
|
# define CONFIG_STM32_TIM2_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM2_CH4MODE CONFIG_STM32_TIM2_CHMODE
|
||||||
|
# define PWM_TIM2_CH4CFG GPIO_TIM2_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM2_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM2_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -163,13 +776,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM3_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM3_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM3_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM3_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM3_CHANNEL == 1
|
# elif CONFIG_STM32_TIM3_CHANNEL == 1
|
||||||
# define PWM_TIM3_PINCFG GPIO_TIM3_CH1OUT
|
# define CONFIG_STM32_TIM3_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM3_CH1MODE CONFIG_STM32_TIM3_CHMODE
|
||||||
|
# define PWM_TIM3_CH1CFG GPIO_TIM3_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM3_CHANNEL == 2
|
# elif CONFIG_STM32_TIM3_CHANNEL == 2
|
||||||
# define PWM_TIM3_PINCFG GPIO_TIM3_CH2OUT
|
# define CONFIG_STM32_TIM3_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM3_CH2MODE CONFIG_STM32_TIM3_CHMODE
|
||||||
|
# define PWM_TIM3_CH2CFG GPIO_TIM3_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM3_CHANNEL == 3
|
# elif CONFIG_STM32_TIM3_CHANNEL == 3
|
||||||
# define PWM_TIM3_PINCFG GPIO_TIM3_CH3OUT
|
# define CONFIG_STM32_TIM3_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM3_CH3MODE CONFIG_STM32_TIM3_CHMODE
|
||||||
|
# define PWM_TIM3_CH3CFG GPIO_TIM3_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM3_CHANNEL == 4
|
# elif CONFIG_STM32_TIM3_CHANNEL == 4
|
||||||
# define PWM_TIM3_PINCFG GPIO_TIM3_CH4OUT
|
# define CONFIG_STM32_TIM3_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM3_CH4MODE CONFIG_STM32_TIM3_CHMODE
|
||||||
|
# define PWM_TIM3_CH4CFG GPIO_TIM3_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM3_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM3_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -179,13 +800,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM4_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM4_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM4_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM4_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM4_CHANNEL == 1
|
# elif CONFIG_STM32_TIM4_CHANNEL == 1
|
||||||
# define PWM_TIM4_PINCFG GPIO_TIM4_CH1OUT
|
# define CONFIG_STM32_TIM4_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM4_CH1MODE CONFIG_STM32_TIM4_CHMODE
|
||||||
|
# define PWM_TIM4_CH1CFG GPIO_TIM4_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM4_CHANNEL == 2
|
# elif CONFIG_STM32_TIM4_CHANNEL == 2
|
||||||
# define PWM_TIM4_PINCFG GPIO_TIM4_CH2OUT
|
# define CONFIG_STM32_TIM4_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM4_CH2MODE CONFIG_STM32_TIM4_CHMODE
|
||||||
|
# define PWM_TIM4_CH2CFG GPIO_TIM4_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM4_CHANNEL == 3
|
# elif CONFIG_STM32_TIM4_CHANNEL == 3
|
||||||
# define PWM_TIM4_PINCFG GPIO_TIM4_CH3OUT
|
# define CONFIG_STM32_TIM4_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM4_CH3MODE CONFIG_STM32_TIM4_CHMODE
|
||||||
|
# define PWM_TIM4_CH3CFG GPIO_TIM4_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM4_CHANNEL == 4
|
# elif CONFIG_STM32_TIM4_CHANNEL == 4
|
||||||
# define PWM_TIM4_PINCFG GPIO_TIM4_CH4OUT
|
# define CONFIG_STM32_TIM4_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM4_CH4MODE CONFIG_STM32_TIM4_CHMODE
|
||||||
|
# define PWM_TIM4_CH4CFG GPIO_TIM4_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM4_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM4_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -195,13 +824,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM5_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM5_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM5_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM5_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM5_CHANNEL == 1
|
# elif CONFIG_STM32_TIM5_CHANNEL == 1
|
||||||
# define PWM_TIM5_PINCFG GPIO_TIM5_CH1OUT
|
# define CONFIG_STM32_TIM5_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM5_CH1MODE CONFIG_STM32_TIM5_CHMODE
|
||||||
|
# define PWM_TIM5_CH1CFG GPIO_TIM5_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM5_CHANNEL == 2
|
# elif CONFIG_STM32_TIM5_CHANNEL == 2
|
||||||
# define PWM_TIM5_PINCFG GPIO_TIM5_CH2OUT
|
# define CONFIG_STM32_TIM5_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM5_CH2MODE CONFIG_STM32_TIM5_CHMODE
|
||||||
|
# define PWM_TIM5_CH2CFG GPIO_TIM5_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM5_CHANNEL == 3
|
# elif CONFIG_STM32_TIM5_CHANNEL == 3
|
||||||
# define PWM_TIM5_PINCFG GPIO_TIM5_CH3OUT
|
# define CONFIG_STM32_TIM5_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM5_CH3MODE CONFIG_STM32_TIM5_CHMODE
|
||||||
|
# define PWM_TIM5_CH3CFG GPIO_TIM5_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM5_CHANNEL == 4
|
# elif CONFIG_STM32_TIM5_CHANNEL == 4
|
||||||
# define PWM_TIM5_PINCFG GPIO_TIM5_CH4OUT
|
# define CONFIG_STM32_TIM5_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM5_CH4MODE CONFIG_STM32_TIM5_CHMODE
|
||||||
|
# define PWM_TIM5_CH4CFG GPIO_TIM5_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM5_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM5_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -211,13 +848,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM8_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM8_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM8_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM8_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM8_CHANNEL == 1
|
# elif CONFIG_STM32_TIM8_CHANNEL == 1
|
||||||
# define PWM_TIM8_PINCFG GPIO_TIM8_CH1OUT
|
# define CONFIG_STM32_TIM8_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM8_CH1MODE CONFIG_STM32_TIM8_CHMODE
|
||||||
|
# define PWM_TIM8_CH1CFG GPIO_TIM8_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM8_CHANNEL == 2
|
# elif CONFIG_STM32_TIM8_CHANNEL == 2
|
||||||
# define PWM_TIM8_PINCFG GPIO_TIM8_CH2OUT
|
# define CONFIG_STM32_TIM8_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM8_CH2MODE CONFIG_STM32_TIM8_CHMODE
|
||||||
|
# define PWM_TIM8_CH2CFG GPIO_TIM8_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM8_CHANNEL == 3
|
# elif CONFIG_STM32_TIM8_CHANNEL == 3
|
||||||
# define PWM_TIM8_PINCFG GPIO_TIM8_CH3OUT
|
# define CONFIG_STM32_TIM8_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM8_CH3MODE CONFIG_STM32_TIM8_CHMODE
|
||||||
|
# define PWM_TIM8_CH3CFG GPIO_TIM8_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM8_CHANNEL == 4
|
# elif CONFIG_STM32_TIM8_CHANNEL == 4
|
||||||
# define PWM_TIM8_PINCFG GPIO_TIM8_CH4OUT
|
# define CONFIG_STM32_TIM8_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM8_CH4MODE CONFIG_STM32_TIM8_CHMODE
|
||||||
|
# define PWM_TIM8_CH4CFG GPIO_TIM8_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM8_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM8_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -227,13 +872,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM9_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM9_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM9_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM9_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM9_CHANNEL == 1
|
# elif CONFIG_STM32_TIM9_CHANNEL == 1
|
||||||
# define PWM_TIM9_PINCFG GPIO_TIM9_CH1OUT
|
# define CONFIG_STM32_TIM9_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM9_CH1MODE CONFIG_STM32_TIM9_CHMODE
|
||||||
|
# define PWM_TIM9_CH1CFG GPIO_TIM9_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM9_CHANNEL == 2
|
# elif CONFIG_STM32_TIM9_CHANNEL == 2
|
||||||
# define PWM_TIM9_PINCFG GPIO_TIM9_CH2OUT
|
# define CONFIG_STM32_TIM9_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM9_CH2MODE CONFIG_STM32_TIM9_CHMODE
|
||||||
|
# define PWM_TIM9_CH2CFG GPIO_TIM9_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM9_CHANNEL == 3
|
# elif CONFIG_STM32_TIM9_CHANNEL == 3
|
||||||
# define PWM_TIM9_PINCFG GPIO_TIM9_CH3OUT
|
# define CONFIG_STM32_TIM9_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM9_CH3MODE CONFIG_STM32_TIM9_CHMODE
|
||||||
|
# define PWM_TIM9_CH3CFG GPIO_TIM9_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM9_CHANNEL == 4
|
# elif CONFIG_STM32_TIM9_CHANNEL == 4
|
||||||
# define PWM_TIM9_PINCFG GPIO_TIM9_CH4OUT
|
# define CONFIG_STM32_TIM9_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM9_CH4MODE CONFIG_STM32_TIM9_CHMODE
|
||||||
|
# define PWM_TIM9_CH4CFG GPIO_TIM9_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM9_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM9_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -243,13 +896,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM10_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM10_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM10_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM10_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM10_CHANNEL == 1
|
# elif CONFIG_STM32_TIM10_CHANNEL == 1
|
||||||
# define PWM_TIM10_PINCFG GPIO_TIM10_CH1OUT
|
# define CONFIG_STM32_TIM10_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM10_CH1MODE CONFIG_STM32_TIM10_CHMODE
|
||||||
|
# define PWM_TIM10_CH1CFG GPIO_TIM10_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM10_CHANNEL == 2
|
# elif CONFIG_STM32_TIM10_CHANNEL == 2
|
||||||
# define PWM_TIM10_PINCFG GPIO_TIM10_CH2OUT
|
# define CONFIG_STM32_TIM10_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM10_CH2MODE CONFIG_STM32_TIM10_CHMODE
|
||||||
|
# define PWM_TIM10_CH2CFG GPIO_TIM10_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM10_CHANNEL == 3
|
# elif CONFIG_STM32_TIM10_CHANNEL == 3
|
||||||
# define PWM_TIM10_PINCFG GPIO_TIM10_CH3OUT
|
# define CONFIG_STM32_TIM10_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM10_CH3MODE CONFIG_STM32_TIM10_CHMODE
|
||||||
|
# define PWM_TIM10_CH3CFG GPIO_TIM10_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM10_CHANNEL == 4
|
# elif CONFIG_STM32_TIM10_CHANNEL == 4
|
||||||
# define PWM_TIM10_PINCFG GPIO_TIM10_CH4OUT
|
# define CONFIG_STM32_TIM10_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM10_CH4MODE CONFIG_STM32_TIM10_CHMODE
|
||||||
|
# define PWM_TIM10_CH4CFG GPIO_TIM10_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM10_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM10_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -259,13 +920,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM11_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM11_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM11_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM11_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM11_CHANNEL == 1
|
# elif CONFIG_STM32_TIM11_CHANNEL == 1
|
||||||
# define PWM_TIM11_PINCFG GPIO_TIM11_CH1OUT
|
# define CONFIG_STM32_TIM11_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM11_CH1MODE CONFIG_STM32_TIM11_CHMODE
|
||||||
|
# define PWM_TIM11_CH1CFG GPIO_TIM11_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM11_CHANNEL == 2
|
# elif CONFIG_STM32_TIM11_CHANNEL == 2
|
||||||
# define PWM_TIM11_PINCFG GPIO_TIM11_CH2OUT
|
# define CONFIG_STM32_TIM11_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM11_CH2MODE CONFIG_STM32_TIM11_CHMODE
|
||||||
|
# define PWM_TIM11_CH2CFG GPIO_TIM11_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM11_CHANNEL == 3
|
# elif CONFIG_STM32_TIM11_CHANNEL == 3
|
||||||
# define PWM_TIM11_PINCFG GPIO_TIM11_CH3OUT
|
# define CONFIG_STM32_TIM11_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM11_CH3MODE CONFIG_STM32_TIM11_CHMODE
|
||||||
|
# define PWM_TIM11_CH3CFG GPIO_TIM11_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM11_CHANNEL == 4
|
# elif CONFIG_STM32_TIM11_CHANNEL == 4
|
||||||
# define PWM_TIM11_PINCFG GPIO_TIM11_CH4OUT
|
# define CONFIG_STM32_TIM11_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM11_CH4MODE CONFIG_STM32_TIM11_CHMODE
|
||||||
|
# define PWM_TIM11_CH4CFG GPIO_TIM11_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM11_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM11_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -275,13 +944,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM12_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM12_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM12_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM12_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM12_CHANNEL == 1
|
# elif CONFIG_STM32_TIM12_CHANNEL == 1
|
||||||
# define PWM_TIM12_PINCFG GPIO_TIM12_CH1OUT
|
# define CONFIG_STM32_TIM12_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM12_CH1MODE CONFIG_STM32_TIM12_CHMODE
|
||||||
|
# define PWM_TIM12_CH1CFG GPIO_TIM12_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM12_CHANNEL == 2
|
# elif CONFIG_STM32_TIM12_CHANNEL == 2
|
||||||
# define PWM_TIM12_PINCFG GPIO_TIM12_CH2OUT
|
# define CONFIG_STM32_TIM12_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM12_CH2MODE CONFIG_STM32_TIM12_CHMODE
|
||||||
|
# define PWM_TIM12_CH2CFG GPIO_TIM12_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM12_CHANNEL == 3
|
# elif CONFIG_STM32_TIM12_CHANNEL == 3
|
||||||
# define PWM_TIM12_PINCFG GPIO_TIM12_CH3OUT
|
# define CONFIG_STM32_TIM12_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM12_CH3MODE CONFIG_STM32_TIM12_CHMODE
|
||||||
|
# define PWM_TIM12_CH3CFG GPIO_TIM12_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM12_CHANNEL == 4
|
# elif CONFIG_STM32_TIM12_CHANNEL == 4
|
||||||
# define PWM_TIM12_PINCFG GPIO_TIM12_CH4OUT
|
# define CONFIG_STM32_TIM12_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM12_CH4MODE CONFIG_STM32_TIM12_CHMODE
|
||||||
|
# define PWM_TIM12_CH4CFG GPIO_TIM12_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM12_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM12_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -291,13 +968,21 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM13_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM13_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM13_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM13_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM13_CHANNEL == 1
|
# elif CONFIG_STM32_TIM13_CHANNEL == 1
|
||||||
# define PWM_TIM13_PINCFG GPIO_TIM13_CH1OUT
|
# define CONFIG_STM32_TIM13_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM13_CH1MODE CONFIG_STM32_TIM13_CHMODE
|
||||||
|
# define PWM_TIM13_CH1CFG GPIO_TIM13_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM13_CHANNEL == 2
|
# elif CONFIG_STM32_TIM13_CHANNEL == 2
|
||||||
# define PWM_TIM13_PINCFG GPIO_TIM13_CH2OUT
|
# define CONFIG_STM32_TIM13_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM13_CH2MODE CONFIG_STM32_TIM13_CHMODE
|
||||||
|
# define PWM_TIM13_CH2CFG GPIO_TIM13_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM13_CHANNEL == 3
|
# elif CONFIG_STM32_TIM13_CHANNEL == 3
|
||||||
# define PWM_TIM13_PINCFG GPIO_TIM13_CH3OUT
|
# define CONFIG_STM32_TIM13_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM13_CH3MODE CONFIG_STM32_TIM13_CHMODE
|
||||||
|
# define PWM_TIM13_CH3CFG GPIO_TIM13_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM13_CHANNEL == 4
|
# elif CONFIG_STM32_TIM13_CHANNEL == 4
|
||||||
# define PWM_TIM13_PINCFG GPIO_TIM13_CH4OUT
|
# define CONFIG_STM32_TIM13_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM13_CH4MODE CONFIG_STM32_TIM13_CHMODE
|
||||||
|
# define PWM_TIM13_CH4CFG GPIO_TIM13_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM13_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM13_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
@ -307,18 +992,70 @@
|
|||||||
# if !defined(CONFIG_STM32_TIM14_CHANNEL)
|
# if !defined(CONFIG_STM32_TIM14_CHANNEL)
|
||||||
# error "CONFIG_STM32_TIM14_CHANNEL must be provided"
|
# error "CONFIG_STM32_TIM14_CHANNEL must be provided"
|
||||||
# elif CONFIG_STM32_TIM14_CHANNEL == 1
|
# elif CONFIG_STM32_TIM14_CHANNEL == 1
|
||||||
# define PWM_TIM14_PINCFG GPIO_TIM14_CH1OUT
|
# define CONFIG_STM32_TIM14_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM14_CH1MODE CONFIG_STM32_TIM14_CHMODE
|
||||||
|
# define PWM_TIM14_CH1CFG GPIO_TIM14_CH1OUT
|
||||||
# elif CONFIG_STM32_TIM14_CHANNEL == 2
|
# elif CONFIG_STM32_TIM14_CHANNEL == 2
|
||||||
# define PWM_TIM14_PINCFG GPIO_TIM14_CH2OUT
|
# define CONFIG_STM32_TIM14_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM14_CH2MODE CONFIG_STM32_TIM14_CHMODE
|
||||||
|
# define PWM_TIM14_CH2CFG GPIO_TIM14_CH2OUT
|
||||||
# elif CONFIG_STM32_TIM14_CHANNEL == 3
|
# elif CONFIG_STM32_TIM14_CHANNEL == 3
|
||||||
# define PWM_TIM14_PINCFG GPIO_TIM14_CH3OUT
|
# define CONFIG_STM32_TIM14_CHANNEL3 1
|
||||||
|
# define CONFIG_STM32_TIM14_CH3MODE CONFIG_STM32_TIM14_CHMODE
|
||||||
|
# define PWM_TIM14_CH3CFG GPIO_TIM14_CH3OUT
|
||||||
# elif CONFIG_STM32_TIM14_CHANNEL == 4
|
# elif CONFIG_STM32_TIM14_CHANNEL == 4
|
||||||
# define PWM_TIM14_PINCFG GPIO_TIM14_CH4OUT
|
# define CONFIG_STM32_TIM14_CHANNEL4 1
|
||||||
|
# define CONFIG_STM32_TIM14_CH4MODE CONFIG_STM32_TIM14_CHMODE
|
||||||
|
# define PWM_TIM14_CH4CFG GPIO_TIM14_CH4OUT
|
||||||
# else
|
# else
|
||||||
# error "Unsupported value of CONFIG_STM32_TIM14_CHANNEL"
|
# error "Unsupported value of CONFIG_STM32_TIM14_CHANNEL"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM15_PWM
|
||||||
|
# if !defined(CONFIG_STM32_TIM15_CHANNEL)
|
||||||
|
# error "CONFIG_STM32_TIM15_CHANNEL must be provided"
|
||||||
|
# elif CONFIG_STM32_TIM15_CHANNEL == 1
|
||||||
|
# define CONFIG_STM32_TIM15_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM15_CH1MODE CONFIG_STM32_TIM15_CHMODE
|
||||||
|
# define PWM_TIM15_CH1CFG GPIO_TIM15_CH1OUT
|
||||||
|
# elif CONFIG_STM32_TIM15_CHANNEL == 2
|
||||||
|
# define CONFIG_STM32_TIM15_CHANNEL2 1
|
||||||
|
# define CONFIG_STM32_TIM15_CH2MODE CONFIG_STM32_TIM15_CHMODE
|
||||||
|
# define PWM_TIM15_CH2CFG GPIO_TIM15_CH2OUT
|
||||||
|
# else
|
||||||
|
# error "Unsupported value of CONFIG_STM32_TIM15_CHANNEL"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM16_PWM
|
||||||
|
# if !defined(CONFIG_STM32_TIM16_CHANNEL)
|
||||||
|
# error "CONFIG_STM32_TIM16_CHANNEL must be provided"
|
||||||
|
# elif CONFIG_STM32_TIM16_CHANNEL == 1
|
||||||
|
# define CONFIG_STM32_TIM16_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM16_CH1MODE CONFIG_STM32_TIM16_CHMODE
|
||||||
|
# define PWM_TIM16_CH1CFG GPIO_TIM16_CH1OUT
|
||||||
|
# else
|
||||||
|
# error "Unsupported value of CONFIG_STM32_TIM16_CHANNEL"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32_TIM17_PWM
|
||||||
|
# if !defined(CONFIG_STM32_TIM17_CHANNEL)
|
||||||
|
# error "CONFIG_STM32_TIM17_CHANNEL must be provided"
|
||||||
|
# elif CONFIG_STM32_TIM17_CHANNEL == 1
|
||||||
|
# define CONFIG_STM32_TIM17_CHANNEL1 1
|
||||||
|
# define CONFIG_STM32_TIM17_CH1MODE CONFIG_STM32_TIM17_CHMODE
|
||||||
|
# define PWM_TIM17_CH1CFG GPIO_TIM17_CH1OUT
|
||||||
|
# else
|
||||||
|
# error "Unsupported value of CONFIG_STM32_TIM17_CHANNEL"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PWM_NCHANNELS 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
@ -351,7 +1088,7 @@ extern "C"
|
|||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* timer - A number identifying the timer use. The number of valid timer
|
* timer - A number identifying the timer use. The number of valid timer
|
||||||
* IDs varies with the STM32 MCU and MCU family but is somewhere in
|
* IDs varies with the STM32 MCU and MCU family but is somewhere in
|
||||||
* the range of {1,..,14}.
|
* the range of {1,..,17}.
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* On success, a pointer to the STM32 lower half PWM driver is returned.
|
* On success, a pointer to the STM32 lower half PWM driver is returned.
|
||||||
|
@ -240,7 +240,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = SRAM1_END - g_idle_topstack;
|
*heap_size = SRAM1_END - g_idle_topstack;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
void up_decodeirq(uint32_t *regs)
|
void up_decodeirq(uint32_t *regs)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
lowsyslog(LOG_ERR, "Unexpected IRQ\n");
|
||||||
current_regs = regs;
|
current_regs = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
@ -101,7 +101,7 @@ void up_decodeirq(uint32_t *regs)
|
|||||||
* info from CIC register without the setup).
|
* info from CIC register without the setup).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
irq = getreg32(STR71X_EIC_IVR);
|
irq = getreg32(STR71X_EIC_IVR);
|
||||||
|
|
||||||
/* Verify that the resulting IRQ number is valid */
|
/* Verify that the resulting IRQ number is valid */
|
||||||
@ -138,6 +138,6 @@ void up_decodeirq(uint32_t *regs)
|
|||||||
PANIC(); /* Normally never happens */
|
PANIC(); /* Normally never happens */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
.globl up_earlyserialinit /* Early initialization of serial driver */
|
.globl up_earlyserialinit /* Early initialization of serial driver */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
.globl board_led_initialize /* Boot LED setup */
|
.globl board_autoled_initialize /* Boot LED setup */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
.globl up_lowputc /* Low-level debug output */
|
.globl up_lowputc /* Low-level debug output */
|
||||||
@ -364,6 +364,7 @@ eicloop:
|
|||||||
strh \value, [\base1, #STR71X_APB_CKDIS_OFFSET]
|
strh \value, [\base1, #STR71X_APB_CKDIS_OFFSET]
|
||||||
|
|
||||||
/* Disable all(or most) APB2 peripherals */
|
/* Disable all(or most) APB2 peripherals */
|
||||||
|
|
||||||
ldr \value, =(STR71X_APB2_APB2ALL & ~STR71X_APB2_EIC)
|
ldr \value, =(STR71X_APB2_APB2ALL & ~STR71X_APB2_EIC)
|
||||||
strh \value, [\base2, #STR71X_APB_CKDIS_OFFSET]
|
strh \value, [\base2, #STR71X_APB_CKDIS_OFFSET]
|
||||||
|
|
||||||
@ -391,6 +392,7 @@ eicloop:
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
.macro remap, base, value
|
.macro remap, base, value
|
||||||
|
|
||||||
/* Read the PCU BOOTCR register */
|
/* Read the PCU BOOTCR register */
|
||||||
|
|
||||||
ldr \base, =STR71X_PCU_BASE
|
ldr \base, =STR71X_PCU_BASE
|
||||||
@ -481,7 +483,7 @@ __start:
|
|||||||
ldr pc, =__flashstart
|
ldr pc, =__flashstart
|
||||||
__flashstart:
|
__flashstart:
|
||||||
.rept 9
|
.rept 9
|
||||||
nop /* Wait for OSC stabilization*/
|
nop /* Wait for OSC stabilization */
|
||||||
.endr
|
.endr
|
||||||
|
|
||||||
/* Setup the initial processor mode */
|
/* Setup the initial processor mode */
|
||||||
@ -570,7 +572,7 @@ ctor_end:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
bl board_led_initialize
|
bl board_autoled_initialize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Then jump to OS entry */
|
/* Then jump to OS entry */
|
||||||
@ -626,4 +628,3 @@ g_idle_topstack:
|
|||||||
.size g_idle_topstack, .-g_idle_topstack
|
.size g_idle_topstack, .-g_idle_topstack
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the user-space heap settings */
|
/* Return the user-space heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)ubase;
|
*heap_start = (FAR void *)ubase;
|
||||||
*heap_size = usize;
|
*heap_size = usize;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
|
|
||||||
/* Return the heap settings */
|
/* Return the heap settings */
|
||||||
|
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
#endif
|
#endif
|
||||||
|
@ -160,7 +160,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
|
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
|
||||||
tcb->adj_stack_size = stack_size;
|
tcb->adj_stack_size = stack_size;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
|
uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -112,7 +112,7 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
|
|||||||
|
|
||||||
current_regs = savestate;
|
current_regs = savestate;
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -147,7 +147,7 @@ void up_sigdeliver(void)
|
|||||||
* to the size of register save structure size will protect its contents.
|
* to the size of register save structure size will protect its contents.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
|
tcb->adj_stack_ptr = (FAR void *)top_of_stack;
|
||||||
tcb->adj_stack_size = size_of_stack;
|
tcb->adj_stack_size = size_of_stack;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
uint32_t *up_doirq(int irq, uint32_t *regs)
|
uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -133,7 +133,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
|||||||
|
|
||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -150,7 +150,7 @@ void up_sigdeliver(void)
|
|||||||
* to the size of register save structure size will protect its contents.
|
* to the size of register save structure size will protect its contents.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -111,9 +111,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -286,6 +286,6 @@ void up_initialize(void)
|
|||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void*)g_idle_topstack;
|
*heap_start = (FAR void*)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
||||||
tcb->adj_stack_size = size_of_stack;
|
tcb->adj_stack_size = size_of_stack;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
uint8_t *up_doirq(int irq, uint8_t *regs)
|
uint8_t *up_doirq(int irq, uint8_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -133,6 +133,6 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
|
|||||||
|
|
||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
@ -210,5 +210,5 @@ void up_initialize(void)
|
|||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -299,9 +299,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -326,7 +326,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void *)g_idle_topstack;
|
*heap_start = (FAR void *)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (FAR uint32_t *)top_of_stack;
|
tcb->adj_stack_ptr = (FAR uint32_t *)top_of_stack;
|
||||||
tcb->adj_stack_size = size_of_stack;
|
tcb->adj_stack_size = size_of_stack;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,5 +211,5 @@ void up_initialize(void)
|
|||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -111,9 +111,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s *)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
uint32_t *up_doirq(int irq, uint32_t *regs)
|
uint32_t *up_doirq(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -143,6 +143,6 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
|
|||||||
|
|
||||||
up_enable_irq(irq);
|
up_enable_irq(irq);
|
||||||
#endif
|
#endif
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -136,7 +136,7 @@ void up_sigdeliver(void)
|
|||||||
* execution.
|
* execution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
|
|
||||||
/* up_fullcontextrestore() should not return but could if the software
|
/* up_fullcontextrestore() should not return but could if the software
|
||||||
|
@ -97,7 +97,7 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
|||||||
* processing an interrupt.
|
* processing an interrupt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
|
|
||||||
/* Save the current value of current_regs (to support nested interrupt
|
/* Save the current value of current_regs (to support nested interrupt
|
||||||
* handling). Then set current_regs to regs, indicating that this is
|
* handling). Then set current_regs to regs, indicating that this is
|
||||||
@ -189,11 +189,11 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
|||||||
current_regs = savestate;
|
current_regs = savestate;
|
||||||
if (current_regs == NULL)
|
if (current_regs == NULL)
|
||||||
{
|
{
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return regs;
|
return regs;
|
||||||
|
@ -94,7 +94,7 @@ uint32_t *pic32mx_exception(uint32_t *regs)
|
|||||||
* processing an interrupt.
|
* processing an interrupt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
/* Get the cause of the exception from the CAUSE register */
|
/* Get the cause of the exception from the CAUSE register */
|
||||||
|
@ -97,7 +97,7 @@ uint32_t *pic32mz_decodeirq(uint32_t *regs)
|
|||||||
* processing an interrupt.
|
* processing an interrupt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
|
|
||||||
/* Save the current value of current_regs (to support nested interrupt
|
/* Save the current value of current_regs (to support nested interrupt
|
||||||
* handling). Then set current_regs to regs, indicating that this is
|
* handling). Then set current_regs to regs, indicating that this is
|
||||||
@ -189,11 +189,11 @@ uint32_t *pic32mz_decodeirq(uint32_t *regs)
|
|||||||
current_regs = savestate;
|
current_regs = savestate;
|
||||||
if (current_regs == NULL)
|
if (current_regs == NULL)
|
||||||
{
|
{
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return regs;
|
return regs;
|
||||||
|
@ -94,7 +94,7 @@ uint32_t *pic32mz_exception(uint32_t *regs)
|
|||||||
* processing an interrupt.
|
* processing an interrupt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
/* Get the cause of the exception from the CAUSE register */
|
/* Get the cause of the exception from the CAUSE register */
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void*)g_idle_topstack;
|
*heap_start = (FAR void*)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -99,9 +99,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#if CONFIG_TASK_NAME_SIZE > 0
|
#if CONFIG_TASK_NAME_SIZE > 0
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -185,7 +185,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
||||||
tcb->adj_stack_size = size_of_stack;
|
tcb->adj_stack_size = size_of_stack;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
uint32_t *up_doirq(int irq, uint32_t* regs)
|
uint32_t *up_doirq(int irq, uint32_t* regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -133,7 +133,7 @@ uint32_t *up_doirq(int irq, uint32_t* regs)
|
|||||||
current_regs = NULL;
|
current_regs = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
#endif
|
#endif
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
@ -200,5 +200,5 @@ void up_initialize(void)
|
|||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
|
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -260,8 +260,8 @@ __start:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
.globl _board_led_initialize /* Boot LED setup */
|
.globl _board_autoled_initialize /* Boot LED setup */
|
||||||
jsr.a _board_led_initialize /* Call it */
|
jsr.a _board_autoled_initialize /* Call it */
|
||||||
#endif
|
#endif
|
||||||
showprogress '\n'
|
showprogress '\n'
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -136,7 +136,7 @@ void up_sigdeliver(void)
|
|||||||
* execution.
|
* execution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
.globl _up_earlyconsoleinit /* Early initialization of console driver */
|
.globl _up_earlyconsoleinit /* Early initialization of console driver */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
.globl _board_led_initialize /* Boot LED setup */
|
.globl _board_autoled_initialize /* Boot LED setup */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
.globl _up_lowputc /* Low-level debug output */
|
.globl _up_lowputc /* Low-level debug output */
|
||||||
@ -85,6 +85,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Interrupt handlers */
|
/* Interrupt handlers */
|
||||||
|
|
||||||
.globl _up_invalid_handler
|
.globl _up_invalid_handler
|
||||||
#ifdef CONFIG_SH1_DMAC0
|
#ifdef CONFIG_SH1_DMAC0
|
||||||
.globl _up_dmac0_handler
|
.globl _up_dmac0_handler
|
||||||
@ -445,7 +446,7 @@ __start0:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
mov.l .Lledinit, r0 /* Address of board_led_initialize */
|
mov.l .Lledinit, r0 /* Address of board_autoled_initialize */
|
||||||
jsr @r0 /* Call it */
|
jsr @r0 /* Call it */
|
||||||
or r0, r0 /* Delay slot */
|
or r0, r0 /* Delay slot */
|
||||||
#endif
|
#endif
|
||||||
@ -492,7 +493,7 @@ __start0:
|
|||||||
.long _up_lowputc
|
.long _up_lowputc
|
||||||
#endif
|
#endif
|
||||||
.Lledinit:
|
.Lledinit:
|
||||||
.long _board_led_initialize
|
.long _board_autoled_initialize
|
||||||
.Losstart:
|
.Losstart:
|
||||||
.long _os_start
|
.long _os_start
|
||||||
.Lsvect:
|
.Lsvect:
|
||||||
@ -521,4 +522,3 @@ _g_idle_topstack:
|
|||||||
.size _g_idle_topstack, .-_g_idle_topstack
|
.size _g_idle_topstack, .-_g_idle_topstack
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -133,7 +133,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
{
|
{
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
*heap_start = (FAR void*)g_idle_topstack;
|
*heap_start = (FAR void*)g_idle_topstack;
|
||||||
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
*heap_size = CONFIG_RAM_END - g_idle_topstack;
|
||||||
}
|
}
|
||||||
|
@ -261,9 +261,9 @@ static void _up_assert(int errorcode)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -288,7 +288,7 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
|
@ -211,5 +211,5 @@ void up_initialize(void)
|
|||||||
/* Initialize USB -- device and/or host */
|
/* Initialize USB -- device and/or host */
|
||||||
|
|
||||||
up_usbinitialize();
|
up_usbinitialize();
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
||||||
tcb->adj_stack_size = size_of_stack;
|
tcb->adj_stack_size = size_of_stack;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -132,7 +132,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ static void idt_outb(uint8_t val, uint16_t addr)
|
|||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
static uint32_t *common_handler(int irq, uint32_t *regs)
|
static uint32_t *common_handler(int irq, uint32_t *regs)
|
||||||
{
|
{
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
|
|
||||||
/* Current regs non-zero indicates that we are processing an interrupt;
|
/* Current regs non-zero indicates that we are processing an interrupt;
|
||||||
* current_regs is also used to manage interrupt level context switches.
|
* current_regs is also used to manage interrupt level context switches.
|
||||||
@ -163,7 +163,7 @@ static uint32_t *common_handler(int irq, uint32_t *regs)
|
|||||||
uint32_t *isr_handler(uint32_t *regs)
|
uint32_t *isr_handler(uint32_t *regs)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
PANIC(); /* Doesn't return */
|
PANIC(); /* Doesn't return */
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
#else
|
#else
|
||||||
@ -171,9 +171,9 @@ uint32_t *isr_handler(uint32_t *regs)
|
|||||||
|
|
||||||
/* Dispatch the interrupt */
|
/* Dispatch the interrupt */
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
ret = common_handler((int)regs[REG_IRQNO], regs);
|
ret = common_handler((int)regs[REG_IRQNO], regs);
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return ret;
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -189,14 +189,14 @@ uint32_t *isr_handler(uint32_t *regs)
|
|||||||
uint32_t *irq_handler(uint32_t *regs)
|
uint32_t *irq_handler(uint32_t *regs)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
PANIC(); /* Doesn't return */
|
PANIC(); /* Doesn't return */
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
#else
|
#else
|
||||||
uint32_t *ret;
|
uint32_t *ret;
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
|
|
||||||
/* Get the IRQ number */
|
/* Get the IRQ number */
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ uint32_t *irq_handler(uint32_t *regs)
|
|||||||
/* Dispatch the interrupt */
|
/* Dispatch the interrupt */
|
||||||
|
|
||||||
ret = common_handler(irq, regs);
|
ret = common_handler(irq, regs);
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
return ret;
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
{
|
{
|
||||||
*heap_start = (FAR void*)CONFIG_HEAP1_BASE;
|
*heap_start = (FAR void*)CONFIG_HEAP1_BASE;
|
||||||
*heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE;
|
*heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE;
|
||||||
board_led_on(LED_HEAPALLOCATE);
|
board_autoled_on(LED_HEAPALLOCATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -98,9 +98,9 @@ static void _up_assert(int errorcode) /* noreturn_function */
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
board_led_on(LED_PANIC);
|
board_autoled_on(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
board_led_off(LED_PANIC);
|
board_autoled_off(LED_PANIC);
|
||||||
up_mdelay(250);
|
up_mdelay(250);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ void up_assert(void)
|
|||||||
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_FILENAME
|
#ifdef CONFIG_HAVE_FILENAME
|
||||||
#if CONFIG_TASK_NAME_SIZE > 0
|
#if CONFIG_TASK_NAME_SIZE > 0
|
||||||
|
@ -166,7 +166,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
tcb->adj_stack_ptr = (uint32_t*)top_of_stack;
|
||||||
tcb->adj_stack_size = size_of_stack;
|
tcb->adj_stack_size = size_of_stack;
|
||||||
|
|
||||||
board_led_on(LED_STACKCREATED);
|
board_autoled_on(LED_STACKCREATED);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
|
|||||||
{
|
{
|
||||||
FAR chipreg_t *ret = regs;
|
FAR chipreg_t *ret = regs;
|
||||||
|
|
||||||
board_led_on(LED_INIRQ);
|
board_autoled_on(LED_INIRQ);
|
||||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
PANIC();
|
PANIC();
|
||||||
#else
|
#else
|
||||||
@ -124,7 +124,7 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
|
|||||||
current_regs = savestate;
|
current_regs = savestate;
|
||||||
}
|
}
|
||||||
|
|
||||||
board_led_off(LED_INIRQ);
|
board_autoled_off(LED_INIRQ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -88,11 +88,11 @@ void up_idle(void)
|
|||||||
g_ledtoggle++;
|
g_ledtoggle++;
|
||||||
if (g_ledtoggle == 0x80)
|
if (g_ledtoggle == 0x80)
|
||||||
{
|
{
|
||||||
board_led_on(LED_IDLE);
|
board_autoled_on(LED_IDLE);
|
||||||
}
|
}
|
||||||
else if (g_ledtoggle == 0x00)
|
else if (g_ledtoggle == 0x00)
|
||||||
{
|
{
|
||||||
board_led_off(LED_IDLE);
|
board_autoled_off(LED_IDLE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -212,5 +212,5 @@ void up_initialize(void)
|
|||||||
(void)tun_initialize();
|
(void)tun_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_on(LED_IRQSENABLED);
|
board_autoled_on(LED_IRQSENABLED);
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
|
|
||||||
board_led_on(LED_SIGNAL);
|
board_autoled_on(LED_SIGNAL);
|
||||||
|
|
||||||
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
@ -137,7 +137,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
|
||||||
board_led_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
SIGNAL_RETURN(regs);
|
SIGNAL_RETURN(regs);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
xref _z16f_clkinit:EROM
|
xref _z16f_clkinit:EROM
|
||||||
xref _z16f_lowinit:EROM
|
xref _z16f_lowinit:EROM
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
xref _board_led_initialize:EROM
|
xref _board_autoled_initialize:EROM
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_LOWUARTINIT)
|
#if defined(USE_LOWUARTINIT)
|
||||||
xref _z16f_lowuartinit:EROM
|
xref _z16f_lowuartinit:EROM
|
||||||
@ -158,7 +158,7 @@ _z16f_reset:
|
|||||||
/* Initialize onboard LEDs */
|
/* Initialize onboard LEDs */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
call _board_led_initialize
|
call _board_autoled_initialize
|
||||||
#endif
|
#endif
|
||||||
/* Perform VERY early UART initialization so that we can use it here */
|
/* Perform VERY early UART initialization so that we can use it here */
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user