Jump to content

Ivan.L

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Ivan.L

  1. 2 hours ago, cpu20 said:

    It has nothing to do with what type of RAM or which part of the RAM you are using. The MCU will cache any frequently used data from any part of the memory.

    The easiest way to check if this is the problem, is to invalidate the buffer you are using for the DMA transfer. If this is the problem, you will see the data appearing in your buffer immediately after you invalidate it.
    Note that the data you see in your debugger is the data the CPU sees and not the data that is currently present in the RAM. So in your debugger you will see the cached memory.

    So I just tried invalidating the buffer. No data appears in it until the screen updates.

  2. 21 hours ago, cpu20 said:

    Are you sure you aren't experiencing cache coherency problems as described here?

    I've ran into this problem several times already on the M7-platform and it's a pain in the *** to debug the problem. But the fact that your data on the screen must update first before you see the DMA transfer happen is probably because the data from the ADC is then removed from cache and replaced with that from the screan. The cpu will look at the data in the RAM directly. Thats what I think happens. But it is probably more complex is the cache is set assosiative.

    How can I check it? If looking at the array that the dma fills I see only the data from the adc without anything that could be from the screen. 

     

    If I understand correctly ugfx doesn't use the sdram default and I should manually enable it. Won't it solve my problem? 

  3. Hello!

    I can't get the adc to work using dma. The code works perfectly without ugfx initialization. But as soon as I initialize it the dma stops working. I can get a maximum of 1 reading from it.

    Perhaps it is somewhat related to the GADC module of ugfx? But I didn't enable it in the config... 

    Any suggestions on what could I do?

  4. Thank you for all the help!

    The issue was the incorrect setting of GFX_CPU and not setting GFX_COMPILER at all. Defining it to GFX_COMPILER_KEIL did the job.

    This was all found using the handy thread demo. 

    Then I had to change the timeout parameter of geventEventWait() to 10.

    Now everything works fine.

  5. Hello!

    I'm pretty new to the ugfx and the microcontroller world in general. I created a project in keil using the wiki guide and copied the gui files from the widgets demo. The only difference is that I'm trying to run barebones/raw32. The gui is showing up perfectly but it doesn't respond to touches 

    My understanding of the problem is that the touch screen is not getting polled. 

    Could the issue be in the pe = geventEventWait(&gl, 0); line of gui.c? Changing the 0 into TIME_INFINITE results in a hard fault.

    Or did I mess up with the initialization and project setup? It refused to even boot without including stm32f746g_raw32_interrupts.c or me implementing the SysTick_Handler function.

     

    gfxconf.h

    gui.c

    main.c

×
×
  • Create New...