Post Go back to editing

System Watchpoint Unit

Category: Software
Product Number: BF70x
Software Version: 2.7.0.0

Hi,

I want to use the System Watchpoint Unit. However, it does not work and I'm not sure which steps are missing. I expected something happening after writing or reading to or from volatile char *ga = (volatile char*)0x11902080;. But nothing happens.

What am I missing? Current Count keeps at five.

The registers are initialized like this:

//init code

Start_SWUProcess();
a.m_u32SWUCNT = 5;
a.m_u32SWUCTRL = BITM_SWU_CTL_INTEN | /*BITM_SWU_CTL_CNTRPTEN |*/ BITM_SWU_CTL_CNTEN | BITM_SWU_CTL_EN | BITM_SWU_CTL_BLENINC|0x08;
a.m_u32SWULA = const_cast<void*>(reinterpret_cast<volatile void*>(0x11902000));
a.m_u32SWUUA = const_cast<void*>(reinterpret_cast<volatile void*>(0x11902100));
a.m_u32SWUID = 0;
a.m_u32SWUTarg = 0;
Disable_SWU(EN_WATCHPOINT::SWU0);
Enable_SWU(EN_WATCHPOINT::SWU0);
Write_SWU_Config(EN_WATCHPOINT::SWU0, 0, a);

//register dump is given in screenshot

volatile char *ga = (volatile char*)0x11902080;

static char buffer[1000];
for (short j=0; j<1000;++j)
{
for (short i = 0; i < 1000; ++i)
buffer[i] = testvar[i];

for (short i = 0; i < 1000; ++i)
testvar[i] = buffer[i];

for (short i = 0; i < 1000; ++i)
*ga = 0xAA;//expect action

for (short i = 0; i < 1000; ++i)
buffer[i] = (int)*ga;//expect action
}

Regards,

Oliver