Problem reading gpio pins in parallel from multiple eeproms.
Im trying to write to and read data from 10 eeproms in parallel. I first transmit the data in parallel to all the eeproms via spi, I then read data in parallel by first transmitting the address of data stored in the eeprom and then transmitting dummy data in non blocking mode in order to pass a clock signal to eeprom and allow it to output data stored.
From the signals on my oscilloscope everything works perfectly, the eeprom outputs data I send it. However when trying to read the gpio pins in order to record data only the first 4 bits in every byte gets read as observed from debug mode.
Attached is my code and relevant pics.
Thanks for your help.
Edit: Solution in last post


uint8_t data_tx[6]={2,0,0,1,21,1}; //0,1,5,1 is data i send to store
uint8_t address_read[4]={3,0};
uint8_t write_en=6;
uint16_t dat[100];
uint8_t dummy[3]={0,0,0};
while (1)
{
//set write enable latch in parallel
GPIOA->ODR = 0x0000; // pull the CS pins low
HAL_SPI_Transmit(&hspi3,&write_en, 1, 10); //set write enable latch
GPIOA->ODR = 0xffff; // pull the CS pins high
HAL_Delay(10);
//write in parallel
GPIOA->ODR = 0x0000; // pull the CS pin low
HAL_SPI_Transmit(&hspi3,data_tx, 6, 10); //transmit addresses and data
GPIOA->ODR = 0xffff; // pull the CS pins high
HAL_Delay(10);
//read in parallel using ports
GPIOA->ODR = 0x0000; // pull the CS pins low
HAL_SPI_Transmit (&hspi3, address_read, 2, 10); // send address
HAL_SPI_Transmit_IT(&hspi3, dummy, 20);
for(int i = 0; i < 100; i++)
{
if((GPIOB->IDR & 0x01ff) >= 0x01f0)
{
dat[i] = (GPIOB->IDR & 0x01ff) ; //problematic
}
}
GPIOA->ODR = 0xffff; // pull the CS pins high
HAL_Delay(10);
}

