Fault exception when using port multiplexer on K82F

I am doing something that I have done many times before which is to set the port multiplexer on an NXP K82F board. Admittedly, I have always done this on a K64F in the past, but I can’t believe that these is a difference. It’s easily reproduced. This should enable pin 13 on PORTA :

#include “mbed.h”

int main()
{
PORTA->PCR[13] |= (1<<8);
}

—>

++ MbedOS Fau$$$034002037CB5CE40000000000000000000000000814932F8
++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R 0: 00000000
R 1: 0000000B
R 2: 40049000
R 3: 00000000
R 4: 00000000
R 5: 00000000
R 6: 00000000
R 7: 00000000
R 8: 00000000
R 9: 00000000
R 10: 00000000
R 11: 00000000
R 12: 00001815
SP : 1FFF2A00
LR : 00001D41
PC : 00000D5E
xPSR : 61000000
PSP : 1FFF29E0
MSP : 2002FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000082
UFSR : 00000000
DFSR : 00000008
AFSR : 00000000
BFAR : 40049034
Mode : Thread
Priv : Privileged
Stack: PSP

– MbedOS Fault Handler –

++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0xD5E
Error Value: 0x1FFF2A44
Current Thread: main Id: 0x1FFF1618 Entry: 0x2535 StackSize: 0x1000 StackMem: 0x1FFF1A00 SP: 0x1FFF2A00
For more info, visit: mbedos-error
– MbedOS Error Info –