Saving coredump to flash

I'm trying to enable saving of coredump to flash. I'm running on nrf52840 with NRF SDK 1.6.1.

I have defined the following:

CONFIG_DEBUG_COREDUMP=y
CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
I set up a partition using pm_static.yml:
coredump_partition:
  address: 0xff000
  size: 0x1000
  region: flash_primary
and added the entry in the dts file under &flash0:
coredump_partition: partition@ff000 {
  label = "coredump_partition";
  reg = <0x000ff000 DT_SIZE_K(4)>;
};
I then added a crash shell command that invokes a crash using either k_oops(); or __asm__ volatile("udf #0" : : : );. In either case, I verified that a coredump is generated if using LOGGING.
However, when I tried to use the BACKEND_FLASH_PARTITION it first complained about not being able to find an MSPL timeslot. There were no instructions regarding MPSL but I checked and saw that the default settings has 0 timeslots. I set it to 1 timeslot. Then I'm getting the following error when it's trying to erase the flash partition in preparation for coredump. 
<err> flash_sync_mpsl: timeout
<err> coredump: Cannot start coredump!
I did verify that I can successfully erase the coredump using coredump erase
< coredump erase
00> coredump erase
00> Stored coredump erased.
There seems to be some issue with accessing flash during a coredump. There are no examples specific to nrf52 anywhere.
Related