darrylring opened a new issue, #19771:
URL: https://github.com/apache/nuttx/issues/19771

   ### Description / Steps to reproduce the issue
   
   https://github.com/apache/nuttx/pull/19295 breaks Ethernet initialization on 
the STM32H5.
   
   The previous implementation for the STM32H5 used 32-bit reads which worked, 
but this uses 8-bit reads which do not.
   
   From 
https://community.st.com/stm32-mcus-60/how-to-avoid-a-hardfault-when-icache-is-enabled-on-the-stm32h5-series-126716:
   
   > It is also important to note that for 8-bit accesses, an AHB bus error is 
generated. For OTP and RO sectors in memory, a 6-bit ECC code is associated 
with each 16-bit data flash word. So, the embedded flash memory supports 
only16-bit or 32-bit write operations.
   
   There's the added issue noted in that thread that this implementation will 
fail with the ICACHE enabled. Potentially this code needs to check for the 
STM32H5 and ensure the ICACHE is disabled before attempting to access the OTP 
memory and/or an MPU region needs to be defined to ensure the address space  is 
non-cacheable. This may need a separate discussion.
   
   # Reproduction
   
   Apply this patch to enable Ethernet: 
[nucleo-h563zi-eth-test.patch](https://github.com/user-attachments/files/30910806/nucleo-h563zi-eth-test.patch)
   
   ```bash
   ./tools/configure.sh -l nucleo-h563zi:nsh
   make
   ```
   
   Program the Nucleo board and watch the serial console as it boots:
   
   ```
   ABCG
   dump_assert_info: Current Version: NuttX  13.0.0 7f6a0a30da-dirty Aug 10 
2026 10:10:53 arm
   dump_assert_info: Assertion failed panic: at file: 
armv8-m/arm_hardfault.c:147 task: <noname> process: Kernel 0x8003bc5
   up_dump_register: R0: 0801477d R1: 200059ac R2: 200059ac  R3: 08fff800
   up_dump_register: R4: 0801463f R5: 08014769 R6: 00000000  FP: 00000000
   up_dump_register: R8: ffffffff SB: ffffffff SL: 20005240 R11: ffffffff
   up_dump_register: IP: 00000000 SP: 20005988 LR: 0800df89  PC: 080147a4
   up_dump_register: xPSR: 89000000 BASEPRI: 00000000 CONTROL: 00000000
   up_dump_register: EXC_RETURN: ffffffac
   dump_stackinfo: User Stack:
   dump_stackinfo:   base: 0x20005230
   dump_stackinfo:   size: 00002024
   dump_stackinfo:     sp: 0x20005988
   stack_dump: 0x20005968: 00000000 00000000 00000000 00000000 00000000 
00000000 00000000 0801478f
   stack_dump: 0x20005988: 08014769 200059ac 200000b4 00000000 08012a03 
0801463f 0803e7c7 00000000
   stack_dump: 0x200059a8: 080129ff 08000dbd 200000b4 00000000 00000000 
08000e57 200047f0 00000000
   stack_dump: 0x200059c8: 200000b4 08012a03 00000000 08014769 08003c85 
08012a03 ffffffff 08003c85
   stack_dump: 0x200059e8: 080002c5 0009a5e8 20005a18 00000010 ffffffff 
080002db 20000440 08043268
   stack_dump: 0x20005a08: 7ffffffe 00000000 00000000 ffffffff 00000000 
00000000 00000000 00000000
   dump_tasks:    PID GROUP PRI POLICY   TYPE    NPX STATE   EVENT      SIGMASK 
         STACKBASE  STACKSIZE      USED   FILLED    COMMAND
   dump_tasks:   ----   --- --- -------- ------- --- ------- ---------- 
---------------- 0x20000700      2048      1248    60.9%    irq
   dump_task:       0     0   0 FIFO     Kthread -   Running            
0000000000000000 0x20005230      2024       608    30.0%    <noname>
   ```
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   Arch
   
   ### NuttX Version
   
   master
   
   ### Issue Architecture
   
   [Arch: arm]
   
   ### Issue Area
   
   [Area: Networking], [Area: Native port]
   
   ### Host information
   
   _No response_
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to