When I am trying to flash NXP S32K144 Example code (Blinky) with Keil as per debug document , it is showing Flash download failed- Target DLL has been canceled. I selected PE Micro Debuuger for debugging.
I am unable to flash please help me.
Thanks & Regards,
There is another alternative. You have the option of using OpenSDA in CMSIS-DAP mode.
This way you can directly access the Keil uVision flash programing utility instead of P&E.
See www.keil.com/appnotes/docs/apnt_299.asp on page 8 to configure CMSIS-DAP.
Make sure uou add the two files mentioned at the bottom of page 2 for mDK 5.23.
The file CMSIS-DAP.S19 is available on this URL. This is easily downloaded into the OpenSDA processor on the S32K board.
Directions on how I got P&E working are on page 7.
I installed the latest Keil packs for S32K, and was able to program the mcu on our EVB after making a couple changes:
1. On my system, all of the pack files are read-only, so I had to use Windows Explorer to change permissions to read/write.
2. Open the RTX Blinky
3. Setup the debug tool by selecting the Options For Target toolbar button. Next, choose the Debug tab.
4. change the Debugger to "Use: PEMicro Debugger" and then click the Settings button
5. change the Connection Type to "Open SDA Embedded..." and make sure the Port shows a valid target (the S32K EVB board must be connected by USB now)
6. on the Device Selection field, choose the S32K144 micro.
7. Reduce the Debug Shift Speed to 2MHz, and then click OK at the bottom.
8. Build the executable target file
9. Start the debug session. You may need to repeat steps 4 & 5 here
I think the key steps were to set the correct debug port, and slow down the SWD protocol.
Are you using the NXP Evaluation Board (XS32K144EVB-Q100) or your own hardware? I assumed you connect the evaluation board. Do you have S32-Design Studio installed, and can you flash with this debugger as a test?
If you have a separate debug probe such as ULink, you can connect this to J14 debug header on the evaluation board, and bypass the onboard OpenSDA interface. When using the external probe I recommend to provide 12V power at J16 and change jumper J107 to (1-2) short.