AnsweredAssumed Answered

LPC11u68 SYSCON PRESETCTRL not setting

Question asked by Sven Savic on May 6, 2018
Latest reply on May 13, 2018 by Kerry Zhou

I have a peculiar issue with writing a driver for LPC11U68. I want to use SCT0 and for that I need to set or rather unset the reset bit for SCT0.


#define _BV(pin) (1U << (pin))
uint32_t before = LPC_SYSCON->PRESETCTRL;     
if (a_chn < 10)        
  LPC_SYSCON->PRESETCTRL != _BV(9); //SCT0 reset disable    
  LPC_SYSCON->PRESETCTRL != _BV(10); //SCT1 reset disable      
LPC_SYSCON->SYSAHBCLKCTRL |= _BV(31); //enable SCT0_1    
uint32_t after = LPC_SYSCON->PRESETCTRL;

Funny enough before == after == 0x00. For some reason PRESETCTRL doesnt accept any input. While, SYSAHBCLKCTRL sets the bit without any problems. Is there something I need to enable prior to changing the PRESETCTRL ?