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

Download a routine to SRAM and run it

Hi,

I am using C167 v6.08 Keil uV3 and XC167CI.

Is it possible to download a routine to SARM (either internal or external) and then start to run it from SRAM ? let me make requirement more detail

(1) Download the special routine to a specified SRAM section (either external or internal). The download means from PC or other instrument to XC167, this routine is in hex format.

(2) After download, the routine located in SRAM can be called to run by main program in flash.

thanks

Parents
  • It is part of the Boot ROM of the C167 and you need to write your own program or programs to perform the features you desire of the C167.

    From the users manual.

    After sending the identification byte the BSL enters a loop to receive 32 Bytes via ASC0. These bytes are stored sequentially into locations 00'FA40H through 00'FA5FH of the internal RAM. So up to 16 instructions may be placed into the RAM area. To execute the loaded code the BSL then jumps to location 00'FA40H, i.e. the first loaded instruction. The bootstrap loading sequence is now terminated, the C167CR remains in BSL mode, however. Most probably the initially loaded routine will load additional code or data, as an average application is likely to require substantially more than 16 instructions. This second receive loop may directly use the pre-initialized interface ASC0 to receive data and store it to arbitrary user-defined locations.

    This second level of loaded code may be the final application code. It may also be another, more sophisticated, loader routine that adds a transmission protocol to enhance the integrity of the loaded code or data. It may also contain a code sequence to change the system configuration and enable the bus interface to store the received data into external memory.

    You can look at your Keil\C166\Monitor\C167CR directory
    for the file Boot167.a66 as an example.

Reply
  • It is part of the Boot ROM of the C167 and you need to write your own program or programs to perform the features you desire of the C167.

    From the users manual.

    After sending the identification byte the BSL enters a loop to receive 32 Bytes via ASC0. These bytes are stored sequentially into locations 00'FA40H through 00'FA5FH of the internal RAM. So up to 16 instructions may be placed into the RAM area. To execute the loaded code the BSL then jumps to location 00'FA40H, i.e. the first loaded instruction. The bootstrap loading sequence is now terminated, the C167CR remains in BSL mode, however. Most probably the initially loaded routine will load additional code or data, as an average application is likely to require substantially more than 16 instructions. This second receive loop may directly use the pre-initialized interface ASC0 to receive data and store it to arbitrary user-defined locations.

    This second level of loaded code may be the final application code. It may also be another, more sophisticated, loader routine that adds a transmission protocol to enhance the integrity of the loaded code or data. It may also contain a code sequence to change the system configuration and enable the bus interface to store the received data into external memory.

    You can look at your Keil\C166\Monitor\C167CR directory
    for the file Boot167.a66 as an example.

Children
No data