DSPRelated.com
Forums

Re: DSK5510 - same program works from emulator, but not from flash

Started by Jeff Brower May 28, 2008
Arvid-

That's great to hear you got it working reliably. Intermittent problems like that
are always rewarding to solve.

One additional comment: since you fixed it using boot code (generated by hex55.exe),
you might want to comment your main.c or other source code in some way to show the
inits (below). Otherwise people looking at your code in the future may not realize
this initialization is taking place, unless they find the hex conv .cmd file.

-Jeff
> Have you gone through the .gel file line-by-line and verified that
> *everything* (in
> particular EMIF init) has corresponding functionality in your boot code?
> Thank you Jeff! That was an excellent suggestion and it worked.
>
> I went through and adapted the emif_init() and OnRestart() functions of the DSK5510
> GEL file to -reg_config lines in my hex conversion utility .cmd file. Bingo! Not
> sure I needed to add the OnRestart() function, but i figured it couldn't hurt.
>
> Here's what I had added:
>
> /*equivalent to GEL file's OnRestart()
> Disable interrupts */
> -reg_config 0x0003, 0x0800 /* // Set INTM */
> -reg_config 0x0000, 0 /* // Clear IER0 */
> -reg_config 0x0045, 0 /* // Clear IER1 */
>
> /* Disable each DMA channel
> */
> -reg_config 0xC01, 0 /* // DMA0 */
> -reg_config 0xC21, 0 /* // DMA1 */
> -reg_config 0xC41, 0 /* // DMA2 */
> -reg_config 0xC61, 0 /* // DMA3 */
> -reg_config 0xC81, 0 /* // DMA4 */
> -reg_config 0xCA1, 0 /* // DMA5 */
>
> /* //equivalent to GEL file's init_emif()
> //emif setup */
> -reg_config 0x800, 0x0221
> -reg_config 0x801, 0xFFFF
> -reg_config 0x803, 0x3FFF
> -reg_config 0x804, 0x5FFF
> -reg_config 0x805, 0x5FFF
> -reg_config 0x806, 0x1038
> -reg_config 0x807, 0x0038
> -reg_config 0x808, 0x0038
> -reg_config 0x809, 0x1050
> -reg_config 0x80A, 0x0050
> -reg_config 0x80B, 0x0050
> -reg_config 0x80C, 0x1050
> -reg_config 0x80D, 0x0050
> -reg_config 0x80E, 0x0050
> -reg_config 0x80F, 0x2B11
> -reg_config 0x810, 0x0578 /* Refresh Period 0x00A8 for 24MHz */
> /* 0x0578 for 200MHz */
> -reg_config 0x811, 0x0fff
> -reg_config 0x813, 0x0535
> -reg_config 0x812, 0x0000 /* SDRAM Init */
>
> Thanks!
> Arvid