We are in the early stages of development of AC motor hardware using the KV31 MCU with KMS. Our part number is MKV31F512VLL12P. We are trying to use the KMS tool to start off the development and then change and add code for other peripherals. We are using our control boards to debug and have managed to erase the KMS libraries on 2 of the 3 boards. They have all been loaded exclusively using MCUXpresso v10.1.1_606 and JLINK Segger JTAG programmer with KMS 1.2 and SDK 2.3.0. We were aware of all the warnings regarding the dangers of erasing the libraries so we went looking for pertinent check boxes in the debug configuration for the JLINK but found nothing. We have downloaded both KMS and non-KMS projects to all 3 boards, although the board that still has the library intact was probably the least downloaded of the 3.
How can I prevent the debugger from erasing the KMS libraries?
We believe the libraries because the call to GetMotorObserverSecureVersionIsCompatible() returns true and causes the HardFault_Handler() to run on the 2 bad boards.