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 GPIO registers

Hello,

I want to initialize some GPIO registers in my GEL file in order to light a debug LED on my board (very simple).

On chapter 6.8.1 there are all the registers but it's not clear what register address I should use. How do I apply the offset number in the first column of table 6-11 to my application?

I just want to set the value of a pin in assembly...

Thanks,

Mike

  • Since you mention GEL file, I assume you are using CCS.  If so, the Target Content tests available from Spectrum Digital may be your best starting point.  It has a gpio library.

  • Thanks!

    The value for the GPIO register is: 0x01C67000

    In the code, they do the following: "GPIO_PCR = 1" (commented "Free GPIO from emulation"). It acts on the memory address 0x01C67004 which is not documented in the SPRUFH8B user guide. Is it necessary to do that step?

    Also when I want to switch on a LED, I first set the output direction corresponding to the pin to 0 (output) using DIR and then launch SET_DATA and nothing happens, i.e. the LED does not bright. When I'm printing the registers, the corresponding pin in the OUT_DATA register are set (which is what I would expect) but also in the SET_DATA and in CLR_DATA (weird!) registers.

    Did I do anything wrong?

     

    Thanks,

    Mike

     

    Juan Gonzales said:

    Since you mention GEL file, I assume you are using CCS.  If so, the Target Content tests available from Spectrum Digital may be your best starting point.  It has a gpio library.