AnsweredAssumed Answered

How can I write direct to the Port x GPIO Data Register?

Question asked by Jeroen_ on Apr 18, 2018
Latest reply on Apr 25, 2018 by Jeroen_

Hello, 

 

I am working on a SC584 processor. 

 

  • How can I write direct to the Port x GPIO Data Register? 

 

In my project I have included adi_gpio.c and adi_gpio.h. In the API there are the following functions: 

/*
* Sets the given GPIO pin(s) to a logic high level. Value of other pins are not affected.
*
*/
ADI_GPIO_RESULT adi_gpio_Set(
ADI_GPIO_PORT const ePort,
uint32_t const Pins
);

/*
* Sets the given GPIO pin(s) to a logic low level. Value of other pins are not affected.
*
*/
ADI_GPIO_RESULT adi_gpio_Clear(
ADI_GPIO_PORT const ePort,
uint32_t const Pins
);

But there is no functionality to write in one time the direct data register. According to the manual there is a PORT_DATA register which makes it possible direct set the value for 16 IO pins. 
Reference: "ADSP-SC58x/ADSP-2158x SHARC+ Processor Hardware Reference" page 14-14. 

 

  • Where can I find the address of the Port x GPIO Data Register? 
  • Is it possible to write 32 bits in one instruction? For example, to write PortA and PortB data in one instruction? 

 

It is not possible to use the PPI in my case so I would like to write direct to the data register. 

A Clear and a set after each other takes too much time.

 

Best regards,

Jeroen

 

Outcomes