cancel
Showing results for 
Search instead for 
Did you mean: 

OSPI_NOR_MemoryMapped_DTR example does not work correctly on STM32H7B3i-DK board

onio
Senior

Hi all,

I am trying to run the OSPI memory mapped example found here on the STM32H7B3i-DK board but does not work correctly.

There seems to be a corruption during the comparison block of the code

mem_addr = (__IO uint8_t *)(OCTOSPI1_BASE + address);
        for (index = 0; index < BUFFERSIZE ; index++)
        {
          if (*mem_addr != aTxBuffer[index])
          {
            BSP_LED_On(LED3);
          }
          mem_addr++;
        }
 
        BSP_LED_Toggle(LED2);

My understanding is that the line with BSP_LED_On(LED3) should never be executed if all the bytes are read correctly and no corruption.

But I am seeing mismatch in the memory read and what is transmitted from the aTxBuffer. I have tried the following but none has work.

  • Increasing the prescaler value to slow things down.
  • Added HAL_Delay(100) before reading the receive data

If anyone has got this to work please advise on how you went about it. I want to get this working on the STM32H7B3i-DK before porting to my custom hardware.

2 REPLIES 2
onio
Senior
CHopk.2
Associate

I came here to report this problem. The DMA example does work. The issue seems to be the DTR mode. If you use the setup of the timing from the DMA example, but the Memory map enable code from the memory map example then is should then work (or it does for me.