cancel
Showing results for 
Search instead for 
Did you mean: 

any idea why it is freezing executing *mem_addr = aTxBuffer[index];

MNapi
Senior III

 

I have this code it transfers to 0x90000000 (OSPI) data

__IO uint8_t *mem_addr;

 

/* USER CODE BEGIN 2 */

HAL_OSPI_MemoryMapped(&hospi1, &sMemMappedCfg)

 

mem_addr = (uint8_t *)(OCTOSPI1_BASE + address);

for (index = 0; index < BUFFERSIZE; index++)

{

*mem_addr = aTxBuffer[index];

mem_addr++;

}

 

it compiles and runs fine but freezes on *mem_addr = aTxBuffer[index];

 

has anybody seen something like this ?

 

 

 

20 REPLIES 20

I will just put it aside, enough fun for one day. I do not have similar problem with QSPI

I do not know why but if I read the memory address and write there then it works. Maybe something to take a look at later again.I tried all possible settings in CubeMX including lowering the clock.

 

mem_addr = (__IO uint8_t *)(OCTOSPI1_BASE + address);

for (uint16_t i = 0; i < BUFFERSIZE; i++)

{

dummy_operation[i] = *mem_addr; //without it programming does not work

*mem_addr = aTxBuffer[i];

mem_addr++;

}