Some basics first:
IDE: CCS 7.3
OS: Windows 10
Data Sheet: Tiva™ TM4C123GH6PGE Microcontroller -15033.2672
Board: TM4C123GH6PGE
Code base: TivaWare_C_Series-2.1.4.178
Problem: I am trying something really simple but its not working (yet).
Here is my diagram:
Here is code I am using. It is taken from :
C:\ti\TivaWare_C_Series-2.1.4.178\examples\peripherals\adc\single_ended.c
The only changes I made were to set GPIO_PIN_6 (originally GPIO_PIN_3).
At lines 252 the peripheral is enabled using ip arg “SYSCTL_PERIPH_ADC0”.
It is defined in C:\ti\TivaWare_C_Series-2.1.4.178\driverlib\sysctl.h as
#define SYSCTL_PERIPH_ADC0 0xf0003800 // ADC 0
Question1: But there is no mention , no 0xf0003800 (or even 3800) that I can find in the datasheet. I verified the ADC0 base address but not this “peripheral” address. Where is it?
Question2: At line #75 SYSCTL_PERIPH_GPIOE is defined at address 0xf0000804.
Where is it’s corresponding value in the datasheet?
One last thing:
On Page 699, is Register 18 “GPIO Digital Enable (GPIODEN), offset 0x51C”.
It states “By default, all GPIO signals except those listed
below are configured out of reset to be undriven (tristate). Their digital function is disabled…”
Please confirm whether or not I need to set this register