Post Go back to editing

the difference between initExternalMemory() & initPLL() inside main() and _initPLL & initSDRAM inside boot kernel?

hi adi admins,

as title, i'm wondering what's the difference between them in main() and boot kernel? here's my situation:

  1. i use SPI slave boot with serial flash, also my boot kernel needs SRU() to route available GPIO to FLAG pins, so the processor is able to redirect to selective applications by GPIO's status.
  2. because the maximum size of boot kernel is 256 instructions, so i just bypass the _initPLL and initSDRAM in boot kernel arbitrarily, since there's initExternalMemory() and initPLL() in main().
  3. i found out something goes wrong with a wave table i declare in external memory section("seg_sdram") static float modulation_signal_table[6][1024], i use this wave table to make modulations related FX, but it contains glitches and distorted now.
  4. since my program is able to switch and adjust parameters during the real-time processing, so i've tried:
    1. booting with customized boot kernel, when i switch to another FX excluded the wave table the distorted and glitches sound disappear.
    2. booting with customized boot kernel, when i switch back to the FX included the wave table the distorted and glitches sound appear, i could still adjust the parameters, for me it sounds more like the data inside the wave table is not initialized, on the other hand, i'm not able to use ADZS-ICE-1000 to do the step debugger since i'm using boot kernel.
    3. booting with default boot kernel, every FXs work fine and normal, i attached the ADZS-ICE-1000 to processor and checked the wave table inside the external memory during real-time processing, it looks good to me.

so far i fixed this issue by adding _initPLL and initSDRAM back in boot kernel, but i still wants know the reason, thanks.



Parents Reply
  • Hi Kweiwen,

    When the application is tested using emulator, the code is loaded into the external memory using emulator. The external memory should be initialized before loading the code and this is taken care by .xml settings. When the application is running standalone, the boot kernel loads the application. The boot kernel consists of 256 instructions. These 256 instructions are loaded into the internal memory initially and this code loads the complete application and overwrites it self. In order to load the application in the external memory, the boot kernel should initialize the SDRAM.

    Anand Selvaraj.