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
|
||||
bool "Maxim Integrated MAX326XX"
|
||||
select ARCH_HAVE_FETCHADD
|
||||
depends on EXPERIMENTAL
|
||||
---help---
|
||||
Maxim Integrated MAX326XX microcontrollers (ARM Cortex-M4F).
|
||||
|
||||
|
||||
@@ -15,18 +15,22 @@ choice
|
||||
config ARCH_CHIP_MAX32620
|
||||
bool "MAX32620"
|
||||
select ARCH_FAMILY_MAX32620
|
||||
depends on EXPERIMENTAL # Not fully implemented
|
||||
|
||||
config ARCH_CHIP_MAX32621
|
||||
bool "MAX32621"
|
||||
select ARCH_FAMILY_MAX32620
|
||||
depends on EXPERIMENTAL # Not fully implemented
|
||||
|
||||
config ARCH_CHIP_MAX32630
|
||||
bool "MAX32630"
|
||||
select ARCH_FAMILY_MAX32630
|
||||
depends on EXPERIMENTAL # Not fully implemented
|
||||
|
||||
config ARCH_CHIP_MAX32632
|
||||
bool "MAX32632"
|
||||
select ARCH_FAMILY_MAX32630
|
||||
depends on EXPERIMENTAL # Not fully implemented
|
||||
|
||||
config ARCH_CHIP_MAX32660
|
||||
bool "MAX32660"
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
/* 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_RXERRORS (UART_INT_FRAME | UART_INT_PARITY | \
|
||||
UART_INT_RXOVR)
|
||||
@@ -534,7 +534,7 @@ static int max326_interrupt(int irq, void *context, FAR void *arg)
|
||||
|
||||
/* Clear pending interrupt flags */
|
||||
|
||||
max326_serialout(priv, MAX326_UART_STAT_OFFSET,
|
||||
max326_serialout(priv, MAX326_UART_INTFL_OFFSET,
|
||||
intfl & UART_INT_ALL);
|
||||
|
||||
/* Handle incoming, receive bytes.
|
||||
|
||||
@@ -44,24 +44,15 @@ Status
|
||||
progress. Added a run-from-SRAM configuration to keep from locking
|
||||
up the board on bad configurations. The rest of the bring-up will
|
||||
use this SRAM configuration.
|
||||
|
||||
Some success the end of the day:
|
||||
|
||||
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.
|
||||
The NSH prompt comes up, but there is some interrupt-related problem
|
||||
that makes the console unusable.
|
||||
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
|
||||
unstable. Commenting out the WIF restores stability. The port does
|
||||
now run safely from FLASH although with some missing UART interrupts.
|
||||
unstable. Commenting out the WIF restores stability. The port now
|
||||
runs safely from FLASH although still with missing UART interrupts.
|
||||
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
|
||||
==============
|
||||
|
||||
@@ -13,8 +13,8 @@ CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=8192
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DISABLE_POLL=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_MAX326XX_UART1=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
|
||||
Reference in New Issue
Block a user