BDM Programming via Wireless

cancel
Showing results for 
Search instead for 
Did you mean: 

BDM Programming via Wireless

173 Views
Contributor IV

Hi,

We are using S12ZVMC128 MCU. We use the PE Micro Multilink Universal programmer. 

I want to program a device remotely. I have a Wireless controller which I can connect to the BDM port of the S12Z. I want to program the MCU by simply replaying all signals from the Multilink programmer onto the BDM port via the intermediate WiFi chip. 

Has something similar been attempted, is there any reason why this will not work? I realize that there will be some propagation delays, but if we can slow down the programming protocol frequency enough can this be done?

Thanks

Tags (3)
0 Kudos
3 Replies

7 Views
Senior Contributor IV

Hi,

how fast is your "wifi"? Can you sample remote pin at 6-12MHz rate or better and react to that in 1/(6-12MHz) time or faster? Is it half or full duplex? Well if it's fast and full perhaps AN for optoisolated BDM could help, see AN2342.

It could be better to do your own programmer. BDM communications are explained in Background Debug Controller chapter of your S12ZVM reference manual. Flash programming algorithms are present as well there. CW can produce S-records files, which are easy to handle.

Edward.

0 Kudos

7 Views
Contributor IV

Hi kef2

Well the WiFi is actually an 2.4Ghz (meaning it's not the fastest but probably will be able to maintain 6 Mhz). This is because the WiFi chip we are using to communicate with S12Z is an ESP32 from Esperiff which is not a top end chip but it is very capable. 

I like your suggestion of using S-record file to program it directly however writing the whole code for BDM communication is going to be a big task in itself. 

For the longest time I have been asking for any Software library (like Open BDM which I keep hearing about ) but no one (Neither NXP nor PEMicro) has provided any help on this. If you know if any C/C++ or any language library for any MCU, we can re purpose it for our task.

Thanks!

0 Kudos

7 Views
NXP Employee
NXP Employee

Hi Manish,

Unfortunately, I am not aware of such wifi solution available.

If you just need to download a new code into MCU, you may use some of the bootloaders for your inspiration (e.g. AN5389 S12Z MagniV LIN Bootloader (AN5389SW), AN4723 S12Z MagniV Bootloader (AN4723_SW), AN12086 Simple Serial Bootloader for S12Z (AN12086SW)).

In the past, the serial debugger tools were often used (e.g. for education). You may look at the AN2548 Serial Monitor Program for HCS12 MCUs (AN2548SW1AN2548SW2). The debug software resides together with the main application in the MCU. However, this code was discontinued, but it still may be used for your inspiration.

The NXP has also LFBDMPGMR hardware debug probes where D-Bug12XZ firmware is used for debugging another MCU (Pod mode). Please check D-Bug12XZ documentation, whether it is suitable for your purpose. In such a case, only the serial line tunneling through wifi remains.

 

I hope it helps you.

Best regards

Radek

0 Kudos