2022-06-18 03:07 AM
Hello all, I want to interface my STM32f407vgtx microcontroller with ILI9325 lcd and for this I have initialized FSMC as per my requirements. But to properly communicate with ILI9325 LCD , I want to read/write pins named NOE, NWE, CS , Cmd/Data .
Can we have some APIs available to do this. Please help.
2022-06-18 03:21 AM
..
2022-06-18 03:25 AM
Not really how this works.
For pins on the Address bus side you'd formulate a memory access address within the memory that translates to those pins being high or low.
For the data bus, bits within that word.
2022-06-18 03:32 AM
unable to understand your answer. if possible please elaborate ..thanks
2022-06-18 03:41 AM
Interacting with the external memory drives the pins of the FSMC.
Figure the memory address the processor is using here, use a pointer up in the 0x60000000 range.
2022-06-18 03:47 AM
yes, for command and data pins to read/write i am using 0x60000000 and 0x60010000(as i used A16 correct me if i am wrong). But unable to find any way to read/write pins like NOE,NWE,CS ..
2022-06-18 05:29 AM
And you'd need to do this why? It's an external memory interface.The control pins are driven by the FSMC peripheral as part of a memory interaction, the timing controlled by the configuration.
The pins should be readable via GPIOx->IDR
2022-06-18 05:39 AM
For various reasons:
(1)To write some commands i have to forcefully set the write pin (NWE)to high while read pin(NOE) to low.
(2)To read/write data from RDR(read data register) /WDR(write data register i have set the RS register(address select).
How FSMC know that whether I want reading or writing?
i am now confused and thinking to use GPIOs instead of FSMC. Can't we have Individual addresses like in case of RS Pin for each pin so that i can change it accordingly ? Please help.
2022-06-18 06:40 AM
>>How FSMC know that whether I want reading or writing?
The MCU is either trying to LOAD or STORE to a memory location
When you read a memory location in the external memory space it performs a read action on the bus/memory. When you write data back it performs a write operation, the MCU and peripherals are designed to do this without you fiddling with the pins via secondary methods.
The RS pin should be connected to an ADDRESS PIN on the bus, it's state is a reflection of the memory address being accessed, in binary.
My expectation is the NOE / NWE will be high most of the time, only one will be LOW, depending on the memory region being accessed falls in the range it is decoding for, and the READ/WRITE based on the action being performed, where only one is active (low) at a time.
Perhaps use GPIO, your grasp of MCU buses and interfaces seems at that level.