This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ST 8032 In-Application Programming

Hi All,

I am trying to get my In-Application Programming up and running on an ST micro uPSD33xx. When activating the newly programmed image I need to switch execution from the boot flash to the main flash. When this happens the micro will just blindy contiune retrieving instructions from the next memory location as if nothing has happened, unaware of the switch in flash device.

For everything to not fall in a big heap I am planning to have a routine which is fixed at the same absolute in both applications - it is this routine which will handle the switching of memory banks (and so the instuctions being retreieved should be identical in both apps).

First of all, does that sound insane to anyone out there?

Secondly, and prehaps a daft question, how should I determine *where* to locate the absolute routine. What guidelines can you offer as to how one determines where to locate such a 'shared' routine?

Cheers for any help/recommendations.

Andy

Parents
  • Hi Jay,

    How's it going?

    Just a quickie regarding the memory map and Keil v PSDSoft settings for the memory map you have described (on the other forum).

    I want to have access to main flash (to erase and reporgram, etc) from the bootloader in secondary flash. The bootloader application obviously needs to be loaded into CSBOOOT0, 1,2 3 with nothing being loaded into primary flash as this is for the main application. However the bootloader app must be able to 'see' primary flash to be able to erase/reprogram.

    To acheive this is it necessary to enable code banking in the Keil toolchain or does the memory map specified in PSDSoft express take care of this? As I am not loading any code into memory banks I do not see why it is necessary to enable code banking, but this means that the PSDSoft express memory map must be sufficient for the MCU to be able to access the full memory map as described. So if I try to erase a sector of flash, say FS5, from the bootloader and code banking is OFF will the app successfuly access the relevant addresses based on the PSDSoft express alone?

    Do you see what I mean?

    Cheers for any help Jay and have a great weekend!

    Andy

Reply
  • Hi Jay,

    How's it going?

    Just a quickie regarding the memory map and Keil v PSDSoft settings for the memory map you have described (on the other forum).

    I want to have access to main flash (to erase and reporgram, etc) from the bootloader in secondary flash. The bootloader application obviously needs to be loaded into CSBOOOT0, 1,2 3 with nothing being loaded into primary flash as this is for the main application. However the bootloader app must be able to 'see' primary flash to be able to erase/reprogram.

    To acheive this is it necessary to enable code banking in the Keil toolchain or does the memory map specified in PSDSoft express take care of this? As I am not loading any code into memory banks I do not see why it is necessary to enable code banking, but this means that the PSDSoft express memory map must be sufficient for the MCU to be able to access the full memory map as described. So if I try to erase a sector of flash, say FS5, from the bootloader and code banking is OFF will the app successfuly access the relevant addresses based on the PSDSoft express alone?

    Do you see what I mean?

    Cheers for any help Jay and have a great weekend!

    Andy

Children
  • Andy,

    Yes, I understand what you're saying. I don't use code banking at all in my application. I use two separate projects: One for the bootloader that goes into CSBOOT and one for the main application.

    As long as the memory map is configured in PSDSoft such that you can EXECUTE out of CSBOOT and WRITE to MAIN flash, then you should be able to get the job done. The only difficulty is that your bootloader code will need to change the page register itself. For instance, if you are trying to program code into bank 5 which is on page 5, then the bootloader will need to change to that page to get it done. Hope that makes it clearer.

    -Jay Daniel

  • hi, i'm sorry, my post is unconcerned with IAP, i want to ask a question when i found somebody who is interested in upsd. in this page
    mcu.st.com/.../modules.php
    one of the user mention about upsd_uart.c file, but i cant find this file in st site, do you know where is this file? can you give me a link?

  • Hank,

    No, I don't know of this file. It sounds from the OP like it was part of some example code for one of their dev. kits. Handling the UART in the uPSD is nearly identical to what one would do in a standard 8051, however, and is therefore fairly straightforward to implement.

    -Jay D.