cancel
Showing results for 
Search instead for 
Did you mean: 

Need some help creating an IAP app

jmullaney
Associate II
Posted on December 26, 2008 at 23:44

Need some help creating an IAP app

#iap #bootloader #upsd3253
108 REPLIES 108
isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Thank you both for your advices, yes, I am in a hurry and sometimes I try to bite off more than I can chew.

I am going to read carefully your long messagge phaze, as I always do, and follow all your both recommendations. I will tell you about my doubts and problems soon and about my success too, I hope to finish the iap stuff in the future (not so far future, I hope).

Best regards

Icebell

catherinekch
Associate
Posted on May 17, 2011 at 12:04

Hi.. I not sure whether suit to post my question here.. but I need someone help.. I'm a newbie working with the DK3400. I'm very confuse with IAP.. I don't how to start work on it. Can I just change the VM value at the main loop,then the program will automatically point to ''boot code'' at the data space or anything to do on it? Anyone can give me some example for the ''boot code''?

Best Regards,

Winter :-[

isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Hi Winter,

I recommend you to read carefully all the messages starting from the one mulls14 post here, ther you have examples of the boot code. The last ones from phaze are really helpfull, maybe you dont need so a basic information but take a look at them, they can solve a lot of questions although you havent wonder about them.

I haven´t finished my iap yet, but I almost have it, and it has been thanks to the people that hand over their time and their knowlegde to others.

Best Regards.

isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Hello,

My iap seems to work, the version that only reprogram the main program. But it is very very slow, it is normal, it takes about 20 minutes to reprogram a bank, I think I have made something wrong, sure, if you have got any idea ...

Phaze, I have read carefully your last post, the part about the memory map to make the program capable of reprogram main part and iap part, I have some doubts about it.

You say to put CSBOOT0: (0x0000-0x1FFF)||(0x8000-9FFF && PAGE==8) and so on the rest of the seconde flash. My question is, Have I to put another more bit in the page reg bit in the psd? With trhee bits I only have from page0 to page7, so I supposse if I need page8 I need another bit more, is this true?

Bye.

jdaniel
Associate II
Posted on May 17, 2011 at 12:04

Icebell,

Yes... you are correct that you'll have to use 4 bits of the page register to get this accomplished with my method. Hopefully you haven't already committed those other page register bits to be PLD inputs or something of the sort.

-Phaze426

isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Thanks Phaze, the bits are free, I can use them the way you say.

I have a first prototype of the iap, it reprograms the main flash and now it is quicker, about 2 minutos in every bank.

On Monday I will go on with the complete iap, reprogramming the main and the second flash.

Thank you for everything.

isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Thanks Phaze, the bits are free, I can use them the way you say.

I have a first prototype of the iap, it reprograms the main flash and now it is quicker, about 2 minutos in every bank.

On Monday I will go on with the complete iap, reprogramming the main and the second flash.

Thank you for everything.

isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Thanks Phaze, the bits are free, I can use them the way you say.

I have a first prototype of the iap, it reprograms the main flash and now it is quicker, about 2 minutos in every bank.

On Monday I will go on with the complete iap, reprogramming the main and the second flash.

Thank you for everything.

isabel_benitez
Associate II
Posted on May 17, 2011 at 12:04

Thanks Phaze, the bits are free, I can use them the way you say.

I have a first prototype of the iap, it reprograms the main flash and now it is quicker, about 2 minutos in every bank.

On Monday I will go on with the complete iap, reprogramming the main and the second flash.

Thank you for everything.

jsmith875
Associate II
Posted on May 17, 2011 at 12:04

Sorry, I didn't know that I was creating a new thread, and posted the following under ''Help with IAP'':

I have read all the messages in this thread, and wonder if anyone (mulls14, phase426, icebell ??) would be willing to send me some example code that they have used. I am using the uPSD3354 in a new application (prototypes have been built and tested), and would like to add IAP for field upgrades through the serial port.

My only I/O to the chip is thru serial port 0 at 1200 baud. I would like to be able to give a command to enter IAP, which would change the baud rate to something higher while reprogramming the flash. I am flexible on the flash arrangement. The IAP code will not need to be field reprogrammed. The ISR's would need to be field reprogrammed, along with the rest of the application. Right now, the application code size is under 64K, but I will probably exceed that in the future. This is a new product, replacing an older version that used the 8032, as seen on http:\\www.aquatrak.com

In particular, I would be interested in seeing code examples for your program that runs on a PC to do the reprogramming of the micro. I realize that I am going to have to drastically redo the example code provided by ST. I'd like to send a command (at 1200 baud) to put the uPSD chip into IAP mode at a higher baudrate, then switch the PC to that higher baudrate to do the programming. I would prefer to have the PC application do the programming (tailored to my system) with the only selection being the folder that contains the programming file(s).

My current MCU memory:

Code:

fs0 0000 - 7FFF

fs1 8000 - FFFF

...

Data:

rs0 0000 - 7FFF

csboot0 8000 - 9FFF

csboot1 A000 - BFFF

csboot2 C000 - DFFF

csboot3 E000 - FFFF

CSIOP 7F00 - 7FFF

I'd like to use csb00t3 for a lookup table in xdata, this table would not need to be field reprogrammed. Could I then use csboot0 - 2 for the IAP code?

Any example code and/or advice would be appreciated.

jhilory