I'm having some trouble changing a register. I want to set up ADC0/ADC1 to use PWM Module 1 as a trigger, which means that I have to manipulate the register ADC0_TSSEL_R. I have tried using both the HWREG macro and the register defined in the LM4F232H5QD header file, but neither of them works.
HWREG(ADC0_BASE + ADC_O_TSSEL) = HWREG(ADC0_BASE + ADC_O_TSSEL) | ADC_TSSEL_PS0_1; /* Not working */
ADC0_TSSEL_R |= ADC_TSSEL_PS0_1; /* Not working */
I'm also unable to manipulate this register when debugging using the register view in Code Composer Studio. When I try to change it, it immediately returns to its original value, as if it would be read only. I have also tried editing the memory address i the memory view, but the same thing happens there. Any ideas what could be causing this?
Edit: I'm using Code Composer Studio with a Stellaris LM4F232H5QD board.