Here is the code that I am using to write to the Flexbus LCD controller.
LCDCommand(0x29);
Here is the function:
void LCDCommand(uint16_t cmd)
{
*((uint16_t *)DISPLAY_ADDR_CMD) = cmd;
}
Here is the assembler code. The branch to WDOG_EWM_IRQHandler happens at the 000019c2 address which is right after the strh command that should write the 0x29 value to 0x6000000.
LCDCommand:
000019b0: push {r7}
000019b2: sub sp, #12
000019b4: add r7, sp, #0
000019b6: mov r3, r0
000019b8: strh r3, [r7, #6]
73 *((uint16_t *)DISPLAY_ADDR_CMD) = cmd;
000019ba: mov.w r3, #1610612736 ; 0x60000000
000019be: ldrh r2, [r7, #6]
000019c0: strh r2, [r3, #0]
75 }
000019c2: adds r7, #12
000019c4: mov sp, r7
000019c6: ldr.w r7, [sp], #4
000019ca: bx lr
78 {
Kevin