Scripting BMI set with J-Flash program

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I'm trying to look into production programming without having to use the ASC_BSL mode. I am considering programming the devices in SWD mode. I have a Segger J-Link Base with the license to run J-Flash. If I have already switched the BMI on a part to SWD mode, I have no problem using the J-Flash program to flash a part already in SWD mode. Is it possible to script the com port on the J-Link base to swap the boot mode index on the target device prior to flashing? The goal is to make the flashing process a one click procedure.
0 Likes
4 Replies
User7282
Level 4
Level 4
In J-Link you can use the setbmi command to change the BMI.
0 Likes
lock attach
Attachments are accessible only for community members.
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

In your software you can change the BMI setting according to your needs. See attached example.

If I am not wrong the VADC in this project might not be working well, however you can take this as an example.
0 Likes
Not applicable
I know I can change the BMI in software. Thats not the problem. What if I just want to factory program a chip in SWD mode instead of ASC-BSL mode? I have to get the chip out of ASC-BSL mode somehow before having programmed the chip. I know I have to send it commands via UART prior to SWD programming to do that, but is there an existing production grade solution to do this?
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Let's assume that you had some ways of changing the BMI within the software and the XMC is in SWD mode ready for flash programming. Unfortunately Infineon do not have specific tools for flash programming using SWD protocol for mass production. You can contact JLINK or PLS .

http://www.pls-mc.com/flash-programming-with-ude-memtool-flash-programmer/ude_memtool_flash_programm...
0 Likes