Hello All
I was wondering if anyone could help
I am trying to use the Serial.print function to view the bit states in the configuration registers. This has partly worked. As seen in the picture, I am able to see the states of all the bits in the ADC->ADC_MR register. However, this hasn't worked for all the registers. e.g. I cannot see the value of ADC->ADC_CHER in the serial console set to 0x80 instead in just says 0.
Does anyone know why this method of serial print has worked for the ADC mode register but not the ADC channel enable register?
I am hoping that if this works, then others in the Arduino community can use this method to see what their configuration registers are set to as there is no facility for this in the Arduino IDE for the DUE (as far as I am aware)
void setup()
{
/* Serial Communications Configuration */
Serial.begin(115200);
Serial1.begin(115200);
/* ADC Configuration */
ADC->ADC_MR |= 0x10000080; // Mode register - select free running for ADC
// Sets TRANSFER register to 5 ADC clock cycles
Serial.println(ADC->ADC_MR, BIN);
ADC->ADC_CR = 0x00000002; // Control Register - Begin conversions
Serial.println(ADC->ADC_CR, BIN);
ADC->ADC_CHER = 0x00000080; // Enable A0 = CH7 on ADC
Serial.println(ADC->ADC_CHER, BIN);
/* DAC Configuration */
analogWrite(DAC0,0);
}

