2018-12-02 01:52 AM
Sorry, I just recognized that in the file I appened to the "Cache New" Nut question, I kept 4 test lines to get this "Code 32 alignment" done before the for wait loop ... .
But this does not work ... this will unfortunately be refused by the compiler.
So please change this in line 192..200:
Wrong state:
// __asm("ALIGN 32\n");
iDelay= 0;
__asm {
AND iDelay, iDelay, #0
ALIGN 32
}
while( !(PWR->D3CR & PWR_D3CR_VOSRDY))
{ if( iDelay++ > IFLOOPEND_1ms) return 0; }
Correct it should look like this:
iDelay= 0;
while( !(PWR->D3CR & PWR_D3CR_VOSRDY))
{ if( iDelay++ > IFLOOPEND_1ms) return 0; }
2018-12-24 08:32 AM
Hello @flyer31 ,
Could you please precise where exactly is this code? which compiler are you using?
Thanks,
Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-12-24 09:32 AM
It was Keil, using functionality not supported by the in-line compiler, and require changes in the segment alignment settings in a .s file. These questions were cross-posted here http://www.keil.com/forum/64067/arm-code-alignment-for-stm32h7-flash-access-loops/