Question
Use same port to write as well as read
Hello,
Currently I am working on a 16-bit parallel interface where I need to write to and read from the same port. For that I am using GPIO_Init LL library every time I do so. Is this the right method? Will the port data also get reset while doing so.
Following are the steps which I follow:
- Init the port to output mode.
- Write to Port using ODR register.
- Wait for few ns and Deinit port & Init the port.
- Read from the port using IDR register.
Will step 3 reset the port causing data loss. The problem is I am reading the same data in the IDR register which I have set in ODR.
Could you please guide me through this.
-Regards,
Hrishikesh
