Wp76xx legato not running and swiflash reset not working

When I try to run swiflash -m wp76xx -r I get this output on the host:

Downloading the firmware
.ERROR: Firmware Download failed. Callback status 59399DONE
ERROR: Firmware Download Failed

and this on the target:

B -   6415919 - Sahara: Hello pkt sent
B -   7718055 - Imagetype=0x08 compat_id=0x00
B -   7719306 - not allowed to write UAPP partition
B -   7720678 - BOOT_HOLD=3,DOWNLOADER=boot,VERSION=Thu Feb  1 13:07:31 PST 2018,TYPE=APPL,SUBIMAGE=UAPP,ERROR=Flash
 write failed: Not allowed (0X97),STATUS=FAIL
B -   8738006 - API change: date not generated by cwe_header_init
B -   8738219 - API change: date not generated by cwe_header_init
B -   8745661 - Unknown image_val 6974656D
B -   8749199 - Unknown image_val 3AEF67E0
B -   8753012 - Unknown image_val 00000000

When I try to flash an older release e.g. 12 I get this and nothing changes:

B -   6371145 - Sahara: Hello pkt sent
B -  32371419 - Imagetype=0x14 compat_id=0x00
B -  32372608 - Imagetype=0x07 compat_id=0x00
B -  32373218 - Imagetype=0x07 compat_id=0x00 incompatible with Flash!
B -  32380142 - Imagetype=0x15 compat_id=0x00
B -  32907426 - Imagetype=0x13 compat_id=0x00
B -  32937743 - Imagetype=0x08 compat_id=0x00
B -  32938017 - Imagetype=0x0C compat_id=0x00 incompatible with Flash!
B -  32942165 - Imagetype=0x08 compat_id=0x00
B -  32946161 - Imagetype=0x17 compat_id=0x00 incompatible with Flash!
B -  32952383 - Imagetype=0x07 compat_id=0x00
B -  32956226 - Imagetype=0x07 compat_id=0x00 incompatible with Flash!
B -  32962966 - Imagetype=0x15 compat_id=0x00
B -  38095811 - Imagetype=0x13 compat_id=0x00
B -  38134546 - Unknown image_val 6974656D
B -  38136681 - Unknown image_val 3AEF67E0
B -  38138786 - Unknown image_val 00000000
B -  38190514 - Imagetype=0x08 compat_id=0x00
B -  38190788 - Imagetype=0x0C compat_id=0x00 incompatible with Flash!
B -  38194967 - Imagetype=0x08 compat_id=0x00
B -  38198932 - Imagetype=0x17 compat_id=0x00 incompatible with Flash!
B -  38204940 - BOOT_HOLD=3,DOWNLOADER=boot,VERSION=9999999_9907152_SWI9X07Y_02.25.02.01_00_GENERIC_002.056_000,TYPE=SPKG,SUBIMAGE=DSP2,SUBIMAGE=DSP2,STATUS=PASS
B -  39221871 - API change: date not generated by cwe_header_init
B -  39222085 - API change: date not generated by cwe_header_init
B -  39229496 - Unknown image_val 6974656D
B -  39233065 - Unknown image_val 3AEF67E0
B -  39236877 - Unknown image_val 0000000
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.2-00096
S - IMAGE_VARIANT_STRING=LAATANAZA
S - OEM_IMAGE_VERSION_STRING=SWI9X07Y_03.01.07.00 41ad93 jenkins 2023/03/16 10:58:16
S - Boot Config, 0x000002e1
B -      1216 - PBL, Start

The legato base is out of sync with the libraries so I can’t start legato and update/fwupdate is off the table.

what is the return of the following?

ati3
ati8
at!entercnd="A710"
at!bsinfo

BTW, you can use the following commands to reset the userapp partition:

Thanks. I tried deleting the user partition first and now legato is running again at least.

I did the AT commands after that in case it’s still relevant:

root@swi-mdm9x28-wp:~# microcom -E /dev/ttyAT
aattii33
Manufacturer: Sierra Wireless, Incorporated
Model: WP7607-1
Revision: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
IMEI: 359780088192152
IMEI SV: 14
FSN: EE430405680210
+GCAP: +CGSM

OK
aattii88
Legato Ver: 21.05.2.rc2_7f59219499ecf02274c4ac7575e4f8c5
Yocto Ver:  SWI9X07Y_03.01.07.00 2023-03-16_13:18:36
OS Ver: Linux version 4.14.253 (oe-user@oe-host) ( gcc version 9.3.0 (GCC), GNU ld (GNU Binutils) 2.34.0.20200220) #1 PREEMPT Thu Mar 16 11:08:58 UTC 2023
LK Ver: SWI9X07Y_03.01.07.00
RootFS Ver: SWI9X07Y_03.01.07.00 2023-03-16_13:18:36
UserFS Ver: unknown
MCU Ver: 002.015

OK
aatt!!eenntteerrccnndd==""AA771100""
OK
aatt!!bbssiinnffoo
Product: WP7607-1
Revision: 40
Main:  MDM9207 (000)
Radio: WTR2965 
Power: PMD9607 (002)
Flash: H27S4G8F2EKPB4      512MB x8 (173/0/0) (2048 blocks of 64 pages/block 4096B page size) 

OK

this is using FW R17.
It cannot be downgraded to previous version anymore