I am configuring the RM48L952ZWT boot loader for ADC use per specification.
Sadly, HAL Code Generator does not give registers, so hence some questions.
1. Is ADC1 Group 1 (see picture above) the Group 1 specified at 0xFF7C07C? I will assume that ADC1 Group Event is really "ADC1 Group 0".
Write the bits corresponding to the channels to be converted in group 1 by writing 0x00FFFFFF to the Group 1 Channel Select Register (ADG1SEL at 0xFFF7C07C). This will start the conversions. Wait 10 msec. before reading the conversion data. All channels will be continuously converted, with a period of approximately 9.8 msec.
2. Am I correct that the way to enable the ADC state machine is to check the "Enable ADC drivers | ADC1" check box on the RM48L952ZWT Driver Enable tab, such as I did in the screenshot below?
Write 0x81140001 to the ADC EN bit of the Operating Mode Control Register (ADOPMODECR at 0xFFF7C004) to enable the ADC state machine.
3. My requirement is to set the ADCLK frequency to VCLK/32 from the default VCLK/2. Does that mean that I would increase the "Cycle time (ns)" field from the default 100 to 100 * 16 or 1600?
Configure the ADCLK frequency to VCLK/32 by writing 0x0000001F to the clock divider into the Clock Control Register (ADCLOCKCR at 0xFFF7C008). Note that VCLK was previously set to the oscillator frequency (20MHz) divide by 2, or 10Mhz.
4. I do not see any memory mapping, so am I correct that the default behavior is as shown in the following requirement, meaning that I do nothing here?
Set the pointers to the ADC conversion results memory by writing 0x0010001C to the ADC Results Memory Configuration Register (ADBNDCR at 0xFFF7C058). (Section 19.11.23) This sets the Ch0 results to be the 32-bit word at 0xFF3E0020, the Ch1 results to be the 32-bit word at 0xFF3E0024, and so on until the Ch23 results to be the 32-bit word at 0xFF3E0034.
5. Does ADC1 automatically get released from reset by enabling ADC1 on the driver enable page?
Write 0x00000000 to the ADC Reset Control Register (ADRSTCR at 0xFFF7C000) to release the ADC module from the reset state. (Section 19.3.11)