This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2808: Peripheral restore and global/static variable re-initiate when switching between two images on flash sector

Part Number: TMS320F2808

Hi expert,

My customer is doing both APP and BOOTLOADER image on different flash sectors. They need to jump between the two with codestartbranch.asm at the begining of each two images. Two questions:

The first one:

Could you explain the ways to warm restore peripherals to its reset state?

Second one:

Do we need to take actions on global, static or automatic variables when do the image switching?

Thanks

Sheldon

  • Hi Sheldon,

    Sheldon He said:

    The first one:

    Could you explain the ways to warm restore peripherals to its reset state?

    Can you further explain what you're meaning by a warm reset? Are they wanting to reset all peripherals, or only some? Many (if not all) the peripherals have a register bit to reset the peripheral.

    Sheldon He said:

    Second one:

    Do we need to take actions on global, static or automatic variables when do the image switching?

    Not sure on this. Will need to get back to you or have someone else comment on here.

    Best,

    Kevin

  • Hi Kevin,

    I say warm reset to describe this situation: set some peripheral's register bits (all of them) to reset value without power off the device. They would like to reset most of them without power off. I know some like SCI get this kind of software reset, but could you list any other similar peripherals?

    BTW, if we do not use some peripheral, could you just cut the clock supply for it? Will this be safe enough to kill it?

    Also, please help me tracking the second one.

    Thanks

  • Hi Kevin,

    May I kindly ask if there is any updates here?

    Thanks

    Sheldon

  • Hi Sheldon,

    Sheldon He said:
    I say warm reset to describe this situation: set some peripheral's register bits (all of them) to reset value without power off the device. They would like to reset most of them without power off.

    One way of accomplishing this is to write a bad key to the watchdog registers and then let the WD do a warm-reset of the device. After the reset, the code could branch to the desired image. This warm reset ensures all peripherals are reset, as opposed to resetting each peripheral individually.

    Sheldon He said:
    I know some like SCI get this kind of software reset, but could you list any other similar peripherals?

    I don't have a clear list of all the peripherals with a register reset bit, but I know that all the communication peripherals do at the least. Would need to check the TRM sections for other peripherals.

    Sheldon He said:
    BTW, if we do not use some peripheral, could you just cut the clock supply for it? Will this be safe enough to kill it?

    Not certain what is meant by "kill", but you can indeed turn off the clock to unused peripherals.

    Sheldon He said:
    Do we need to take actions on global, static or automatic variables when do the image switching?

    Handling of variables is ultimately the responsibility of the application. I will say that RAM contents are preserved across a warm reset.

    Best,

    Kevin