lpcware

SCT capture register read-only? (CAPCTRL)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by DennisFrie on Thu May 15 09:59:07 MST 2014
Hi
I'm currently setting up a normal input capture on timer 1 and everything works as expected - except when trying to set the control register for the capture control register.

When trying to write the following :
LPC_SCT1 -> CAPCTRL[0].U = (1 << 0);

I get this error:
error: assignment of member 'U' in read-only object
(It doesn't matter if I write to U, L or H, same error, CAPCTRL is read-only)

The register is listed as R/W in the datasheet and I don't see any other way to configure this? Is this a stupid mistake from my side or a problem with LPCOpen?

LPCOpen v. 2.08B
LPCExpresso 7.1.1_125
LPC1549 dev. board

Outcomes