cancel
Showing results for 
Search instead for 
Did you mean: 

Read data in multiple GPIOx_IDR register / Combine GPIO Ports

SHong.5
Associate II

Hi

I'm currently using STM32H743 and I'm trying to Read Data in multiple GPIOx_IDR register

Previously, I was using 16 bits and trying to change into 32 bits for IDR.

When I debug, I could find correct data on SFRs -> Register -> GPIOA -> GPIO_IDR with below code.

previous code

main.h

#define my_data_Pin (0xFFFF) // Use all PA0-PA15 pins

#define my_data_GPIO_Port GPIOA

otherfile.c

void read_my_data(uint16_t *pbuf)

{

*pbuf++ = (uint16_t)my_data_GPIO_Port -> IDR;

}

Now, I'm not sure how to define the code for using all PA0-PA15 pins & PB0-PB15 pins for 32bit data.

 0693W000006E7baQAC.pngI've tried something like below, but it didn't work.

#define my_data_Pin (0xFFFF) && (0xFFFF)

#define my_data_GPIO_Port GPIOA && GPIOB

Could somebody help me out with this please?

Your help will be highly appreciated.

14 REPLIES 14

No. GPIOA only has 16 pins.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you so much

Very appreciate your help!

The FMC could input 32-bit data in parallel on their data inputs, if the used package supports all 32 bits (probably >100 pins); but the latencies may be higher than with GPIO input.

JW

Thank you for your answer

How do you input data to FMC though?

Can't find alternative Ports other than GPIO Ports.

Set up FMC for SRAM and perform a read from that "SRAM". You don't need to actually assign pins to address and control lines.

JW