2017-06-16 07:33 AM
2017-06-16 10:19 AM
Could you perhaps use the 'More->Syntax Highlighter' so this doesn't look like an immense wall of code without indentation. For code of this size, consider providing a compilable attachment.
Macro's and front checking of TXE would also be recommended.
2017-06-19 04:46 AM
Thank you Clive One, I couldn't work out how to do the syntax highlight (first post to the forum since it was restyled).
2017-07-13 12:32 AM
Is there someone at ST I can refer this problem to as I need IAP and if that can't be achieved with this STM32 part I'll have to look for alternatives from other manufacturers
2017-07-24 03:00 AM
This turned out to be a basic mistake on the SNB setting in CR. Should have cleared the SNB bits before setting them by OR:
FLASH->CR &= ~(0x0000001F << 3); // SNB : Sector select
FLASH->CR |= (j << 3); // SNB : Sector select�?�?
D'oh!