2020-11-29 05:08 PM
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.
I'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.
Solved! Go to Solution.
2020-11-29 07:36 PM
No. GPIOA only has 16 pins.
2020-11-29 08:34 PM
Thank you so much
Very appreciate your help!
2020-11-30 12:10 PM
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
2020-11-30 08:39 PM
Thank you for your answer
How do you input data to FMC though?
Can't find alternative Ports other than GPIO Ports.
2020-11-30 10:18 PM
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