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.

DM365 with the emulator and AEMIF boot option

My device is configured to boot from AEMIF (BTSEL[2:0]=001). The plan was to program the flash memory using a test program on an emulator. However I can't run emulator code: the target connects, I can load the program into internal RAM, but when it's started the code still jumps to 0x02000000 (AEMIF). The emulator only works if some other boot option is selected.

Is there any way to override this behavior without adding jumpers etc.?

  • Hi,

    alexander said:
    I can't run emulator code: the target connects, I can load the program into internal RAM, but when it's started the code still jumps to 0x02000000 (AEMIF).

    Which emulator are you using?

    Are you doing some sort of device reset before starting to run your code?  I think this might be happening which is taking the PC to 0x20000000. Are you trying to program the NOR memory?

    Ideally, we would always recommend to put the device in some other boot mode when you are trying to flash the memories like NAND or NOR, because if there is some code in the NAND/NOR and the boot mode is selected to boot from those devices, then by the time you connect emulator the code would execute and DM36x might be in a wrong state.

    Regards,

    Anshuman

     

     

  • Hi Anshuman,

    thank you for your response.

    I'm using a  TI XDS560 (PCI) emulator.

    I'm not doing a reset deliberately. I start up CCS (v.3.3.82.13), load project (the .gel is based on evmdm365.gel), power up the device,  connect to the target (menu: Debug/Connect), at which point the PC is at 0x02000004. I load the program and the PC is set to the correct load address in IRAM. Then I hit F5 and the program seems to be running, but nothing actually is executing. When I halt the program the PC is at 0x02000004 again. Trying to single-step produces the same result.

    My impression is that the emulator can not override the BOOTCFG value of 001 (AEMIF boot), that is forcing the CPU to start at 0x2000000. However it's not clear from the documentation why booting from other sources should be any different. I can see that selecting, for example, HPI boot, allows the code to run correctly, but according to the documentation, the ROM code is supposed to repeat HPI boot attempts indefinitely in case of failed boot. So why does it work with the emulator and AEMIF setting doesn't?

    Regards,

    Alexander.