cancel
Showing results for 
Search instead for 
Did you mean: 

Issue writing 32-bit AHB transaction to 8-bit FSMC peripheral, STM32U575

luka_
Associate II

Hi,

I'm trying to write RGB data directly to an 8+8+8 bit i8080 screen using the DMA2D and FSMC peripherals on a STM32U575 Nucleo board. As a test, I set up the FSMC and manually sent data one uint8_t byte at a time - this works fine. However, I'd like to use DMA2D to write directly to the FSMC address. The manual says that if the AHB transaction size > memory data size, the transaction should be split into smaller consecutive memory accesses. It's my understanding that the DMA2D outputs 32-bit data, split according to the required format. Therefore, before setting up DMA2D, I first ran the following code to see if writing 32-bit values to the address would work as expected. 

OLED_Block_Set(120,132,160,160);
volatile uint32_t* test_ptr = ( volatile uint32_t* )0x60000001;
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
*test_ptr = ((uint32_t)0xFFFFFFFF);__DSB(); __ISB();
return 0;

The expected result is that 12 white pixels should be lit. However, I don't see anything. If I change the pointer to point to a uint_8t, the code works except that only 3 pixels are lit since the data sent is truncated (as expected). Why doesn't the pointer to a 32-bit value work? I thought it could be something to do with timing, so I tried changing the FMC timings to the maximum, but the result was the same. 

Here's my FMC settings:

luka__0-1699774771950.png


The screen is a DWO DO026QR01, if that's important. Unfortunately there's little information on the screen or the controller it uses (supposedly a S6E63F6 - I think this might be a typo since I found nothing about it. I could find info about the S6E63D6, but I don't think it supports 24-bit color so I doubt that's it). The datasheet also doesn't provide any timing information, but the company sells a module with the same screen that provides this timing info:

luka__1-1699775065718.png

 

Let me know if there's more information I should provide! I'm a bit of a noob when it comes to any of this stuff.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
luka_
Associate II

Ok, I think I solved the problem. You can set the LCD register select in the FMC config to something other than A0. Setting it high enough such that the bit doesn't change when the address is incremented solved it!

View solution in original post

2 REPLIES 2
luka_
Associate II

Ok, I think I've figured out the problem. The address bus is getting incremented, which makes sense since it's writing 32 bits to an 8-bit bus. However, I don't want this as A0 is used by the screen to determine if the data received is a command or if it's data.

Is there any way to perform the transfer without this happening?

Thanks!

luka__0-1699819387512.png

 

luka_
Associate II

Ok, I think I solved the problem. You can set the LCD register select in the FMC config to something other than A0. Setting it high enough such that the bit doesn't change when the address is incremented solved it!