mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
arch/arm/src/max326xx: Fixes UART interrupt problems. With these changes, the NSH configuration appears stable and is no longer conditioned on EXPERIMENTAL.
This commit is contained in:
@@ -187,7 +187,6 @@ config ARCH_CHIP_LPC54XX
|
|||||||
config ARCH_CHIP_MAX326XX
|
config ARCH_CHIP_MAX326XX
|
||||||
bool "Maxim Integrated MAX326XX"
|
bool "Maxim Integrated MAX326XX"
|
||||||
select ARCH_HAVE_FETCHADD
|
select ARCH_HAVE_FETCHADD
|
||||||
depends on EXPERIMENTAL
|
|
||||||
---help---
|
---help---
|
||||||
Maxim Integrated MAX326XX microcontrollers (ARM Cortex-M4F).
|
Maxim Integrated MAX326XX microcontrollers (ARM Cortex-M4F).
|
||||||
|
|
||||||
|
|||||||
@@ -15,18 +15,22 @@ choice
|
|||||||
config ARCH_CHIP_MAX32620
|
config ARCH_CHIP_MAX32620
|
||||||
bool "MAX32620"
|
bool "MAX32620"
|
||||||
select ARCH_FAMILY_MAX32620
|
select ARCH_FAMILY_MAX32620
|
||||||
|
depends on EXPERIMENTAL # Not fully implemented
|
||||||
|
|
||||||
config ARCH_CHIP_MAX32621
|
config ARCH_CHIP_MAX32621
|
||||||
bool "MAX32621"
|
bool "MAX32621"
|
||||||
select ARCH_FAMILY_MAX32620
|
select ARCH_FAMILY_MAX32620
|
||||||
|
depends on EXPERIMENTAL # Not fully implemented
|
||||||
|
|
||||||
config ARCH_CHIP_MAX32630
|
config ARCH_CHIP_MAX32630
|
||||||
bool "MAX32630"
|
bool "MAX32630"
|
||||||
select ARCH_FAMILY_MAX32630
|
select ARCH_FAMILY_MAX32630
|
||||||
|
depends on EXPERIMENTAL # Not fully implemented
|
||||||
|
|
||||||
config ARCH_CHIP_MAX32632
|
config ARCH_CHIP_MAX32632
|
||||||
bool "MAX32632"
|
bool "MAX32632"
|
||||||
select ARCH_FAMILY_MAX32630
|
select ARCH_FAMILY_MAX32630
|
||||||
|
depends on EXPERIMENTAL # Not fully implemented
|
||||||
|
|
||||||
config ARCH_CHIP_MAX32660
|
config ARCH_CHIP_MAX32660
|
||||||
bool "MAX32660"
|
bool "MAX32660"
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
|
|
||||||
/* UART events */
|
/* UART events */
|
||||||
|
|
||||||
#define UART_INT_TX UART_INT_TXFIFOLVL
|
#define UART_INT_TX (UART_INT_TXFIFOLVL | UART_INT_TXFIFOAE)
|
||||||
#define UART_INT_RX (UART_INT_RXFIFOLVL | UART_INT_RXTO)
|
#define UART_INT_RX (UART_INT_RXFIFOLVL | UART_INT_RXTO)
|
||||||
#define UART_INT_RXERRORS (UART_INT_FRAME | UART_INT_PARITY | \
|
#define UART_INT_RXERRORS (UART_INT_FRAME | UART_INT_PARITY | \
|
||||||
UART_INT_RXOVR)
|
UART_INT_RXOVR)
|
||||||
@@ -534,7 +534,7 @@ static int max326_interrupt(int irq, void *context, FAR void *arg)
|
|||||||
|
|
||||||
/* Clear pending interrupt flags */
|
/* Clear pending interrupt flags */
|
||||||
|
|
||||||
max326_serialout(priv, MAX326_UART_STAT_OFFSET,
|
max326_serialout(priv, MAX326_UART_INTFL_OFFSET,
|
||||||
intfl & UART_INT_ALL);
|
intfl & UART_INT_ALL);
|
||||||
|
|
||||||
/* Handle incoming, receive bytes.
|
/* Handle incoming, receive bytes.
|
||||||
|
|||||||
@@ -44,24 +44,15 @@ Status
|
|||||||
progress. Added a run-from-SRAM configuration to keep from locking
|
progress. Added a run-from-SRAM configuration to keep from locking
|
||||||
up the board on bad configurations. The rest of the bring-up will
|
up the board on bad configurations. The rest of the bring-up will
|
||||||
use this SRAM configuration.
|
use this SRAM configuration.
|
||||||
|
The NSH prompt comes up, but there is some interrupt-related problem
|
||||||
Some success the end of the day:
|
that makes the console unusable.
|
||||||
|
|
||||||
ACFH
|
|
||||||
|
|
||||||
NuttShell (NSH) NuttX-7.27
|
|
||||||
nsh>
|
|
||||||
|
|
||||||
Still lots to do though. There is TX interrupt problem so it doesn't
|
|
||||||
look this good in real life. Probably due to TX FIFO level interrupt
|
|
||||||
issues. I comes up with 'NuttShell' then stops. I hit enter and
|
|
||||||
" (NSH) NuttX" comes out etc. So it looks like Rx input is driving
|
|
||||||
the Tx output.
|
|
||||||
2018-11-28: Found that the WFI instruction in the IDLE loop was causing
|
2018-11-28: Found that the WFI instruction in the IDLE loop was causing
|
||||||
instability. System ran OK until it was in IDLE then it became
|
instability. System ran OK until it was in IDLE then it became
|
||||||
unstable. Commenting out the WIF restores stability. The port does
|
unstable. Commenting out the WIF restores stability. The port now
|
||||||
now run safely from FLASH although with some missing UART interrupts.
|
runs safely from FLASH although still with missing UART interrupts.
|
||||||
Also fixed the on-board LED which now currently reflects the state.
|
Also fixed the on-board LED which now currently reflects the state.
|
||||||
|
2018-11-29: Resolved the UART interrupt issue. The NSH configuration
|
||||||
|
now appears fully functional. Removed EXPERIMENTAL from configuration.
|
||||||
|
|
||||||
Serial Console
|
Serial Console
|
||||||
==============
|
==============
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ CONFIG_ARMV7M_USEBASEPRI=y
|
|||||||
CONFIG_BOARD_LOOPSPERMSEC=8192
|
CONFIG_BOARD_LOOPSPERMSEC=8192
|
||||||
CONFIG_BUILTIN=y
|
CONFIG_BUILTIN=y
|
||||||
CONFIG_DISABLE_POLL=y
|
CONFIG_DISABLE_POLL=y
|
||||||
CONFIG_EXPERIMENTAL=y
|
|
||||||
CONFIG_FS_PROCFS=y
|
CONFIG_FS_PROCFS=y
|
||||||
|
CONFIG_INTELHEX_BINARY=y
|
||||||
CONFIG_MAX326XX_UART1=y
|
CONFIG_MAX326XX_UART1=y
|
||||||
CONFIG_MAX_TASKS=16
|
CONFIG_MAX_TASKS=16
|
||||||
CONFIG_MAX_WDOGPARMS=2
|
CONFIG_MAX_WDOGPARMS=2
|
||||||
|
|||||||
Reference in New Issue
Block a user