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.

Trouble accessing the FPGA registers on the EVM (Spectrum Digital rev C)

Hi,

While I am able to read and write all the FPGA registers (obviously, I can't write the read only ones!), only the LED one appears to have an impact at the hardware level.

More specifically, I can control the LEDs via address 0x4000010, but if I write to address 0x4000028 (the power control register), I do not see any effect on the board. This register should control the power to the LCD 3.3V and the LCD back light. Reading back the register returns the value I wrote which adds to my confusion...

So is there some kind of restriction on accessing some of these registers?

Greetings,
David

 

  • David,

    The addresses of the CPLD registers are non-linear because some of the address lines get pin-muxed away when different peripherals are enabled.  The address you are using is not where is actually is.  You can find the addresses in the evmdm365.c of the BSL (see below) that is located in the following directory of the spectrum EVM code ..\evmdm365_v1\lib\bsl:

     

    static Uint8 *cpld_addrmap[CPLD_NUMREGS] =

    {

        (Uint8 *)0x04000000, // Register 0

                    (Uint8 *)0x04000008, // Register 1

                    (Uint8 *)0x04000010, // Register 2

                    (Uint8 *)0x04000018, // Register 3

                    (Uint8 *)0x04000400, // Register 4

                    (Uint8 *)0x04000408, // Register 5

                    (Uint8 *)0x04000410, // Register 6

                    (Uint8 *)0x04000418, // Register 7

                    (Uint8 *)0x04000800, // Register 8

                    (Uint8 *)0x04000808, // Register 9

                    (Uint8 *)0x04000810, // Register 10

                    (Uint8 *)0x04000818, // Register 11

                    (Uint8 *)0x04000c00, // Register 12

                    (Uint8 *)0x04000c08, // Register 13

                    (Uint8 *)0x04000c10, // Register 14

                    (Uint8 *)0x04000c18, // Register 15

                    (Uint8 *)0x04001000, // Register 16

                    (Uint8 *)0x04001008, // Register 17

                    (Uint8 *)0x04001010, // Register 18

                    (Uint8 *)0x04001018, // Register 19

                    (Uint8 *)0x0400f800, // Register 20

                    (Uint8 *)0x0400f808, // Register 21

                    (Uint8 *)0x0400f810, // Register 22

                    (Uint8 *)0x0400f818, // Register 23

                    (Uint8 *)0x0400fc00, // Register 24

                    (Uint8 *)0x0400fc08  // Register 25

    };

    regards,

    miguel