This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d319ab3899 boards/mps2-an521: Correct the swapped UART0 TX and RX 
interrupts.
7d319ab3899 is described below

commit 7d319ab3899b9d4473ebc5f6e9ed7af96682b576
Author: Marco Casaroli <[email protected]>
AuthorDate: Sat Jul 25 21:03:13 2026 +0200

    boards/mps2-an521: Correct the swapped UART0 TX and RX interrupts.
    
    The SSE-200 subsystem the AN521 image implements lists the UART interrupts
    receive first: UART0 RX is external interrupt 32 and UART0 TX is 33, which
    in NuttX numbering are 48 and 49.  The configuration had those two the wrong
    way round, so the TX interrupt was dispatched to uart_cmsdk_rx_interrupt.
    
    That handler clears only UART_INTSTATUS_RX, so the asserted TX status bit
    survived the acknowledgement and the interrupt re-fired immediately.  The
    board live-locked in the interrupt handler as soon as the console emitted 
its
    first character: the NSH banner appeared, and nothing ran afterwards, 
console
    input included.
    
    Note that the overflow interrupt already sits at 63, external 47, which is
    where the SSE-200 map puts it only if the pair below it is receive first --
    the two corrected values are the ones consistent with it.  mps2-an500 
already
    follows the same order with RX at 16 and TX at 17.
    
    Assisted-by: Claude Code:claude-opus-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 boards/arm/mps/mps2-an521/configs/nsh/defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boards/arm/mps/mps2-an521/configs/nsh/defconfig 
b/boards/arm/mps/mps2-an521/configs/nsh/defconfig
index 462c9ed8e14..2b6006cfc16 100644
--- a/boards/arm/mps/mps2-an521/configs/nsh/defconfig
+++ b/boards/arm/mps/mps2-an521/configs/nsh/defconfig
@@ -23,9 +23,9 @@ CONFIG_CMSDK_UART0=y
 CONFIG_CMSDK_UART0_BASE=0x50200000
 CONFIG_CMSDK_UART0_CLOCK=25000000
 CONFIG_CMSDK_UART0_OV_IRQ=63
-CONFIG_CMSDK_UART0_RX_IRQ=49
+CONFIG_CMSDK_UART0_RX_IRQ=48
 CONFIG_CMSDK_UART0_SERIAL_CONSOLE=y
-CONFIG_CMSDK_UART0_TX_IRQ=48
+CONFIG_CMSDK_UART0_TX_IRQ=49
 CONFIG_CMSDK_UART=y
 CONFIG_DEBUG_ASSERTIONS=y
 CONFIG_DEBUG_FEATURES=y

Reply via email to