cancel
Showing results for 
Search instead for 
Did you mean: 

variable assign error while using HyperBus OSPI RAM on L4R5

Lee.Lys
Associate

osram_init(3,1,2,6); // Initialized with Prescaler=3, HighSelect=1, tRWR=2,tACC=6, MemoryMap, refer to CUBE-MX L4R9Eval OSPI_MemoryMap example Project

	uint8_t* mem_addr = ( uint8_t * )( OCTOSPI1_BASE + 0 );
 
	*mem_addr = 0xF0;
 
	*(mem_addr+1) = 0xF1;
 
	*(mem_addr+2) = 0xF2;
 
	*(mem_addr+2) = *(mem_addr+1); // 0x90000002=0xF1? Work
 
	*(mem_addr+3) = *(mem_addr+1); // 0x90000003=0xF1? does'nt work
 
	*(mem_addr+4) = *(mem_addr+1); // 0x90000004=0xF1? work
 
	// desc order
 
	*(mem_addr+2) = 0xF2; // ok
 
	*(mem_addr+3) = 0xF3; // error, set to 0x90000002
 
	*(mem_addr+4) = 0xF4; // ok
 
	*(mem_addr+1) = *(mem_addr+2); // 0x90000001=0xF2? error. value set to 0x90000000
 
	*(mem_addr+1) = *(mem_addr+3); // 0x90000001=0xF3? error. value set to 0x90000000
 
	*(mem_addr+1) = *(mem_addr+4); // 0x90000001=0xF4? error. value set to 0x90000000
 
	

can't assign value by access it's self.

can someone help me?

0 REPLIES 0