cancel
Showing results for 
Search instead for 
Did you mean: 

Read Parallel display commands with STM32

JBond.1
Senior

Hi, is it possible to connect STM32 instead of display and read its pins (A0, RD, WR, D0, D1, D2, D3, D4, D5, D6, D7) to know what device is sending and maybe replace original display with different display?

For example I would need to detect that WR pin went LOW and read all pins values at that moment in time. WR is LOW only for 187 nanoseconds. So is there any way to read this fast with STM32? How does display read that data so fast?

I have attached display commands which I have read with logic analyzer.

14 REPLIES 14

When you are not sure, check the reference manual.

Check the description of the GPIO MODER register. There are 2 bits for each pin.

MODERy[1:0]: Port x configuration bits (y = 0..15)

These bits are written by software to configure the I/O mode.

00: Input mode (reset state)

01: General purpose output mode

10: Alternate function mode

11: Analog mode

You would like to map PA0 to the timer, so you should set the pin to Alternate function mode, put binary 0b10, i.e. 2 to the bits corresponding to PA0.

Timers and DMA are almost identical between the STM32F0 and STM32F1 series. GPIO alternate modes are handled differently, but you have already done that part, so you would gain nothing with the STM32F103.

And can I test timer with button press to see if its triggering?

As I can see its LOW, So do I need to connect PA0 to 3.3V on button click?

Also should interupt rize instantly when I press button?

Any ideas?

How about solution to forward one GPIO input values to another GPIO output values? would this be easier?

I could use forwarding to display default menus and once I want I could stop it and display my output?

I have managed to user DMA in MemoryToMemory mode, I just needed to use CubeMX and add this additional code:

hdma_memtomem_dma1_channel2.Instance->CCR |= DMA_CCR_CIRC;
HAL_DMA_Start(
		&hdma_memtomem_dma1_channel2,
		(uint32_t)&GPIOC->IDR,
		(uint32_t)&buffer[0],
		bufferLen);

But now I want to trigger DMA from Timer in input capture mode. How do I select Timer which copies GPIO pins to DMA buffer? I cant find GPIO in DMA mapping table? GPIO is not a peripheral?

Any help?