nRF54LM20A USBHS: CPU hangs when reading NRF_USBHSCORE register (GRSTCTL)

Hi,

I am doing a bare‑metal USB test on the nRF54LM20A DK and I see the CPU hang as soon as I read from NRF_USBHSCORE. I’m using:

  • Chip: nRF54LM20A (DK)
  • Library: nrfx 4.0.1
  • Toolchain: arm‑gcc
  • Security: code running in the secure domain
  • USBHS core base address used: 0x50020000 (secure USBHSCORE instance) [Instantiation table]
  • VREGUSB: started via NRF_VREGUSB and I wait for VBUS to be detected [VREGUSB regs]

My minimal test code looks like this:

NRF_VREGUSB->EVENTS_VBUSDETECTED = 0; 
NRF_VREGUSB->TASKS_START = 1;

while (NRF_VREGUSB->EVENTS_VBUSDETECTED == 0) 
{ 
    // wait for USB VBUS detected 
} 

printf("test 1\r\n"); 
NRF_USBHS->ENABLE = (USBHS_ENABLE_PHY_Enabled << USBHS_ENABLE_PHY_Pos) | 
                    (USBHS_ENABLE_CORE_Enabled << USBHS_ENABLE_CORE_Pos); 
                    
/* Problem appears when reading NRF_USBHSCORE here */ 
if (!(NRF_USBHSCORE->GRSTCTL & USBHSCORE_GRSTCTL_AHBIDLE_Msk)) 
{ 
    printf("wait_ahb_idle\n"); 
}

printf("test 2\r\n");

Behavior:

  • If I do not read from NRF_USBHSCORE->GRSTCTL, execution reaches "test 2\r\n" normally.
  • As soon as I do read NRF_USBHSCORE->GRSTCTL (as in the code above), the CPU appears to hang (I never see "wait_ahb_idle\n" or "test 2\r\n").

USB is plugged into the DK during this test.

Questions:

  1. Is there any special sequence required on nRF54LM20A before accessing USBHSCORE registers from secure code (e.g. SPU configuration, extra enable steps, or waiting for some USBHS / VREGUSB status bits)?
  2. Could a missing TrustZone / SPU configuration for the USBHSCORE peripheral cause a hard fault or bus error when reading 0x50020000 even though the instance is documented as secure at that address? [Security / peripheral access; SPU / peripheral access control]
  3. Is there any known limitation or example code for basic USBHS bring‑up on nRF54LM20A that shows the correct initialization order (VREGUSB → USBHS → USBHSCORE access)?

Any hints on what could cause the CPU to hang exactly when reading NRF_USBHSCORE (but not when just enabling NRF_USBHS) would be very helpful. If there are recommended debug steps (e.g., check SPU settings, inspect fault registers, etc.), I would appreciate guidance on that as well.

Thanks in advance!

Related