ΣSigmaStudio Ask AI Русский Log in

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

Processors & DSP kweiwen Jul 15, 2021 00:00 5 replies Original on forum ↗
Thread Summary

Thread Summary

The user encountered glitches and distortion in a wave table stored in external SDRAM when using a customized boot kernel on the ADSP21479. The issue was resolved by including the SDRAM initialization in the boot kernel, as the default boot kernel initializes the SDRAM before loading the application, ensuring proper data initialization. The `initExternalMemory()` function in `main()` can be removed if SDRAM is already initialized in the boot kernel.
AI Generated Content
Subscribe
kweiwen Question
Jul 15, 2021 00:00

hi adi admins,

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

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.

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().

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.

since my program is able to switch and adjust parameters during the real-time processing, so i've tried:

booting with customized boot kernel, when i switch to another FX excluded the wave table the distorted and glitches sound disappear.

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.

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.

regards,

k

sdram

sharc

boot kernel

dsp&processors

adsp21479

ADIApproved Reply
Jul 19, 2021 00:00

Hi Kweiwen,

In order to assist you better on this, can you please get back on the below point.

Which processor are you using?

Regards,
Anand Selvaraj.

kweiwen Reply
Jul 22, 2021 00:00

ADSP21479

ADIApproved Reply
Jul 30, 2021 00:00

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.

Regards,
Anand Selvaraj.

kweiwen Reply
Aug 2, 2021 00:00

okay Anand, thanks for your replying, since we've initialized the SDRAM from boot kernel in order to load the application in the external memory, than what's the purpose to call initExternalMemory() in the main function?

ADIApproved Reply
Aug 10, 2021 00:00

Hi Kweiwen,

Since SDRAM initialized in boot kernel, You can remove init External Memory function from main.

Regards,
Anand Selvaraj.