ISP entry

Started by jdr, January 22, 2016, 08:56:27 AM

Previous topic - Next topic

jdr

I have an XA-G49 on a system with only the "minimum pin" access pictured in Data Sheet Figure 4. How do I enter ISP for reprogramming.


Andy Ayre

You need to pull /PSEN low, leave ALE floating and pull /EA high while resetting the part.

See the section immediately before figure 4 titled "Hardware Activation of the Boot Vector".

Embedded Systems Academy, Inc.
support at esacademy dot com

jdr

Thanks for responding. I don't have access to the PSEN. Can I use a "Break Set"? Is there anyway to get the XA-G49 to go into ISP mode with just two lines TX and RX? Figure 2 in Application Notes AN716 make reference to just having two lines, is that based on already being IN ISP mode?


Andy Ayre

You can do it in software by setting the status byte and performing a reset. I guess that the minimal circuit either assumes that method or assumes you have access to the /PSEN, ALE and /EA pins.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

jdr

So... I write the STATUS BYTE to a non zero value how? Confused on the procedure.
Wouldn't I have to flash the chip initially with code that allowed me to trigger a write to the STATUS BYTE from some signal through the only two lines I have. The P89LPC932 chip does have this feature "Break Detect"  but I don't see it mentioned for the XA-G49.
Am I missing something?
Thank you for your patience.

Andy Ayre

Quote from: jdr on January 25, 2016, 10:59:20 AM
So... I write the STATUS BYTE to a non zero value how? Confused on the procedure.
Wouldn't I have to flash the chip initially with code that allowed me to trigger a write to the STATUS BYTE from some signal through the only two lines I have.

Yes

Quote from: jdr on January 25, 2016, 10:59:20 AM
The P89LPC932 chip does have this feature "Break Detect"  but I don't see it mentioned for the XA-G49.
Am I missing something?

If a feature isn't in the chip documentation then it doesn't have it...
Embedded Systems Academy, Inc.
support at esacademy dot com

jdr

I don't mean to beat a dead horse... but this is bugging me.
I have to assert PSEN low to enter ISP mode to program the chip but it states I can write the STATUS BYTE to a non-zero value to enter ISP. I have to be IN ISP mode to write so what scenario would I write to the STATUS BYTE to get into a mode I am already in???
Thanks,
Jeff

Andy Ayre

The status byte is for people who want a software-based method of starting the bootloader. For example perhaps their firmware accepts a special command over the UART that when received sets the status byte and then causes a reset.

The advantage of this method is that it doesn't require manipulating pins, i.e. having the end user press buttons. Therefore, going back to your original question, if you have only the minimum pins in your hardware you can use this method to get into bootloader mode. Clearing the status byte and reset gets you back out of it. So you can go back and forth. The critical point is that a blank device - i.e. new from the factory - resets into the bootloader. So the very first time you program it you include support for this method.

The disadvantage is that if your firmware doesn't run for some reason then it won't work.
Embedded Systems Academy, Inc.
support at esacademy dot com